Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/tf-smurf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
required: false
type: string
description: 'Terraform var file directory. e.g. vars/dev.tfvars'
destroy:
terraform_destroy:
required: false
type: boolean
default: false
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
smurf stf plan --dir=${{ inputs.terraform_directory }}
- name: ⏳ Approval Before Apply
if: inputs.terraform_destroy != 'true'
if: ${{ !inputs.terraform_destroy && !inputs.plan_only }}
uses: trstringer/manual-approval@v1
with:
secret: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -216,15 +216,15 @@ jobs:
issue-title: "Approve Terraform Apply"

- name: πŸš€ Terraform Apply
if: inputs.terraform_destroy != 'true'
if: ${{ !inputs.terraform_destroy && !inputs.plan_only }}
run: |
smurf stf apply --auto-approve --dir=${{ inputs.terraform_directory }}
###############################################
# DESTROY β†’ APPROVAL β†’ DESTROY APPLY
###############################################
terraform-destroy:
if: inputs.terraform_destroy == 'true'
if: ${{ inputs.terraform_destroy == true }}
runs-on: ubuntu-latest

steps:
Expand Down
Loading