-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AZ-989: Update all common files and
pre-commit
configs
- Loading branch information
Showing
9 changed files
with
211 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
# This file is automatically maintained within this module repository -- DO NOT EDIT | ||
formatter: "markdown" | ||
|
||
settings: | ||
anchor: false | ||
lockfile: false | ||
|
||
output: | ||
file: "README.md" | ||
|
||
sections: | ||
hide: [requirements] | ||
|
||
content: |- | ||
## Global versioning rule for Claranet Azure modules | ||
| Module version | Terraform version | AzureRM version | | ||
| -------------- | ----------------- | --------------- | | ||
| >= 7.x.x | 1.3.x | >= 3.0 | | ||
| >= 6.x.x | 1.x | >= 3.0 | | ||
| >= 5.x.x | 0.15.x | >= 2.0 | | ||
| >= 4.x.x | 0.13.x / 0.14.x | >= 2.0 | | ||
| >= 3.x.x | 0.12.x | >= 2.0 | | ||
| >= 2.x.x | 0.12.x | < 2.0 | | ||
| < 2.x.x | 0.11.x | < 2.0 | | ||
## Contributing | ||
If you want to contribute to this repository, feel free to use our [pre-commit](https://pre-commit.com/) git hook configuration | ||
which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices. | ||
More details are available in the [CONTRIBUTING.md](./CONTRIBUTING.md#pull-request-process) file. | ||
## Usage | ||
This module is optimized to work with the [Claranet terraform-wrapper](https://github.com/claranet/terraform-wrapper) tool | ||
which set some terraform variables in the environment needed by this module. | ||
More details about variables set by the `terraform-wrapper` available in the [documentation](https://github.com/claranet/terraform-wrapper#environment). | ||
```hcl | ||
{{ include "examples/main/modules.tf" }} | ||
``` | ||
{{ .Providers }} | ||
{{ .Modules }} | ||
{{ .Resources }} | ||
{{ .Inputs }} | ||
{{ .Outputs }} | ||
... |
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,66 @@ | ||
plugin "azurerm" { | ||
enabled = true | ||
source = "github.com/terraform-linters/tflint-ruleset-azurerm" | ||
version = "0.20.0" | ||
} | ||
|
||
config { | ||
module = true | ||
force = false | ||
disabled_by_default = false | ||
|
||
varfile = ["terraform.tfvars.ci"] | ||
} | ||
|
||
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_naming_convention" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_required_version" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_required_providers" { | ||
enabled = true | ||
} | ||
|
||
rule "terraform_unused_required_providers" { | ||
enabled = true | ||
} | ||
|
||
# Disabled since we have files like "variables-xxxx.tf" instead of a single "variables.tf" | ||
rule "terraform_standard_module_structure" { | ||
enabled = 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 @@ | ||
* @bzspi @shr3ps @rossifumax @jmapro @maxpoullain |
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,5 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
ci: | ||
uses: claranet/terraform-modules-ci/.github/workflows/ci-modules.yaml@main |
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,29 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-json | ||
- id: check-yaml | ||
args: | ||
- --unsafe | ||
- id: check-symlinks | ||
- id: check-added-large-files | ||
- id: detect-private-key | ||
|
||
- repo: https://github.com/antonbabenko/pre-commit-terraform.git | ||
rev: v1.77.1 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
args: | ||
- --args=--config=.config/terraform-docs.yml | ||
- id: terraform_validate | ||
exclude: ^examples | ||
- id: terraform_tflint | ||
exclude: ^examples | ||
args: | ||
- --args=--config=__GIT_WORKING_DIR__/.config/tflint.hcl | ||
- --env-vars=TFLINT_LOG="info" | ||
- id: terraform_tfsec |
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
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