Skip to content

terraform-destroy

terraform-destroy #101

name: terraform-destroy
on:
workflow_dispatch:
jobs:
terraform:
env:
ARM_ACCESS_KEY: ${{ secrets.ARM_ACCESS_KEY }}
runs-on: [ self-hosted, init ]
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- uses: hashicorp/setup-terraform@v2
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: terraform initialise
working-directory: terraform
run: terraform init
- name: terraform destroy
working-directory: terraform
run: |
terraform destroy \
-auto-approve \
-var="ansible_id_rsa=${{ secrets.ANSIBLE_PK }}" \
-var="bristol_proxmox_token_secret=${{ secrets.TERRAFORM_BRISTOL_PROXMOX_TOKEN_SECRET }}"