diff --git a/modules/agent-policy/main.tf b/modules/agent-policy/main.tf index 631fa99..6395136 100644 --- a/modules/agent-policy/main.tf +++ b/modules/agent-policy/main.tf @@ -31,7 +31,7 @@ module "gcloud-upsert" { ${base64encode(jsonencode(var.zones == null ? [] : var.zones))} \ ${base64encode(jsonencode(var.instances == null ? [] : var.instances))} EOT - create_cmd_triggers = { uuid = uuid() } + create_cmd_triggers = { uuid = random_uuid.uuid.result } } module "gcloud-destroy" { @@ -45,3 +45,6 @@ module "gcloud-destroy" { destroy_cmd_entrypoint = "${path.module}/scripts/delete-script.sh" destroy_cmd_body = "${var.project_id} ${jsonencode(var.policy_id)}" } + +resource "random_uuid" "uuid" { +} diff --git a/modules/agent-policy/versions.tf b/modules/agent-policy/versions.tf index acb7f0e..773d669 100644 --- a/modules/agent-policy/versions.tf +++ b/modules/agent-policy/versions.tf @@ -16,4 +16,10 @@ terraform { required_version = ">= 0.13" + required_providers { + random = { + source = "hashicorp/random" + version = ">= 3.4" + } + } }