From b29bd7fc655229a949cdca23392a82157a6d898e Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 21 Oct 2025 12:41:20 -0700 Subject: [PATCH] See if we can destroy a specific module --- .github/workflows/deploy.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dd7fd3f21..ae971ac80 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,28 +38,15 @@ jobs: run: terraform init - - name: Terraform swap providers + - name: Terraform see if we can destroy a specific module working-directory: terraform/staging env: AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} run: | - terraform state replace-provider \ - -state=terraform.tfstate \ - -state-out=new-state.tfstate \ - 'registry.terraform.io/cloudfoundry-community/cloudfoundry' \ - 'registry.terraform.io/cloudfoundry/cloudfoundry' \ - module.logo_upload_bucket + terraform plan -destroy -target=module.logo_upload_bucket - - name: Terraform show swapped providers - working-directory: terraform/staging - env: - AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} - run: | - terraform show -json new-state.tfstate | jq '.values.root_module.child_modules[]?.provider_configs' - - name: Terraform apply working-directory: terraform/staging env: