Skip to content

Commit

Permalink
fix: Use index as name to avoid long url or special filesystem chars
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Jun 1, 2023
1 parent 7a0f4ca commit 0842b86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/acm/policy_bundles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ module "policy_bundles" {
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
version = "~> 3.1"

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

module_depends_on = [time_sleep.wait_acm]
}

0 comments on commit 0842b86

Please sign in to comment.