chore(): added the working dir #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Deployment | ||
on: | ||
push: | ||
branches: | ||
- setup-workflow | ||
jobs: | ||
terraform: | ||
runs-on: ubuntu-latest | ||
run tasks: cd terraform | ||
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: terraform init | ||
- name: Terraform Validate | ||
run: terraform validate | ||
- name: Terraform Plan | ||
run: terraform plan -out=plan.tfplan | ||
- name: Terraform Apply | ||
run: terraform apply -auto-approve plan.tfplan | ||