{"id":13707203,"url":"https://github.com/cytopia/docker-terraform-docs","last_synced_at":"2025-04-07T17:09:00.914Z","repository":{"id":35955006,"uuid":"188453411","full_name":"cytopia/docker-terraform-docs","owner":"cytopia","description":"Alpine-based multistage-build version of terraform-docs and terraform-docs-replace in multiple versions to be used for CI and other reproducible automations","archived":false,"fork":false,"pushed_at":"2025-03-12T10:20:49.000Z","size":289,"stargazers_count":63,"open_issues_count":3,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T14:14:37.732Z","etag":null,"topics":["alpine","awesome-ci","ci","continuous-integration","docker","docker-container","docker-image","dockerfile","multistage","multistage-docker","terraform","terraform-docs"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytopia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["cytopia"]}},"created_at":"2019-05-24T16:18:18.000Z","updated_at":"2025-03-12T10:20:43.000Z","dependencies_parsed_at":"2024-02-08T04:35:15.765Z","dependency_job_id":"119c520c-7148-4208-8c6e-ff018cb699c1","html_url":"https://github.com/cytopia/docker-terraform-docs","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-terraform-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-terraform-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-terraform-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-terraform-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytopia","download_url":"https://codeload.github.com/cytopia/docker-terraform-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","awesome-ci","ci","continuous-integration","docker","docker-container","docker-image","dockerfile","multistage","multistage-docker","terraform","terraform-docs"],"created_at":"2024-08-02T22:01:24.254Z","updated_at":"2025-04-07T17:09:00.887Z","avatar_url":"https://github.com/cytopia.png","language":"HCL","funding_links":["https://github.com/sponsors/cytopia"],"categories":["HCL"],"sub_categories":[],"readme":"# Docker image for `terraform-docs`\n\n[![Tag](https://img.shields.io/github/tag/cytopia/docker-terraform-docs.svg)](https://github.com/cytopia/docker-terraform-docs/releases)\n[![](https://img.shields.io/badge/github-cytopia%2Fdocker--terraform--docs-red.svg)](https://github.com/cytopia/docker-terraform-docs \"github.com/cytopia/docker-terraform-docs\")\n[![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT)\n\n[![lint](https://github.com/cytopia/docker-terraform-docs/workflows/lint/badge.svg)](https://github.com/cytopia/docker-terraform-docs/actions?query=workflow%3Alint)\n[![build](https://github.com/cytopia/docker-terraform-docs/workflows/build/badge.svg)](https://github.com/cytopia/docker-terraform-docs/actions?query=workflow%3Abuild)\n[![nightly](https://github.com/cytopia/docker-terraform-docs/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-terraform-docs/actions?query=workflow%3Anightly)\n\n\n\u003e #### All [#awesome-ci](https://github.com/topics/awesome-ci) Docker images\n\u003e\n\u003e [ansible-lint][alint-git-lnk] **•**\n\u003e [ansible][ansible-git-lnk] **•**\n\u003e [awesome-ci][aci-git-lnk] **•**\n\u003e [bandit][bandit-git-lnk] **•**\n\u003e [black][black-git-lnk] **•**\n\u003e [checkmake][cm-git-lnk] **•**\n\u003e [eslint][elint-git-lnk] **•**\n\u003e [file-lint][flint-git-lnk] **•**\n\u003e [gofmt][gfmt-git-lnk] **•**\n\u003e [goimports][gimp-git-lnk] **•**\n\u003e [golint][glint-git-lnk] **•**\n\u003e [jsonlint][jlint-git-lnk] **•**\n\u003e [kubeval][kubeval-git-lnk] **•**\n\u003e [linkcheck][linkcheck-git-lnk] **•**\n\u003e [mypy][mypy-git-lnk] **•**\n\u003e [php-cs-fixer][pcsf-git-lnk] **•**\n\u003e [phpcbf][pcbf-git-lnk] **•**\n\u003e [phpcs][pcs-git-lnk] **•**\n\u003e [phplint][plint-git-lnk] **•**\n\u003e [pycodestyle][pycs-git-lnk] **•**\n\u003e [pydocstyle][pyds-git-lnk] **•**\n\u003e [pylint][pylint-git-lnk] **•**\n\u003e [terraform-docs][tfdocs-git-lnk] **•**\n\u003e [terragrunt-fmt][tgfmt-git-lnk] **•**\n\u003e [terragrunt][tg-git-lnk] **•**\n\u003e [yamlfmt][yfmt-git-lnk] **•**\n\u003e [yamllint][ylint-git-lnk]\n\nView **[Dockerfiles](https://github.com/cytopia/docker-terraform-docs/blob/master/Dockerfiles/)** on GitHub.\n\n\n**Available Architectures:**  `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`\n\nTiny Alpine-based multistage-build dockerized version of [terraform-docs](https://github.com/terraform-docs/terraform-docs)\u003csup\u003e[1]\u003c/sup\u003e,\nwhich additionally implements `terraform-docs-replace` allowing you to automatically and safely\nreplace the `terraform-docs` generated output infile.\nFurthermore this implementation is also **Terraform \u003e= 0.12 ready**\u003csup\u003e[2]\u003c/sup\u003e. See [Generic Usage](#generic) for more details.\nThe image is built nightly against multiple stable versions and pushed to Dockerhub.\n\n* \u003csub\u003e[1] Official project: https://github.com/terraform-docs/terraform-docs\u003c/sub\u003e\n* \u003csub\u003e[2] Based on an awk script by [cloudposse/build-harness](https://github.com/cloudposse/build-harness/blob/master/bin/terraform-docs.awk)\u003c/sub\u003e\n\n## :whale: Available Docker image versions\n\n[![](https://img.shields.io/docker/pulls/cytopia/terraform-docs.svg)](https://hub.docker.com/r/cytopia/terraform-docs)\n[![Docker](https://badgen.net/badge/icon/:latest?icon=docker\u0026label=cytopia/terraform-docs)](https://hub.docker.com/r/cytopia/terraform-docs)\n\n#### Rolling releaess\n\nThe following Docker image tags are rolling releases and are built and updated every night.\n\n[![nightly](https://github.com/cytopia/docker-terraform-docs/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-terraform-docs/actions?query=workflow%3Anightly)\n\n| Docker Tag | Git Ref   | Terraform Docs | Available Architectures                      |\n|------------|-----------|----------------|----------------------------------------------|\n| `latest`   | master    | latest         | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.19.0`   | master    | **`0.19.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.18.0`   | master    | **`0.18.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.17.0`   | master    | **`0.17.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.16.0`   | master    | **`0.16.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.15.0`   | master    | **`0.15.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.14.1`   | master    | **`0.14.1`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.14.0`   | master    | **`0.14.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.13.0`   | master    | **`0.13.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.12.1`   | master    | **`0.12.1`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.12.0`   | master    | **`0.12.0`**   | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.11.2`   | master    | **`0.11.2`**   | `amd64`                                      |\n| `0.11.1`   | master    | **`0.11.1`**   | `amd64`                                      |\n| `0.11.0`   | master    | **`0.11.0`**   | `amd64`                                      |\n| `0.10.1`   | master    | **`0.10.1`**   | `amd64`                                      |\n| `0.10.0`   | master    | **`0.10.0`**   | `amd64`                                      |\n| `0.9.1`    | master    | **`0.9.1`**    | `amd64`                                      |\n| `0.9.0`    | master    | **`0.9.0`**    | `amd64`                                      |\n| `0.8.2`    | master    | **`0.8.2`**    | `amd64`                                      |\n| `0.8.1`    | master    | **`0.8.1`**    | `amd64`                                      |\n| `0.8.0`    | master    | **`0.8.0`**    | `amd64`                                      |\n| `0.7.0`    | master    | **`0.7.0`**    | `amd64`                                      |\n| `0.6.0`    | master    | **`0.6.0`**    | `amd64`                                      |\n| `0.5.0`    | master    | **`0.5.0`**    | `amd64`                                      |\n| `0.4.5`    | master    | **`0.4.5`**    | `amd64`                                      |\n| `0.4.0`    | master    | **`0.4.0`**    | `amd64`                                      |\n| `0.3.0`    | master    | **`0.3.0`**    | `amd64`                                      |\n| `0.2.0`    | master    | **`0.2.0`**    | `amd64`                                      |\n| `0.1.1`    | master    | **`0.1.1`**    | `amd64`                                      |\n| `0.1.0`    | master    | **`0.1.0`**    | `amd64`                                      |\n\n\n#### Point in time releases\n\nThe following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.\n\n[![build](https://github.com/cytopia/docker-terraform-docs/workflows/build/badge.svg)](https://github.com/cytopia/docker-terraform-docs/actions?query=workflow%3Abuild)\n\n\n| Docker Tag           | Git Ref   | Terraform Docs | Available Architectures                      |\n|----------------------|-----------|--------------|----------------------------------------------|\n| `latest-0.32`        | tag: 0.32 | latest       | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.16.0-0.32`        | tag: 0.32 | **`0.16.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.15.0-0.32`        | tag: 0.32 | **`0.15.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.14.1-0.32`        | tag: 0.32 | **`0.14.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.14.0-0.32`        | tag: 0.32 | **`0.14.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.13.0-0.32`        | tag: 0.32 | **`0.13.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.12.1-0.32`        | tag: 0.32 | **`0.12.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.12.0-0.32`        | tag: 0.32 | **`0.12.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` |\n| `0.11.2-0.32`        | tag: 0.32 | **`0.11.2`** | `amd64`                                      |\n| `0.11.1-0.32`        | tag: 0.32 | **`0.11.1`** | `amd64`                                      |\n| `0.11.0-0.32`        | tag: 0.32 | **`0.11.0`** | `amd64`                                      |\n| `0.10.1-0.32`        | tag: 0.32 | **`0.10.1`** | `amd64`                                      |\n| `0.10.0-0.32`        | tag: 0.32 | **`0.10.0`** | `amd64`                                      |\n| `0.9.1-0.32`         | tag: 0.32 | **`0.9.1`**  | `amd64`                                      |\n| `0.9.0-0.32`         | tag: 0.32 | **`0.9.0`**  | `amd64`                                      |\n| `0.8.2-0.32`         | tag: 0.32 | **`0.8.2`**  | `amd64`                                      |\n| `0.8.1-0.32`         | tag: 0.32 | **`0.8.1`**  | `amd64`                                      |\n| `0.8.0-0.32`         | tag: 0.32 | **`0.8.0`**  | `amd64`                                      |\n| `0.7.0-0.32`         | tag: 0.32 | **`0.7.0`**  | `amd64`                                      |\n| `0.6.0-0.32`         | tag: 0.32 | **`0.6.0`**  | `amd64`                                      |\n| `0.5.0-0.32`         | tag: 0.32 | **`0.5.0`**  | `amd64`                                      |\n| `0.4.5-0.32`         | tag: 0.32 | **`0.4.5`**  | `amd64`                                      |\n| `0.4.0-0.32`         | tag: 0.32 | **`0.4.0`**  | `amd64`                                      |\n| `0.3.0-0.32`         | tag: 0.32 | **`0.3.0`**  | `amd64`                                      |\n| `0.2.0-0.32`         | tag: 0.32 | **`0.2.0`**  | `amd64`                                      |\n| `0.1.1-0.32`         | tag: 0.32 | **`0.1.1`**  | `amd64`                                      |\n| `0.1.0-0.32`         | tag: 0.32 | **`0.1.0`**  | `amd64`                                      |\n\n\n\n## :capital_abcd: Environment variables\n\nThe following Docker environment variables are available. These will only need to be used when\nusing `terraform-docs-replace` or `terraform-docs-replace-012`.\n\n| Variable | Default | Required | Comment |\n|----------|---------|----------|---------|\n| DELIM_START | `\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e` | No | The starting delimiter in the file in where you want to replace the `terraform-docs` output. |\n| DELIM_CLOSE | `\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e` | No | The ending delimiter in the file in where you want to replace the `terraform-docs` output. |\n\n\n## :open_file_folder: Docker mounts\n\nThe working directory inside the Docker container is **`/data/`** and should be mounted locally to\nwhere your Terraform module is located.\n\n\n## :computer: Usage\n\n### Generic\n```bash\nUsage: cytopia/terraform-docs terraform-docs \u003cARGS\u003e .\n       cytopia/terraform-docs terraform-docs-012 \u003cARGS\u003e .\n\n       cytopia/terraform-docs terraform-docs-replace \u003cARGS\u003e \u003cPATH-TO-FILE\u003e\n       cytopia/terraform-docs terraform-docs-replace-012 \u003cARGS\u003e \u003cPATH-TO-FILE\u003e\n\n\nterraform-docs              Output as expected from terraform-docs\nterraform-docs-012          Same as above, but used for Terraform \u003e= 0.12 modules\n\nterraform-docs-replace      Replaces directly inside README.md, if DELIM_START and DELIM_CLOSE are found.\nterraform-docs-replace-012  Same as above, but used for Terraform \u003e= 0.12 modules\n\n\u003cARGS\u003e                      All arguments terraform-docs command can use.\n\u003cPATH-TO-FILE\u003e              File in where to auto-replace terraform-docs block.\n```\n\n### Output to stdout\nCreate markdown output and sent to stdout:\n```bash\n# [Terraform \u003c 0.12]\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs --sort-by-required md .\n\n# [Terraform \u003e= 0.12]\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs-012 --sort-by-required md .\n```\n\n### Store in file\nCreate README.md with `terraform-docs` output:\n```bash\n# [Terraform \u003c 0.12]\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs --sort-by-required md . \u003e README.md\n\n# [Terraform \u003e= 0.12]\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs-012 --sort-by-required md . \u003e README.md\n```\n\n### Replace in README.md\nReplace current `terraform-docs` blocks in README.md with current one in order to automatically\nkeep it up to date. For this to work, the `terraform-docs` information must be wrapped with the\nfollowing delimiter by default:\n\n`README.md:`\n```markdown\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Inputs\n...\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n```\n\n```bash\n# [Terraform \u003c 0.12]\n# Path to README.md must be specified as last command.\n# Note that the command changes from terraform-docs to terraform-docs-replace\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs-replace --sort-by-required md README.md\n\n# [Terraform \u003e= 0.12]\n# Path to README.md must be specified as last command.\n# Note that the command changes from terraform-docs to terraform-docs-replace\ndocker run --rm \\\n  -v $(pwd):/data \\\n  cytopia/terraform-docs \\\n  terraform-docs-replace-012 --sort-by-required md README.md\n```\n\n### Replace in INFO.md with different delimiter\nYou are able to use different delimiter. Let's imagine the following delimiter:\n\n`INFO.md:`\n```markdown\n\u003c!-- TFDOC_START --\u003e\n## Inputs\n...\n\u003c!-- TFDOC_END --\u003e\n```\n\n```bash\n# [Terraform \u003c 0.12]\n# Path to INFO.md must be specified as last command.\n# Note that the command changes from terraform-docs to terraform-docs-replace\ndocker run --rm \\\n  -v $(pwd):/data \\\n  -e DELIM_START='\u003c!-- TFDOC_START --\u003e' \\\n  -e DELIM_CLOSE='\u003c!-- TFDOC_END --\u003e' \\\n  cytopia/terraform-docs \\\n  terraform-docs-replace --sort-by-required md INFO.md\n\n# [Terraform \u003e= 0.12]\n# Path to INFO.md must be specified as last command.\n# Note that the command changes from terraform-docs to terraform-docs-replace\ndocker run --rm \\\n  -v $(pwd):/data \\\n  -e DELIM_START='\u003c!-- TFDOC_START --\u003e' \\\n  -e DELIM_CLOSE='\u003c!-- TFDOC_END --\u003e' \\\n  cytopia/terraform-docs \\\n  terraform-docs-replace-012 --sort-by-required md INFO.md\n```\n\n### Example Makefile\nYou can add the following Makefile to your project for easy generation of terraform-docs output in\na Terraform module. It takes into consideration the Main module, sub-modules and examples.\n\n```make\nifneq (,)\n.error This Makefile requires GNU Make.\nendif\n\n.PHONY: gen _gen-main _gen-examples _gen-modules _update-tf-docs\n\nCURRENT_DIR     = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))\nTF_EXAMPLES     = $(sort $(dir $(wildcard $(CURRENT_DIR)examples/*/)))\nTF_MODULES      = $(sort $(dir $(wildcard $(CURRENT_DIR)modules/*/)))\nTF_DOCS_VERSION = 0.6.0\n\n# Adjust your delimiter here or overwrite via make arguments\nDELIM_START = \u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\nDELIM_CLOSE = \u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\ngen: _update-tf-docs\n\t@echo \"################################################################################\"\n\t@echo \"# Terraform-docs generate\"\n\t@echo \"################################################################################\"\n\t@$(MAKE) --no-print-directory _gen-main\n\t@$(MAKE) --no-print-directory _gen-examples\n\t@$(MAKE) --no-print-directory _gen-modules\n\n_gen-main:\n\t@echo \"------------------------------------------------------------\"\n\t@echo \"# Main module\"\n\t@echo \"------------------------------------------------------------\"\n\t@if docker run --rm \\\n\t\t-v $(CURRENT_DIR):/data \\\n\t\t-e DELIM_START='$(DELIM_START)' \\\n\t\t-e DELIM_CLOSE='$(DELIM_CLOSE)' \\\n\t\tcytopia/terraform-docs:$(TF_DOCS_VERSION) \\\n\t\tterraform-docs-replace --sort-by-required md README.md; then \\\n\t\techo \"OK\"; \\\n\telse \\\n\t\techo \"Failed\"; \\\n\t\texit 1; \\\n\tfi\n\n_gen-examples:\n\t@$(foreach example,\\\n\t\t$(TF_EXAMPLES),\\\n\t\tDOCKER_PATH=\"examples/$(notdir $(patsubst %/,%,$(example)))\"; \\\n\t\techo \"------------------------------------------------------------\"; \\\n\t\techo \"# $${DOCKER_PATH}\"; \\\n\t\techo \"------------------------------------------------------------\"; \\\n\t\tif docker run --rm \\\n\t\t\t-v $(CURRENT_DIR):/data \\\n\t\t\t-e DELIM_START='$(DELIM_START)' \\\n\t\t\t-e DELIM_CLOSE='$(DELIM_CLOSE)' \\\n\t\t\tcytopia/terraform-docs:$(TF_DOCS_VERSION) \\\n\t\t\tterraform-docs-replace --sort-by-required md $${DOCKER_PATH}/README.md; then \\\n\t\t\techo \"OK\"; \\\n\t\telse \\\n\t\t\techo \"Failed\"; \\\n\t\t\texit 1; \\\n\t\tfi; \\\n\t)\n\n_gen-modules:\n\t@$(foreach module,\\\n\t\t$(TF_MODULES),\\\n\t\tDOCKER_PATH=\"modules/$(notdir $(patsubst %/,%,$(module)))\"; \\\n\t\techo \"------------------------------------------------------------\"; \\\n\t\techo \"# $${DOCKER_PATH}\"; \\\n\t\techo \"------------------------------------------------------------\"; \\\n\t\tif docker run --rm \\\n\t\t\t-v $(CURRENT_DIR):/data \\\n\t\t\t-e DELIM_START='$(DELIM_START)' \\\n\t\t\t-e DELIM_CLOSE='$(DELIM_CLOSE)' \\\n\t\t\tcytopia/terraform-docs:$(TF_DOCS_VERSION) \\\n\t\t\tterraform-docs-replace --sort-by-required md $${DOCKER_PATH}/README.md; then \\\n\t\t\techo \"OK\"; \\\n\t\telse \\\n\t\t\techo \"Failed\"; \\\n\t\t\texit 1; \\\n\t\tfi; \\\n\t)\n\n_update-tf-docs:\n\tdocker pull cytopia/terraform-docs:$(TF_DOCS_VERSION)\n```\n\n### Travis CI integration\nWith the above Makefile in place, you can easily add a Travis CI rule to ensure the terraform-docs\noutput is always up-to-date and will fail otherwise (due to git changes):\n```yml\n---\nsudo: required\nlanguage: minimal\nservices:\n  - docker\nscript:\n  - make gen\n  - git diff --quiet || { echo \"Build Changes\"; git diff; git status; false; }\n```\n\n\n## :information_source: Example projects\n\nFind below some example projects how this Docker image is used in CI to verify if the README.md has\nbeen updated with the latest changes generated from `terraform-docs`:\n\n* https://github.com/cytopia/terraform-aws-rds/blob/master/Makefile\n* https://github.com/Flaconi/terraform-aws-microservice/blob/master/Makefile\n\n\n## Related [#awesome-ci](https://github.com/topics/awesome-ci) projects\n\n### Docker images\n\nSave yourself from installing lot's of dependencies and pick a dockerized version of your favourite\nlinter below for reproducible local or remote CI tests:\n\n| GitHub | DockerHub | Type | Description |\n|--------|-----------|------|-------------|\n| [awesome-ci][aci-git-lnk]        | [![aci-hub-img]][aci-hub-lnk]         | Basic      | Tools for git, file and static source code analysis |\n| [file-lint][flint-git-lnk]       | [![flint-hub-img]][flint-hub-lnk]     | Basic      | Baisc source code analysis |\n| [linkcheck][linkcheck-git-lnk]   | [![linkcheck-hub-img]][flint-hub-lnk] | Basic      | Search for URLs in files and validate their HTTP status code |\n| [ansible][ansible-git-lnk]       | [![ansible-hub-img]][ansible-hub-lnk] | Ansible    | Multiple versions and flavours of Ansible |\n| [ansible-lint][alint-git-lnk]    | [![alint-hub-img]][alint-hub-lnk]     | Ansible    | Lint Ansible |\n| [gofmt][gfmt-git-lnk]            | [![gfmt-hub-img]][gfmt-hub-lnk]       | Go         | Format Go source code **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [goimports][gimp-git-lnk]        | [![gimp-hub-img]][gimp-hub-lnk]       | Go         | Format Go source code **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [golint][glint-git-lnk]          | [![glint-hub-img]][glint-hub-lnk]     | Go         | Lint Go code |\n| [eslint][elint-git-lnk]          | [![elint-hub-img]][elint-hub-lnk]     | Javascript | Lint Javascript code |\n| [jsonlint][jlint-git-lnk]        | [![jlint-hub-img]][jlint-hub-lnk]     | JSON       | Lint JSON files **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [kubeval][kubeval-git-lnk]       | [![kubeval-hub-img]][kubeval-hub-lnk] | K8s        | Lint Kubernetes files |\n| [checkmake][cm-git-lnk]          | [![cm-hub-img]][cm-hub-lnk]           | Make       | Lint Makefiles |\n| [phpcbf][pcbf-git-lnk]           | [![pcbf-hub-img]][pcbf-hub-lnk]       | PHP        | PHP Code Beautifier and Fixer |\n| [phpcs][pcs-git-lnk]             | [![pcs-hub-img]][pcs-hub-lnk]         | PHP        | PHP Code Sniffer |\n| [phplint][plint-git-lnk]         | [![plint-hub-img]][plint-hub-lnk]     | PHP        | PHP Code Linter **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [php-cs-fixer][pcsf-git-lnk]     | [![pcsf-hub-img]][pcsf-hub-lnk]       | PHP        | PHP Coding Standards Fixer |\n| [bandit][bandit-git-lnk]         | [![bandit-hub-img]][bandit-hub-lnk]   | Python     | A security linter from PyCQA\n| [black][black-git-lnk]           | [![black-hub-img]][black-hub-lnk]     | Python     | The uncompromising Python code formatter |\n| [mypy][mypy-git-lnk]             | [![mypy-hub-img]][mypy-hub-lnk]       | Python     | Static source code analysis |\n| [pycodestyle][pycs-git-lnk]      | [![pycs-hub-img]][pycs-hub-lnk]       | Python     | Python style guide checker |\n| [pydocstyle][pyds-git-lnk]       | [![pyds-hub-img]][pyds-hub-lnk]       | Python     | Python docstyle checker |\n| [pylint][pylint-git-lnk]         | [![pylint-hub-img]][pylint-hub-lnk]   | Python     | Python source code, bug and quality checker |\n| [terraform-docs][tfdocs-git-lnk] | [![tfdocs-hub-img]][tfdocs-hub-lnk]   | Terraform  | Terraform doc generator (TF 0.12 ready) **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [terragrunt][tg-git-lnk]         | [![tg-hub-img]][tg-hub-lnk]           | Terraform  | Terragrunt and Terraform |\n| [terragrunt-fmt][tgfmt-git-lnk]  | [![tgfmt-hub-img]][tgfmt-hub-lnk]     | Terraform  | `terraform fmt` for Terragrunt files **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [yamlfmt][yfmt-git-lnk]          | [![yfmt-hub-img]][yfmt-hub-lnk]       | Yaml       | Format Yaml files **\u003csup\u003e[1]\u003c/sup\u003e** |\n| [yamllint][ylint-git-lnk]        | [![ylint-hub-img]][ylint-hub-lnk]     | Yaml       | Lint Yaml files |\n\n\u003e **\u003csup\u003e[1]\u003c/sup\u003e** Uses a shell wrapper to add **enhanced functionality** not available by original project.\n\n[aci-git-lnk]: https://github.com/cytopia/awesome-ci\n[aci-hub-img]: https://img.shields.io/docker/pulls/cytopia/awesome-ci.svg\n[aci-hub-lnk]: https://hub.docker.com/r/cytopia/awesome-ci\n\n[flint-git-lnk]: https://github.com/cytopia/docker-file-lint\n[flint-hub-img]: https://img.shields.io/docker/pulls/cytopia/file-lint.svg\n[flint-hub-lnk]: https://hub.docker.com/r/cytopia/file-lint\n\n[linkcheck-git-lnk]: https://github.com/cytopia/docker-linkcheck\n[linkcheck-hub-img]: https://img.shields.io/docker/pulls/cytopia/linkcheck.svg\n[linkcheck-hub-lnk]: https://hub.docker.com/r/cytopia/linkcheck\n\n[jlint-git-lnk]: https://github.com/cytopia/docker-jsonlint\n[jlint-hub-img]: https://img.shields.io/docker/pulls/cytopia/jsonlint.svg\n[jlint-hub-lnk]: https://hub.docker.com/r/cytopia/jsonlint\n\n[ansible-git-lnk]: https://github.com/cytopia/docker-ansible\n[ansible-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible.svg\n[ansible-hub-lnk]: https://hub.docker.com/r/cytopia/ansible\n\n[alint-git-lnk]: https://github.com/cytopia/docker-ansible-lint\n[alint-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible-lint.svg\n[alint-hub-lnk]: https://hub.docker.com/r/cytopia/ansible-lint\n\n[kubeval-git-lnk]: https://github.com/cytopia/docker-kubeval\n[kubeval-hub-img]: https://img.shields.io/docker/pulls/cytopia/kubeval.svg\n[kubeval-hub-lnk]: https://hub.docker.com/r/cytopia/kubeval\n\n[gfmt-git-lnk]: https://github.com/cytopia/docker-gofmt\n[gfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/gofmt.svg\n[gfmt-hub-lnk]: https://hub.docker.com/r/cytopia/gofmt\n\n[gimp-git-lnk]: https://github.com/cytopia/docker-goimports\n[gimp-hub-img]: https://img.shields.io/docker/pulls/cytopia/goimports.svg\n[gimp-hub-lnk]: https://hub.docker.com/r/cytopia/goimports\n\n[glint-git-lnk]: https://github.com/cytopia/docker-golint\n[glint-hub-img]: https://img.shields.io/docker/pulls/cytopia/golint.svg\n[glint-hub-lnk]: https://hub.docker.com/r/cytopia/golint\n\n[elint-git-lnk]: https://github.com/cytopia/docker-eslint\n[elint-hub-img]: https://img.shields.io/docker/pulls/cytopia/eslint.svg\n[elint-hub-lnk]: https://hub.docker.com/r/cytopia/eslint\n\n[cm-git-lnk]: https://github.com/cytopia/docker-checkmake\n[cm-hub-img]: https://img.shields.io/docker/pulls/cytopia/checkmake.svg\n[cm-hub-lnk]: https://hub.docker.com/r/cytopia/checkmake\n\n[pcbf-git-lnk]: https://github.com/cytopia/docker-phpcbf\n[pcbf-hub-img]: https://img.shields.io/docker/pulls/cytopia/phpcbf.svg\n[pcbf-hub-lnk]: https://hub.docker.com/r/cytopia/phpcbf\n\n[pcs-git-lnk]: https://github.com/cytopia/docker-phpcs\n[pcs-hub-img]: https://img.shields.io/docker/pulls/cytopia/phpcs.svg\n[pcs-hub-lnk]: https://hub.docker.com/r/cytopia/phpcs\n\n[plint-git-lnk]: https://github.com/cytopia/docker-phplint\n[plint-hub-img]: https://img.shields.io/docker/pulls/cytopia/phplint.svg\n[plint-hub-lnk]: https://hub.docker.com/r/cytopia/phplint\n\n[pcsf-git-lnk]: https://github.com/cytopia/docker-php-cs-fixer\n[pcsf-hub-img]: https://img.shields.io/docker/pulls/cytopia/php-cs-fixer.svg\n[pcsf-hub-lnk]: https://hub.docker.com/r/cytopia/php-cs-fixer\n\n[bandit-git-lnk]: https://github.com/cytopia/docker-bandit\n[bandit-hub-img]: https://img.shields.io/docker/pulls/cytopia/bandit.svg\n[bandit-hub-lnk]: https://hub.docker.com/r/cytopia/bandit\n\n[black-git-lnk]: https://github.com/cytopia/docker-black\n[black-hub-img]: https://img.shields.io/docker/pulls/cytopia/black.svg\n[black-hub-lnk]: https://hub.docker.com/r/cytopia/black\n\n[mypy-git-lnk]: https://github.com/cytopia/docker-mypy\n[mypy-hub-img]: https://img.shields.io/docker/pulls/cytopia/mypy.svg\n[mypy-hub-lnk]: https://hub.docker.com/r/cytopia/mypy\n\n[pycs-git-lnk]: https://github.com/cytopia/docker-pycodestyle\n[pycs-hub-img]: https://img.shields.io/docker/pulls/cytopia/pycodestyle.svg\n[pycs-hub-lnk]: https://hub.docker.com/r/cytopia/pycodestyle\n\n[pyds-git-lnk]: https://github.com/cytopia/docker-pydocstyle\n[pyds-hub-img]: https://img.shields.io/docker/pulls/cytopia/pydocstyle.svg\n[pyds-hub-lnk]: https://hub.docker.com/r/cytopia/pydocstyle\n\n[pylint-git-lnk]: https://github.com/cytopia/docker-pylint\n[pylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/pylint.svg\n[pylint-hub-lnk]: https://hub.docker.com/r/cytopia/pylint\n\n[tfdocs-git-lnk]: https://github.com/cytopia/docker-terraform-docs\n[tfdocs-hub-img]: https://img.shields.io/docker/pulls/cytopia/terraform-docs.svg\n[tfdocs-hub-lnk]: https://hub.docker.com/r/cytopia/terraform-docs\n\n[tg-git-lnk]: https://github.com/cytopia/docker-terragrunt\n[tg-hub-img]: https://img.shields.io/docker/pulls/cytopia/terragrunt.svg\n[tg-hub-lnk]: https://hub.docker.com/r/cytopia/terragrunt\n\n[tgfmt-git-lnk]: https://github.com/cytopia/docker-terragrunt-fmt\n[tgfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/terragrunt-fmt.svg\n[tgfmt-hub-lnk]: https://hub.docker.com/r/cytopia/terragrunt-fmt\n\n[yfmt-git-lnk]: https://github.com/cytopia/docker-yamlfmt\n[yfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/yamlfmt.svg\n[yfmt-hub-lnk]: https://hub.docker.com/r/cytopia/yamlfmt\n\n[ylint-git-lnk]: https://github.com/cytopia/docker-yamllint\n[ylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/yamllint.svg\n[ylint-hub-lnk]: https://hub.docker.com/r/cytopia/yamllint\n\n\n### Makefiles\n\nVisit **[cytopia/makefiles](https://github.com/cytopia/makefiles)** for dependency-less, seamless project integration and minimum required best-practice code linting for CI.\nThe provided Makefiles will only require GNU Make and Docker itself removing the need to install anything else.\n\n\n## :page_facing_up: License\n\n\n**[MIT License](LICENSE)**\n\nCopyright (c) 2019 [cytopia](https://github.com/cytopia)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytopia%2Fdocker-terraform-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytopia%2Fdocker-terraform-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytopia%2Fdocker-terraform-docs/lists"}