replace dry-run with creating a new state file and printing out the providers portion

This commit is contained in:
Kenneth Kehl
2025-10-21 12:09:50 -07:00
parent 288b248ca2
commit d4d87d9000

View File

@@ -45,12 +45,21 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
run: |
terraform state replace-provider \
-dry-run \
-state=terraform.tfstate \
-state-out=new-state.tfstate \
'registry.terraform.io/cloudfoundry-community/cloudfoundry' \
'registry.terraform.io/cloudfoundry/cloudfoundry' \
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: