Skip to content

Commit 606380a

Browse files
committed
fix: Use index as name to avoid long url or special filesystem chars
1 parent 7a0f4ca commit 606380a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/acm/policy_bundles.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ module "policy_bundles" {
1818
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
1919
version = "~> 3.1"
2020

21-
for_each = toset(var.policy_bundles)
21+
# Use index as name to avoid long url or special filesystem chars
22+
for_each = { for i, v in var.policy_bundles : i => v }
2223
project_id = var.project_id
2324
cluster_name = var.cluster_name
2425
cluster_location = var.location
25-
kubectl_create_command = "kubectl apply -k ${each.key}"
26-
kubectl_destroy_command = "kubectl delete -k ${each.key}"
26+
kubectl_create_command = "kubectl apply -k ${each.value}"
27+
kubectl_destroy_command = "kubectl delete -k ${each.value}"
2728

2829
module_depends_on = [time_sleep.wait_acm]
2930
}

0 commit comments

Comments
 (0)