File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,12 @@ resource "tls_private_key" "k8sop_creds" {
30
30
rsa_bits = 4096
31
31
}
32
32
33
- # Wait for the ACM operator to create the namespace
33
+ # Wait for ACM
34
34
resource "time_sleep" "wait_acm" {
35
35
count = (var. create_ssh_key == true || var. ssh_auth_key != null || var. enable_policy_controller || var. enable_config_sync ) ? 1 : 0
36
36
depends_on = [google_gke_hub_feature_membership . main ]
37
37
38
- create_duration = " 300s"
38
+ create_duration = ( length (var . policy_bundles ) > 0 ) ? " 600s " : " 300s"
39
39
}
40
40
41
41
resource "google_service_account_iam_binding" "ksa_iam" {
Original file line number Diff line number Diff line change @@ -18,12 +18,13 @@ module "policy_bundles" {
18
18
source = " terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
19
19
version = " ~> 3.1"
20
20
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 }
22
23
project_id = var. project_id
23
24
cluster_name = var. cluster_name
24
25
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 } "
27
28
28
29
module_depends_on = [time_sleep . wait_acm ]
29
30
}
You can’t perform that action at this time.
0 commit comments