Add tflint to pipelines (#2220)
* Fix terraform_deprecated_index https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md * Fix terraform_deprecated_interpolation Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_interpolation.md * Fix more indexing * Remove unused variable * Enable TFLint for modules * Add tflint config file * Fix chdir * Lint modules * TFLint fixes * TFLint * Fixes binauthz README * Fixes DNS response policy tests. Restores MIG outputs. * Fixes other DNS response policy tests. * Update tests for fast 2-e * Moar fixed tests --------- Co-authored-by: Simone Ruffilli <sruffilli@google.com>
This commit is contained in:
16
.github/workflows/linting.yml
vendored
16
.github/workflows/linting.yml
vendored
@@ -36,6 +36,19 @@ jobs:
|
||||
with:
|
||||
terraform_version: 1.7.4
|
||||
|
||||
- uses: terraform-linters/setup-tflint@v4
|
||||
name: Setup TFLint
|
||||
with:
|
||||
tflint_version: v0.50.3
|
||||
|
||||
- name: Init TFLint
|
||||
run: |
|
||||
cp .tflint.hcl ~
|
||||
tflint --init
|
||||
env:
|
||||
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r tools/requirements.txt
|
||||
@@ -50,6 +63,9 @@ jobs:
|
||||
run: |
|
||||
terraform fmt -recursive -check -diff $GITHUB_WORKSPACE
|
||||
|
||||
- name: TFLint Modules
|
||||
run: cd modules && tflint --recursive -f compact
|
||||
|
||||
- name: Check documentation
|
||||
id: documentation-fabric
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user