Skip to content

chore(): changed the execution order, init before validate #4

chore(): changed the execution order, init before validate

chore(): changed the execution order, init before validate #4

Workflow file for this run

name: Terraform Deployment
on:
push:
branches:
- setup-workflow
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.8
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Terraform Init
run: cd terraform && terraform init
- name: Terraform Validate
run: cd terraform && terraform validate
- name: Terraform Plan
run: terraform plan -out=plan.tfplan
- name: Terraform Apply
if: github.ref_name == 'setup-workflow'
run: terraform apply -auto-approve plan.tfplan