Merge pull request #53 from DNXLabs/feature/new_private_and_public_su… #246
Workflow file for this run
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: Lint | |
on: [push] | |
jobs: | |
tflint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.tflint.d/plugins | |
key: tflint-${{ hashFiles('.tflint.hcl') }} | |
- uses: terraform-linters/setup-tflint@v3 | |
- run: tflint --version | |
- run: tflint --init | |
- run: tflint -f compact | |
fmt: | |
name: Code Format | |
runs-on: ubuntu-latest | |
container: | |
image: hashicorp/terraform:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: terraform fmt --recursive -check=true | |
validate: | |
name: Validate | |
runs-on: ubuntu-latest | |
container: | |
image: hashicorp/terraform:1.5.1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate Code | |
env: | |
AWS_REGION: 'us-east-1' | |
TF_WARN_OUTPUT_ERRORS: 1 | |
run: | | |
terraform init | |
terraform validate | |
- name: Validate Examples | |
run: | | |
for example in $(find examples -maxdepth 1 -mindepth 1 -type d); do | |
cd $example | |
terraform init | |
terraform validate | |
cd - | |
done | |
minimum: | |
name: Minimum version check | |
runs-on: ubuntu-latest | |
container: | |
image: hashicorp/terraform:1.5.1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate Code | |
env: | |
AWS_REGION: 'us-east-1' | |
TF_WARN_OUTPUT_ERRORS: 1 | |
run: | | |
sed -i -e 's/>=/=/' -e 's/ \(\d\+\.\d\+\)"/ \1.0"/' versions.tf | |
terraform init | |
terraform validate |