diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28e692d..2b7e68b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,28 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.50.0 + rev: v1.83.5 hooks: # - id: terraform_validate - id: terraform_fmt - - id: terraform_docs_replace - args: ['table'] +# - id: terraform_docs_replace +# args: ['table'] +# exclude: common/*.tf +# exclude: version.tf +# exclude: examples + - id: terraform_docs exclude: common/*.tf exclude: version.tf exclude: examples + args: + - --args=--config=.terraform-docs.yml # - id: terraform_tflint # args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] -# exclude: cloudtrail_orig # exclude: examples + - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.5.0 hooks: - id: check-symlinks - id: detect-aws-credentials + args: [ "--allow-missing-credentials" ] - id: detect-private-key diff --git a/.terraform-docs.yml b/.terraform-docs.yml new file mode 100644 index 0000000..227afcc --- /dev/null +++ b/.terraform-docs.yml @@ -0,0 +1,46 @@ +## https://github.com/antonbabenko/pre-commit-terraform/issues/248#issuecomment-1290829226 +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: inject + template: |- + + {{ .Content }} + + +## 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 +