diff --git a/README.md b/README.md index 8d02d060..54cf4b2d 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ To attach access management tags to resources in this module, you need the follo | [terraform](#requirement\_terraform) | >= 1.3.0 | | [ibm](#requirement\_ibm) | >= 1.52.0 | | [null](#requirement\_null) | >= 3.2.1 | +| [time](#requirement\_time) | >= 0.9.1 | ### Modules @@ -118,6 +119,7 @@ To attach access management tags to resources in this module, you need the follo | [ibm_is_vpc_routing_table_route.routing_table_routes](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/is_vpc_routing_table_route) | resource | | [null_resource.clean_default_acl](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [null_resource.clean_default_security_group](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | +| [time_sleep.wait_for_authorization_policy](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource | | [ibm_is_vpc_address_prefixes.get_address_prefixes](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/is_vpc_address_prefixes) | data source | ### Inputs diff --git a/main.tf b/main.tf index 36734ec2..05fa6c2d 100644 --- a/main.tf +++ b/main.tf @@ -43,6 +43,12 @@ data "ibm_is_vpc_address_prefixes" "get_address_prefixes" { } ############################################################################## +# workaround for https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4478 +resource "time_sleep" "wait_for_authorization_policy" { + depends_on = [ibm_iam_authorization_policy.policy] + + create_duration = "30s" +} ############################################################################## # Create vpc route resource diff --git a/module-metadata.json b/module-metadata.json index bd01f962..a38a0279 100644 --- a/module-metadata.json +++ b/module-metadata.json @@ -546,6 +546,12 @@ "version_constraints": [ "\u003e= 3.2.1" ] + }, + "time": { + "source": "hashicorp/time", + "version_constraints": [ + "\u003e= 0.9.1" + ] } }, "managed_resources": { @@ -562,7 +568,7 @@ }, "pos": { "filename": "main.tf", - "line": 108 + "line": 114 } }, "ibm_is_flow_log.flow_logs": { @@ -583,7 +589,7 @@ }, "pos": { "filename": "main.tf", - "line": 119 + "line": 125 } }, "ibm_is_network_acl.network_acl": { @@ -618,7 +624,7 @@ }, "pos": { "filename": "main.tf", - "line": 86 + "line": 92 } }, "ibm_is_security_group_rule.default_vpc_rule": { @@ -709,7 +715,7 @@ }, "pos": { "filename": "main.tf", - "line": 51 + "line": 57 } }, "ibm_is_vpc_routing_table_route.routing_table_routes": { @@ -724,7 +730,7 @@ }, "pos": { "filename": "main.tf", - "line": 60 + "line": 66 } }, "null_resource.clean_default_acl": { @@ -739,7 +745,7 @@ }, "pos": { "filename": "main.tf", - "line": 153 + "line": 159 } }, "null_resource.clean_default_security_group": { @@ -754,7 +760,19 @@ }, "pos": { "filename": "main.tf", - "line": 137 + "line": 143 + } + }, + "time_sleep.wait_for_authorization_policy": { + "mode": "managed", + "type": "time_sleep", + "name": "wait_for_authorization_policy", + "provider": { + "name": "time" + }, + "pos": { + "filename": "main.tf", + "line": 47 } } }, diff --git a/version.tf b/version.tf index 08b1a721..8e6ac798 100644 --- a/version.tf +++ b/version.tf @@ -6,6 +6,10 @@ terraform { source = "IBM-Cloud/ibm" version = ">= 1.52.0" } + time = { + source = "hashicorp/time" + version = ">= 0.9.1" + } null = { source = "hashicorp/null" version = ">= 3.2.1"