From 348bcc3008187ccb9293cea35a975aec797889fc Mon Sep 17 00:00:00 2001 From: Karim Naufal Date: Wed, 9 Mar 2022 04:16:01 +0100 Subject: [PATCH 1/2] removed a few params from server keepers --- modules/host/main.tf | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/host/main.tf b/modules/host/main.tf index a4de8c6..59cb3e4 100644 --- a/modules/host/main.tf +++ b/modules/host/main.tf @@ -2,21 +2,12 @@ resource "random_pet" "server" { length = 1 keepers = { # We re-create the id (and server) whenever one of those attributes - # changes. This should include all input variables to this module, - # but NO SENSITIVE values as they might be logged here. + # changes. name = var.name public_key = var.public_key additional_public_keys = join(",", var.additional_public_keys) - firewall_ids = join(",", var.firewall_ids) placement_group_id = var.placement_group_id - labels = join(",", [for k, v in var.labels : "${k}=${v}"]) - ipv4_subnet_id = var.ipv4_subnet_id private_ipv4 = var.private_ipv4 - server_type = var.server_type - - # Excluding these for now as they are part of the ignore_changes below - #ssh_keys = join(",", var.ssh_keys) - #location = var.location } } From 46ab602da309dfe143e3feeb3521655b38b95a10 Mon Sep 17 00:00:00 2001 From: Karim Naufal Date: Wed, 9 Mar 2022 20:57:52 +0100 Subject: [PATCH 2/2] kept only name and ip as keepers for the random_string ressource for the servers --- modules/host/main.tf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/host/main.tf b/modules/host/main.tf index 5a9d6e4..22a7c52 100644 --- a/modules/host/main.tf +++ b/modules/host/main.tf @@ -8,11 +8,8 @@ resource "random_string" "server" { keepers = { # We re-create the id (and server) whenever one of those attributes # changes. - name = var.name - public_key = var.public_key - additional_public_keys = join(",", var.additional_public_keys) - placement_group_id = var.placement_group_id - private_ipv4 = var.private_ipv4 + name = var.name + private_ipv4 = var.private_ipv4 } }