File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ module "vpes" {
7171 cloud_services = var. cloud_services
7272 cloud_service_by_crn = var. cloud_service_by_crn
7373 service_endpoints = var. service_endpoints
74+ # Wait 30secs after security group is destroyed before destroying VPE to workaround timing issue which can produce “Target not found” error on destroy
75+ depends_on = [time_sleep . wait_30_seconds ]
7476}
7577
78+ resource "time_sleep" "wait_30_seconds" {
79+ depends_on = [data . ibm_is_security_group . default_sg ]
80+
81+ destroy_duration = " 30s"
82+ }
83+
84+
7685# #############################################################################
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ terraform {
1010 source = " IBM-Cloud/ibm"
1111 version = " 1.51.0"
1212 }
13+ time = {
14+ source = " hashicorp/time"
15+ version = " 0.9.1"
16+ }
1317 }
1418}
1519
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const resourceGroup = "geretain-test-resources"
1313const defaultExampleTerraformDir = "examples/default"
1414
1515func setupOptions (t * testing.T , prefix string , dir string ) * testhelper.TestOptions {
16- options := testhelper .TestOptionsDefault (& testhelper.TestOptions {
16+ options := testhelper .TestOptionsDefaultWithVars (& testhelper.TestOptions {
1717 Testing : t ,
1818 TerraformDir : dir ,
1919 Prefix : prefix ,
You can’t perform that action at this time.
0 commit comments