Skip to content

Commit

Permalink
repo features
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 31, 2024
1 parent 01fe111 commit e3c904b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.62.1
hooks:
- id: terraform_validate
- id: terraform_fmt
- id: terraform_docs
args:
- --args=--config=.terraform-docs.yml
# exclude: version.tf
exclude: examples/
- id: terraform_tflint
args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"]
exclude: examples/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-symlinks
- id: detect-aws-credentials
- id: detect-private-key
45 changes: 45 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
formatter: markdown table

header-from: main.tf
footer-from: ""

sections:
## hide: []
show:
- data-sources
- header
- footer
- inputs
- modules
- outputs
- providers
- requirements
- resources

output:
file: README.md
# mode: replace
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
## output-values:
## enabled: false
## from: ""
##
## sort:
## enabled: true
## by: name
##
## settings:
## anchor: true
## color: true
## default: true
## description: false
## escape: true
## indent: 2
## required: true
## sensitive: true
## type: true
21 changes: 21 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
config {
module = true
force = false
disabled_by_default = false

# ignore_module = {
# "terraform-aws-modules/vpc/aws" = true
# "terraform-aws-modules/security-group/aws" = true
# }

# varfile = ["example1.tfvars", "example2.tfvars"]
# variables = ["foo=bar", "bar=[\"baz\"]"]
}

rule "aws_instance_invalid_type" {
enabled = true
}

plugin "aws" {
enabled = true
}

0 comments on commit e3c904b

Please sign in to comment.