Skip to content

Destroy

Destroy #26

Workflow file for this run

name: Destroy
on:
workflow_dispatch:
permissions: read-all
jobs:
destroy-release:
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
contents: write
id-token: write
pull-requests: write
issues: write
steps:
- uses: 'actions/checkout@v3'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.5.0
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER_NAME }}
service_account: ${{ secrets.GCP_WORKLOAD_IDENTITY_SA_EMAIL }}
- name: Terraform Init
id: init
run: terraform init -backend-config=env/backend.tfvars
- name: Terraform Destroy
id: destroy
run: terraform destroy -no-color -var-file env/project.tfvars -auto-approve
continue-on-error: false