Skip to content

Commit e096c0e

Browse files
Updated machine naming scheme
Added uuid as machine suffix before adding the machine number
1 parent 6923aa9 commit e096c0e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Configure the Hetzner Cloud Provider
22
provider "hcloud" {
33
token = var.hcloud_token
4+
}
5+
6+
resource "random_uuid" "hetzner_machine" {
47
}

servers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "hcloud_server" "github_runner" {
22
count = var.github_actions_runner_count
3-
name = format("%s-%s-%d", "github-runner", var.hetzner_machine_os, count.index + 1)
3+
name = format("%s-%s-%s-%d", "github-runner", var.hetzner_machine_os, random_uuid.hetzner_machine.result, count.index + 1)
44
server_type = var.hetzner_machine_type
55
image = var.hetzner_machine_os
66
ssh_keys = [hcloud_ssh_key.admin_ssh_key.id]

0 commit comments

Comments
 (0)