-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: add tflint checks * style: apply consistent comment style
- Loading branch information
Showing
11 changed files
with
165 additions
and
68 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,20 @@ on: | |
env: | ||
TF_ACTIONS_VERSION: latest | ||
jobs: | ||
check-format: | ||
name: Check format | ||
pre-commit-checks: | ||
name: Pre-commit checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hashicorp/setup-terraform@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: "Terraform Format" | ||
run: terraform fmt -check -recursive | ||
|
||
- name: Terraform min/max versions | ||
id: minMax | ||
uses: clowdhaus/[email protected] | ||
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }} | ||
uses: clowdhaus/terraform-composite-actions/[email protected] | ||
with: | ||
terraform-version: ${{ steps.minMax.outputs.maxVersion }} | ||
terraform-docs-version: v0.16.0 | ||
validate-examples: | ||
name: Validate examples | ||
runs-on: ubuntu-latest | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.51.0 | ||
rev: v1.62.3 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
args: | ||
- --args=--config=.terraform-docs.yml | ||
- id: terraform_tflint | ||
exclude: "test/" | ||
args: | ||
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
formatter: "markdown table" | ||
|
||
sections: | ||
show: | ||
- requirements | ||
- providers | ||
- inputs | ||
- outputs | ||
|
||
sort: | ||
enabled: true | ||
by: name | ||
|
||
settings: | ||
default: false | ||
lockfile: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
config { | ||
module = false | ||
force = false | ||
disabled_by_default = false | ||
} | ||
|
||
rule "terraform_deprecated_interpolation" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_deprecated_index" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_unused_declarations" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_comment_syntax" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_documented_outputs" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_documented_variables" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_typed_variables" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_module_pinned_source" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_required_version" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_required_providers" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_standard_module_structure" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_workspace_remote" { | ||
enabled = true | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
variable "region" { | ||
description = "The AWS region in which global resources are set up." | ||
type = string | ||
default = "us-east-1" | ||
} | ||
|
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
variable "region" { | ||
description = "The AWS region in which global resources are set up." | ||
type = string | ||
default = "us-east-1" | ||
} | ||
|
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
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