Skip to content

Commit

Permalink
debug: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
shejri committed Sep 19, 2024
1 parent 29167d9 commit e62ecdc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
description: Terraform workspace used for staging
required: true
options:
- dev2
- dev
- dev2
- qa
- prod
default: dev
Expand Down Expand Up @@ -108,12 +108,14 @@ jobs:
terraform apply -auto-approve main.tfplan
- name: 'Terraform destroy'
if: ${{ github.event.inputs.directory != '' }} && ${{ github.event.inputs.action == 'destroy' }}
if: |
github.event.inputs.action == destroy &&
github.event.inputs.directory != ''
working-directory: ${{ github.event.inputs.directory }}
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
run: |
terraform destroy -auto-approve
terraform destroy -target=module.${{ github.event.inputs.module }} -auto-approve

0 comments on commit e62ecdc

Please sign in to comment.