tested template
This commit is contained in:
36
.gitea/workflows/destroy_module.yml
Normal file
36
.gitea/workflows/destroy_module.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
Reference in New Issue
Block a user