-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.01 KB
/
destroy.terraform.yml
File metadata and controls
42 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Apply terraform to destroy the infrastructure described in the target repository
on:
workflow_call:
inputs:
infrastructure-repository:
required: true
type: string
workspace-name:
required: true
type: string
secrets:
TF_API_TOKEN:
required: true
jobs:
create-environment:
runs-on: ubuntu-latest
steps:
- name: Checkout client infrastructure repository
uses: actions/checkout@v3
with:
repository: ${{ inputs.infrastructure-repository }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Terraform Init
env:
TF_WORKSPACE: ${{ inputs.workspace-name }}
run: |
terraform init
- name: Terraform Destroy
env:
TF_WORKSPACE: ${{ inputs.workspace-name }}
run: >-
terraform destroy
-auto-approve
-input=false