Setup eks connections to the database #252
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 checks | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: Environment to deploy to | |
type: environment | |
required: true | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- terraform/** | |
jobs: | |
check-terraform-formatting: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./terraform | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
- name: Check format | |
run: terraform fmt -check -recursive | |
check-terraform-validity: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./terraform | |
env: | |
TERRAFORM_DIRS: | | |
aws/setup | |
aws/implementation | |
azure/setup | |
azure/implementation | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
- name: Terraform Init | |
run: | | |
for d in $TERRAFORM_DIRS | |
do | |
echo "Initializing $d"; | |
(cd $d && terraform init -backend=false) | |
done | |
- name: Terraform Validate | |
run: | | |
for d in $TERRAFORM_DIRS | |
do | |
echo "Validating $d"; | |
(cd $d && terraform validate) | |
done |