generated from twilio-professional-services/flex-project-template
-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (36 loc) · 1.19 KB
/
terraform_delete.yaml
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
name: "Terraform DELETE State"
on:
workflow_dispatch:
inputs:
environment:
required: true
type: environment
description: "Environment to use for deployment"
# Note your actions must have read and write workflow permissions enabled
# this script is intended for development and troubleshooting purposes
#
# terraform is only concered with resources in the definition and in its
# state.
#
# if the resource definition defines something that already exists
# then it is expected to exist in the state.
jobs:
delete-terraform-state:
name: Delete Terraform
environment: ${{ github.event.inputs.environment }}
env:
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }}
ENVIRONMENT: ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install Twilio CLI
run: |
npm install -g twilio-cli
twilio plugins:install @twilio-labs/plugin-serverless
- id: delete_terraform_state
working-directory: ./infra-as-code/state
run: |
./delete.sh