Skip to content

Commit

Permalink
feat(tf): add destroy step on pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Alves da Silva Gava committed Sep 21, 2024
1 parent 650158d commit 1a044fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ jobs:


- name: Terraform Plan
if: steps.read-destroy.outputs.destroy = 'true'
if: steps.read-destroy.outputs.destroy != 'true'
id: terraform-plan
run: cd infra &&
terraform workspace select ${{ inputs.environment }} || terraform workspace new ${{ inputs.environment }} &&
terraform plan -var-file="./env/${{ inputs.environment }}/terraform.tfvars" -out="${{ inputs.environment }}.plan"

- name: Terraform Apply
if: steps.read-destroy.outputs.destroy = 'true'
if: steps.read-destroy.outputs.destroy != 'true'
id: terraform-apply
run: cd infra &&
terraform workspace select ${{ inputs.environment }} || terraform workspace new ${{ inputs.environment }} &&
Expand Down

0 comments on commit 1a044fa

Please sign in to comment.