File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
examples/hub-spoke-delegated-resolver Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,20 @@ module "resource_group" {
1010 existing_resource_group_name = var. resource_group
1111}
1212
13+ # ############################################################################
14+ # Delay between hub and spoke creation/destruction
15+ #
16+ # You can adjust these delay timings if needed.
17+ # This block will put a slight delay between the Hub and Spoke VPC operations.
18+ # This will help if there are resources (such as DNS resolver) that need some
19+ # extra time to fully complete before the other VPC operations continue.
20+ # ############################################################################
21+ resource "time_sleep" "delay_between_hub_spoke" {
22+ depends_on = [module . hub_vpc ]
23+ create_duration = " 30s"
24+ destroy_duration = " 60s"
25+ }
26+
1327# ############################################################################
1428# Provision VPC
1529# ############################################################################
@@ -55,6 +69,7 @@ data "ibm_iam_account_settings" "iam_account_settings" {}
5569
5670module "spoke_vpc" {
5771 source = " ../../"
72+ depends_on = [time_sleep . delay_between_hub_spoke ]
5873 resource_group_id = module. resource_group . resource_group_id
5974 region = var. region
6075 name = " spoke"
Original file line number Diff line number Diff line change @@ -7,5 +7,9 @@ terraform {
77 source = " IBM-Cloud/ibm"
88 version = " >= 1.59.0"
99 }
10+ time = {
11+ source = " hashicorp/time"
12+ version = " >= 0.9.1, < 1.0.0"
13+ }
1014 }
1115}
You can’t perform that action at this time.
0 commit comments