Skip to content

Commit

Permalink
fix: added workaround for known [provider issue](IBM-Cloud/terraform-…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-Abhyarthi and ocofaigh authored Aug 9, 2023
1 parent f25bce6 commit 7d57c4a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ You need the following permissions to run this module.
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.54.0, < 2.0.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |

### Modules

Expand All @@ -99,6 +100,7 @@ No modules.
| [ibm_iam_authorization_policy.policy](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/iam_authorization_policy) | resource |
| [ibm_is_vpn_server.vpn](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/is_vpn_server) | resource |
| [ibm_is_vpn_server_route.server_route](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/is_vpn_server_route) | resource |
| [time_sleep.wait_for_authorization_policy](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |

### Inputs

Expand Down
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ resource "ibm_iam_authorization_policy" "policy" {
roles = ["SecretsReader"]
}

# 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"
}

# Access groups
# More info: https://cloud.ibm.com/docs/vpc?topic=vpc-create-iam-access-group
resource "ibm_iam_access_group" "cts_vpn_access_group" {
Expand Down
28 changes: 23 additions & 5 deletions module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
"version_constraints": [
"\u003e= 1.54.0, \u003c 2.0.0"
]
},
"time": {
"source": "hashicorp/time",
"version_constraints": [
"\u003e= 0.9.1"
]
}
},
"managed_resources": {
Expand All @@ -262,7 +268,7 @@
},
"pos": {
"filename": "main.tf",
"line": 28
"line": 35
}
},
"ibm_iam_access_group_members.cts_vpn_access_group_users": {
Expand All @@ -278,7 +284,7 @@
},
"pos": {
"filename": "main.tf",
"line": 43
"line": 50
}
},
"ibm_iam_access_group_policy.cts_vpn_access_group_policy": {
Expand All @@ -293,7 +299,7 @@
},
"pos": {
"filename": "main.tf",
"line": 34
"line": 41
}
},
"ibm_iam_authorization_policy.policy": {
Expand Down Expand Up @@ -331,7 +337,7 @@
},
"pos": {
"filename": "main.tf",
"line": 50
"line": 57
}
},
"ibm_is_vpn_server_route.server_route": {
Expand All @@ -346,7 +352,19 @@
},
"pos": {
"filename": "main.tf",
"line": 65
"line": 72
}
},
"time_sleep.wait_for_authorization_policy": {
"mode": "managed",
"type": "time_sleep",
"name": "wait_for_authorization_policy",
"provider": {
"name": "time"
},
"pos": {
"filename": "main.tf",
"line": 27
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ terraform {
source = "ibm-cloud/ibm"
version = ">= 1.54.0, < 2.0.0"
}
time = {
source = "hashicorp/time"
version = ">= 0.9.1"
}
}
}

0 comments on commit 7d57c4a

Please sign in to comment.