From 0b921994f7242adbcffd8be085c686a5e044f1e3 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Thu, 4 Mar 2021 22:29:21 -0600 Subject: [PATCH 1/6] Fixes validation - Makes validate deploy script executable - Updates module resource dependencies Signed-off-by: Sean Sundberg --- .github/scripts/validate-deploy.sh | 0 main.tf | 2 ++ 2 files changed, 2 insertions(+) mode change 100644 => 100755 .github/scripts/validate-deploy.sh diff --git a/.github/scripts/validate-deploy.sh b/.github/scripts/validate-deploy.sh old mode 100644 new mode 100755 diff --git a/main.tf b/main.tf index 9213f01..e06a089 100644 --- a/main.tf +++ b/main.tf @@ -62,6 +62,8 @@ resource "ibm_iam_authorization_policy" "policy" { } resource "ibm_resource_instance" "mongodb_instance" { + depends_on = [ibm_iam_authorization_policy.policy] + name = local.name service = local.service plan = var.plan From c110a1d4a0f783946ffb9667572770a2ce1c7ad7 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Thu, 4 Mar 2021 23:12:15 -0600 Subject: [PATCH 2/6] Increases timeout to 60m Signed-off-by: Sean Sundberg --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index e06a089..edd24ab 100644 --- a/main.tf +++ b/main.tf @@ -74,7 +74,7 @@ resource "ibm_resource_instance" "mongodb_instance" { parameters = local.parameters timeouts { - create = "30m" + create = "60m" update = "15m" delete = "15m" } From 9bdea40eaac2e4ab8f5d8b3ea851cbde276fbf26 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Thu, 4 Mar 2021 23:57:37 -0600 Subject: [PATCH 3/6] Changes name_prefix Signed-off-by: Sean Sundberg --- test/stages/stage2-mongodb.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/stages/stage2-mongodb.tf b/test/stages/stage2-mongodb.tf index f84e19f..cbe3c33 100644 --- a/test/stages/stage2-mongodb.tf +++ b/test/stages/stage2-mongodb.tf @@ -3,7 +3,7 @@ module "dev_tools_mongodb" { resource_group_name = var.resource_group_name resource_location = var.region - name_prefix = var.name_prefix + name_prefix = "${var.name_prefix}_2" key-protect-region = var.key-protect-region key-protect-name = var.key-protect-name key-protect-key = var.key-protect-key From 1efea6adb2547fd16402e00ac02d19dd95ff06bd Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Fri, 5 Mar 2021 00:19:33 -0600 Subject: [PATCH 4/6] Only destroy on cancelled Signed-off-by: Sean Sundberg --- .github/workflows/verify.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 7cafb6e..58933be 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -40,7 +40,7 @@ jobs: - name: Verify destroy on ${{ matrix.platform }} uses: ibm-garage-cloud/action-module-verify-destroy@main - if: ${{ always() }} + if: ${{ cancelled() }} with: clusterId: ${{ matrix.platform }} env: From 3cde9178e2192c80d2d63d70dd73abc3cedae2d2 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Fri, 5 Mar 2021 00:29:14 -0600 Subject: [PATCH 5/6] Changes to always run destroy Signed-off-by: Sean Sundberg --- .github/workflows/verify.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 58933be..7cafb6e 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -40,7 +40,7 @@ jobs: - name: Verify destroy on ${{ matrix.platform }} uses: ibm-garage-cloud/action-module-verify-destroy@main - if: ${{ cancelled() }} + if: ${{ always() }} with: clusterId: ${{ matrix.platform }} env: From f26d196e54b5ccc137e687c3360af41ef5acdd52 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Fri, 5 Mar 2021 00:51:26 -0600 Subject: [PATCH 6/6] Authorize mongodb to access all kms services Signed-off-by: Sean Sundberg --- main.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/main.tf b/main.tf index edd24ab..e1f2ca3 100644 --- a/main.tf +++ b/main.tf @@ -57,7 +57,6 @@ resource "ibm_iam_authorization_policy" "policy" { source_service_name = local.service target_service_name = "kms" - target_resource_instance_id = data.ibm_resource_instance.kp_instance[0].id roles = ["Reader"] }