Skip to content

Commit dbc6468

Browse files
authored
fix: add count around time sleeps to make module more efficient (#200)
1 parent 2c88fdb commit dbc6468

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

solutions/standard/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ resource "ibm_iam_authorization_policy" "kms_policy" {
5252

5353
# workaround for https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4478
5454
resource "time_sleep" "wait_for_authorization_policy" {
55+
count = local.create_cross_account_auth_policy ? 1 : 0
5556
depends_on = [ibm_iam_authorization_policy.kms_policy]
5657
create_duration = "30s"
5758
}
@@ -195,6 +196,7 @@ data "ibm_en_destinations" "en_destinations" {
195196

196197
# workaround for https://github.com/IBM-Cloud/terraform-provider-ibm/issues/5533
197198
resource "time_sleep" "wait_for_secrets_manager" {
199+
count = var.enable_event_notification ? 1 : 0
198200
depends_on = [module.secrets_manager]
199201

200202
create_duration = "30s"

0 commit comments

Comments
 (0)