Skip to content

ci: adds initial terraform files for test resources #2

ci: adds initial terraform files for test resources

ci: adds initial terraform files for test resources #2

Workflow file for this run

name: Terraform
on:
pull_request:
branches:
- main
paths:
- '.github/terraform/**'
push:
branches:
- main
paths:
- '.github/terraform/**'
jobs:
terraform:
name: fmt - init - plan - apply
runs-on: ubuntu-latest
defaults:
run:
working-directory: .github/terraform
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_APPLY_USER_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_APPLY_USER_AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Terraform fmt
run: terraform fmt -check
- name: Terraform Init
run: terraform init
- name: Terraform Plan
run: terraform plan
- name: Terraform Apply
# if: github.event_name == 'push'
run: terraform apply -auto-approve -input=false