Skip to content

Commit 62b27a8

Browse files
1 parent 6288ad7 commit 62b27a8

File tree

4 files changed

+40
-9
lines changed

4 files changed

+40
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ You need the following permissions to run this module.
140140
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
141141
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.54.0, < 2.0.0 |
142142
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.5.1 |
143+
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |
143144

144145
## Modules
145146

@@ -159,6 +160,7 @@ You need the following permissions to run this module.
159160
| [ibm_resource_key.resource_key](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/resource_key) | resource |
160161
| [ibm_resource_tag.cos_access_tag](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/resource_tag) | resource |
161162
| [random_string.bucket_name_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
163+
| [time_sleep.wait_for_authorization_policy](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
162164

163165
## Inputs
164166

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ locals {
3333
validate_cross_region_location_archive_disabled_inputs = var.create_cos_bucket && (var.cross_region_location != null && var.archive_days != null) ? tobool("If var.cross_region_location is set, then var.expire_days cannot be set.") : true
3434
}
3535

36+
# workaround for https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4478
37+
resource "time_sleep" "wait_for_authorization_policy" {
38+
depends_on = [ibm_iam_authorization_policy.policy]
39+
40+
create_duration = "30s"
41+
}
42+
3643
# Resource to create COS instance if create_cos_instance is true
3744
resource "ibm_resource_instance" "cos_instance" {
3845
count = var.create_cos_instance ? 1 : 0

module-metadata.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,12 @@
596596
"version_constraints": [
597597
"\u003e= 3.5.1"
598598
]
599+
},
600+
"time": {
601+
"source": "hashicorp/time",
602+
"version_constraints": [
603+
"\u003e= 0.9.1"
604+
]
599605
}
600606
},
601607
"managed_resources": {
@@ -617,7 +623,7 @@
617623
},
618624
"pos": {
619625
"filename": "main.tf",
620-
"line": 101
626+
"line": 108
621627
}
622628
},
623629
"ibm_cos_bucket.cos_bucket1": {
@@ -637,7 +643,7 @@
637643
},
638644
"pos": {
639645
"filename": "main.tf",
640-
"line": 178
646+
"line": 185
641647
}
642648
},
643649
"ibm_iam_authorization_policy.policy": {
@@ -652,7 +658,7 @@
652658
},
653659
"pos": {
654660
"filename": "main.tf",
655-
"line": 78
661+
"line": 85
656662
}
657663
},
658664
"ibm_resource_instance.cos_instance": {
@@ -672,7 +678,7 @@
672678
},
673679
"pos": {
674680
"filename": "main.tf",
675-
"line": 37
681+
"line": 44
676682
}
677683
},
678684
"ibm_resource_key.resource_key": {
@@ -690,7 +696,7 @@
690696
},
691697
"pos": {
692698
"filename": "main.tf",
693-
"line": 54
699+
"line": 61
694700
}
695701
},
696702
"ibm_resource_tag.cos_access_tag": {
@@ -706,7 +712,7 @@
706712
},
707713
"pos": {
708714
"filename": "main.tf",
709-
"line": 47
715+
"line": 54
710716
}
711717
},
712718
"random_string.bucket_name_suffix": {
@@ -721,7 +727,19 @@
721727
},
722728
"pos": {
723729
"filename": "main.tf",
724-
"line": 88
730+
"line": 95
731+
}
732+
},
733+
"time_sleep.wait_for_authorization_policy": {
734+
"mode": "managed",
735+
"type": "time_sleep",
736+
"name": "wait_for_authorization_policy",
737+
"provider": {
738+
"name": "time"
739+
},
740+
"pos": {
741+
"filename": "main.tf",
742+
"line": 37
725743
}
726744
}
727745
},
@@ -802,7 +820,7 @@
802820
},
803821
"pos": {
804822
"filename": "main.tf",
805-
"line": 261
823+
"line": 268
806824
}
807825
},
808826
"instance_cbr_rule": {
@@ -880,7 +898,7 @@
880898
},
881899
"pos": {
882900
"filename": "main.tf",
883-
"line": 296
901+
"line": 303
884902
}
885903
}
886904
}

version.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ terraform {
66
source = "ibm-cloud/ibm"
77
version = ">= 1.54.0, < 2.0.0"
88
}
9+
time = {
10+
source = "hashicorp/time"
11+
version = ">= 0.9.1"
12+
}
913
random = {
1014
source = "hashicorp/random"
1115
version = ">= 3.5.1"

0 commit comments

Comments
 (0)