Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

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 e95128e commit 4b2e41e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,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.49.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |

### Modules

Expand All @@ -63,6 +64,7 @@ No modules.
|------|------|
| [ibm_iam_authorization_policy.kms_policy](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/iam_authorization_policy) | resource |
| [ibm_resource_instance.data_engine_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance) | 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 @@ -20,6 +20,13 @@ resource "ibm_iam_authorization_policy" "kms_policy" {
roles = ["Reader"]
}

# 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.kms_policy]

create_duration = "30s"
}

resource "ibm_resource_instance" "data_engine_instance" {
name = var.instance_name
service = "sql-query"
Expand Down
20 changes: 19 additions & 1 deletion module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@
"version_constraints": [
"\u003e= 1.49.0"
]
},
"time": {
"source": "hashicorp/time",
"version_constraints": [
"\u003e= 0.9.1"
]
}
},
"managed_resources": {
Expand Down Expand Up @@ -223,7 +229,19 @@
},
"pos": {
"filename": "main.tf",
"line": 23
"line": 30
}
},
"time_sleep.wait_for_authorization_policy": {
"mode": "managed",
"type": "time_sleep",
"name": "wait_for_authorization_policy",
"provider": {
"name": "time"
},
"pos": {
"filename": "main.tf",
"line": 24
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ terraform {
source = "IBM-Cloud/ibm"
version = ">= 1.49.0"
}
time = {
source = "hashicorp/time"
version = ">= 0.9.1"
}
}
}

0 comments on commit 4b2e41e

Please sign in to comment.