Merge pull request #121 from kube-hetzner/random-string-node
Random string node
This commit is contained in:
commit
cb571e92b4
@ -12,5 +12,5 @@ locals {
|
|||||||
ssh_args = "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${local.ssh_identity_file}"
|
ssh_args = "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${local.ssh_identity_file}"
|
||||||
|
|
||||||
# the hosts name with its unique suffix attached
|
# the hosts name with its unique suffix attached
|
||||||
name = "${var.name}-${random_pet.server.id}"
|
name = "${var.name}-${random_string.server.id}"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
resource "random_pet" "server" {
|
resource "random_string" "server" {
|
||||||
length = 1
|
length = 3
|
||||||
|
lower = true
|
||||||
|
special = false
|
||||||
|
number = false
|
||||||
|
upper = false
|
||||||
|
|
||||||
keepers = {
|
keepers = {
|
||||||
# We re-create the id (and server) whenever one of those attributes
|
# We re-create the id (and server) whenever one of those attributes
|
||||||
# changes. This should include all input variables to this module,
|
# changes. This should include all input variables to this module,
|
||||||
|
Loading…
Reference in New Issue
Block a user