feat: destroy workflow
This commit is contained in:
36
.gitea/workflows/terraform_destroy.yaml
Normal file
36
.gitea/workflows/terraform_destroy.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Terraform Provision
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
terraform:
|
||||||
|
name: Terraform Apply
|
||||||
|
runs-on: skylab
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./opdracht-3
|
||||||
|
|
||||||
|
env:
|
||||||
|
TF_VAR_esxi_hostname: ${{ secrets.ESXI_HOSTNAME }}
|
||||||
|
TF_VAR_esxi_username: ${{ secrets.ESXI_USERNAME }}
|
||||||
|
TF_VAR_esxi_password: ${{ secrets.ESXI_PASSWORD }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Terraform
|
||||||
|
uses: hashicorp/setup-terraform@v3
|
||||||
|
|
||||||
|
- name: Terraform Init
|
||||||
|
run: terraform init
|
||||||
|
|
||||||
|
- name: Terraform Format
|
||||||
|
run: terraform fmt -check
|
||||||
|
|
||||||
|
- name: Terraform Validate
|
||||||
|
run: terraform validate
|
||||||
|
|
||||||
|
- name: Terraform Destroy
|
||||||
|
run: terraform destroy -auto-approve
|
Reference in New Issue
Block a user