Skip to content

Commit

Permalink
build.yml file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gyenoch committed Aug 15, 2024
1 parent 108f153 commit bed5784
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,33 @@ jobs:

- name: Initialize Terraform
run: terraform init
working-directory: ./Eks-terraform

- name: Validate Terraform
run: terraform validate
working-directory: ./Eks-terraform

- name: Plan Terraform
id: plan
run: terraform plan -out=tfplan
working-directory: ./Eks-terraform

- name: Apply Terraform
if: github.event.inputs.destroy != 'true' && github.ref == 'refs/heads/main'
run: terraform apply -auto-approve tfplan
working-directory: ./Eks-terraform

- name: Save Terraform Plan
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: terraform-plan
path: tfplan
path: ./Eks-terraform/tfplan

- name: Terraform Destroy
if: github.event.inputs.destroy == 'true'
run: terraform destroy -auto-approve
working-directory: ./Eks-terraform

deploy:
needs: terraform
Expand Down

0 comments on commit bed5784

Please sign in to comment.