Skip to content

Commit ac214a2

Browse files
authored
fix: added a sleep to workaround timing issue when creating Event Notifications topic with a newly provisioned Secrets Manager instance (#152)
1 parent 4008189 commit ac214a2

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

solutions/standard/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,15 @@ data "ibm_en_destinations" "en_destinations" {
163163
instance_guid = local.existing_en_guid
164164
}
165165

166+
resource "time_sleep" "wait_for_secrets_manager" {
167+
depends_on = [module.secrets_manager]
168+
169+
create_duration = "30s"
170+
}
171+
166172
resource "ibm_en_topic" "en_topic" {
167173
count = var.existing_event_notification_instance_crn != null ? 1 : 0
174+
depends_on = [time_sleep.wait_for_secrets_manager]
168175
instance_guid = local.existing_en_guid
169176
name = "Secrets Manager Topic"
170177
description = "Topic for Secrets Manager events routing"

solutions/standard/version.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ terraform {
66
source = "IBM-Cloud/ibm"
77
version = "1.66.0"
88
}
9+
time = {
10+
source = "hashicorp/time"
11+
version = ">= 0.9.1, < 1.0.0"
12+
}
913
}
1014
}

0 commit comments

Comments
 (0)