From 83b18daf26f73cc4954c47169053d8e562633f84 Mon Sep 17 00:00:00 2001 From: David Sibley Date: Tue, 14 May 2024 11:15:18 +0100 Subject: [PATCH 1/2] set workflow to use terraform 1.8 --- .github/workflows/example.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 7c9789f1..68a39326 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -48,7 +48,7 @@ jobs: - name: Load and Configure Terraform uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1 with: - terraform_version: 1.0.1 + terraform_version: ~1.8 terraform_wrapper: false - name: Terraform plan - example pipelines run: | From 0e0c7c7afcbaacefc6d1917d1de5bb1642f44746 Mon Sep 17 00:00:00 2001 From: David Sibley Date: Tue, 14 May 2024 11:33:36 +0100 Subject: [PATCH 2/2] fixed security group references to retrieve correct output from remote state --- teams/example/linux_pipeline_vars.tf | 2 +- teams/example/windows_pipeline_vars.tf | 2 +- teams/example/windows_s3_test_pipeline_vars.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/teams/example/linux_pipeline_vars.tf b/teams/example/linux_pipeline_vars.tf index df8734b6..ac488be0 100644 --- a/teams/example/linux_pipeline_vars.tf +++ b/teams/example/linux_pipeline_vars.tf @@ -25,7 +25,7 @@ locals { description = "Description here" instance_types = ["t2.nano", "t3.micro"] name = join("", [local.team_name, "_AmazonLinux2"]) - security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id] + security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id.non_live_data] subnet_id = data.terraform_remote_state.modernisation-platform-repo.outputs.non_live_private_subnet_ids[0] terminate_on_fail = true } diff --git a/teams/example/windows_pipeline_vars.tf b/teams/example/windows_pipeline_vars.tf index b4749bdf..ce9ccbd9 100644 --- a/teams/example/windows_pipeline_vars.tf +++ b/teams/example/windows_pipeline_vars.tf @@ -25,7 +25,7 @@ locals { description = "Description here" instance_types = ["t2.nano", "t3.micro"] name = join("", [local.team_name, "_WindowsServer2022"]) - security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id] + security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id.non_live_data] subnet_id = data.terraform_remote_state.modernisation-platform-repo.outputs.non_live_private_subnet_ids[0] terminate_on_fail = true } diff --git a/teams/example/windows_s3_test_pipeline_vars.tf b/teams/example/windows_s3_test_pipeline_vars.tf index 15347bb0..6a6e21d8 100644 --- a/teams/example/windows_s3_test_pipeline_vars.tf +++ b/teams/example/windows_s3_test_pipeline_vars.tf @@ -31,7 +31,7 @@ locals { description = "Description here" instance_types = ["t3.medium"] name = join("", [local.team_name, "_WindowsServer2022_s3_test"]) - security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id] + security_group_ids = [data.terraform_remote_state.modernisation-platform-repo.outputs.image_builder_security_group_id.non_live_data] subnet_id = data.terraform_remote_state.modernisation-platform-repo.outputs.non_live_private_subnet_ids[0] terminate_on_fail = true }