diff --git a/docs/feature/terraform-docs.md b/docs/feature/terraform-docs.md new file mode 100644 index 0000000..3044f33 --- /dev/null +++ b/docs/feature/terraform-docs.md @@ -0,0 +1,36 @@ +--- +sidebar_position: 1130 +--- + +# Generate document using `terraform-docs` + +[#1859](https://github.com/suzuki-shunsuke/tfaction/issues/1859) [#1878](https://github.com/suzuki-shunsuke/tfaction/pulls/1878) [v1.8.0](https://github.com/suzuki-shunsuke/tfaction/releases/tag/v1.8.0) + +## How to use + +By default, this feature is disabled. + +tfaction-root.yaml: + +```yaml +terraform_docs: + enabled: true +``` + +tfaction.yaml: + +```yaml +terraform_docs: + enabled: true +``` + +## terraform-docs configuration + +tfaction searches a configuration file: + +1. .terraform-docs.ya?ml in service directory +2. .config/.terraform-docs.ya?ml in service directory +3. .terraform-docs.ya?ml in the repository root directory +4. .config/.terraform-docs.ya?ml in the repository root directory + +https://terraform-docs.io/user-guide/configuration/ diff --git a/docs/overview.md b/docs/overview.md index f823e9d..c9f6a66 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -43,6 +43,7 @@ You don't have to run `terraform apply` in your laptop, and don't have to reinve - [Support Terraform compatible tools such as OpenTofu and Terragrunt](/tfaction/docs/feature/use-terraform-compatible-tool) - [Support running CI on working directories that depend on a updated local path Module](/tfaction/docs/feature/local-path-module) - [Generate code by `terraform plan -generate-config-out` to import resources](/tfaction/docs/feature/generate-config-out) +- [Generate document by terraform-docs](/tfaction/docs/feature/terraform-docs) [Dynamic build matrix for Monorepo](/tfaction/docs/feature/build-matrix)