generated from CC/VMServiceTemplate
37 lines
766 B
YAML
37 lines
766 B
YAML
name: Terraform Destroy
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
working_directory:
|
|
description: "Working directory for the module"
|
|
required: false
|
|
default: "terraform"
|
|
type: string
|
|
|
|
jobs:
|
|
destroy:
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: ${{ inputs.working_directory }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v4
|
|
|
|
- name: Terraform Init
|
|
run: terraform init
|
|
|
|
- name: Terraform Destroy Plan
|
|
run: terraform plan -destroy -out=tfplan
|
|
continue-on-error: false
|
|
|
|
- name: Terraform Destroy
|
|
run: terraform destroy -auto-approve
|