Spike/gh actions tf checks #18
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: Check Terraform bootstrap | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
terraform-checks: | |
name: Run terraform bootstrap checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hashicorp/setup-terraform@v2 | |
- name: Check tf gitlab | |
run: | | |
cd terraform/gitlab | |
terraform init -backend=false -lock=false -reconfigure | |
terraform fmt -check | |
terraform validate | |
- name: Check tf terraform-cloud | |
run: | | |
cd terraform/terraform-cloud | |
terraform init -backend=false -lock=false -reconfigure | |
terraform fmt -check | |
terraform validate | |
- name: Check tf vault | |
run: | | |
cd terraform/vault | |
terraform init -backend=false -lock=false -reconfigure | |
terraform fmt -check | |
terraform validate |