Skip to content

Commit

Permalink
update terraform-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 2, 2023
1 parent 0f7e9a9 commit 4513094
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
46 changes: 46 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -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: |-
<!-- 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

0 comments on commit 4513094

Please sign in to comment.