Skip to content

Commit

Permalink
fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
LamSut committed Oct 16, 2024
1 parent 6ad53c3 commit a48f435
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Terraform Pipeline

on:
push:
branches: [ main ]
branches: [main]

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.0
terraform_version: latest

- name: Cache Terraform modules
uses: actions/cache@v3
Expand All @@ -38,22 +38,22 @@ jobs:
- name: Create Terraform plan (optional)
id: create-plan
run: terraform plan -out=planfile
when: needs.validate.outputs == 'success'
when: needs.validate.outputs == 'success'

- name: Upload plan for review (optional)
uses: actions/upload-artifact@v3
with:
name: terraform-plan
path: planfile
when: needs.create-plan.outputs == 'success'
when: needs.create-plan.outputs == 'success'

- name: Apply Terraform changes (manual approval required)
id: apply-changes
run: terraform apply -input=false planfile
needs: [ validate, create-plan ]
when: github.event.inputs.apply == 'true'
needs: [validate, create-plan]
when: github.event.inputs.apply == 'true'

- name: Destroy Terraform resources (manual approval required)
id: destroy-resources
run: terraform destroy --auto-approve
when: github.event.inputs.destroy == 'true'
when: github.event.inputs.destroy == 'true'

0 comments on commit a48f435

Please sign in to comment.