Skip to content

Commit

Permalink
add terraform plan validate apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Oloruntobi Olurombi committed Aug 26, 2024
1 parent 9b97653 commit fc0d20b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/eks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,55 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

TerraformPlan:
runs-on: ubuntu-latest
needs: TerraformInit

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Plan Terraform
run: |
terraform plan
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

TerraformValidate:
runs-on: ubuntu-latest
needs: TerraformPlan

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate Terraform
run: |
terraform validate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

TerraformApply:
runs-on: ubuntu-latest
needs: TerraformValidate

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Plan Terraform
run: |
terraform apply
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}




0 comments on commit fc0d20b

Please sign in to comment.