Skip to content

Generate documentation from Terraform modules in various output formats

License

Notifications You must be signed in to change notification settings

midestefanis/terraform-docs

 
 

Repository files navigation

terraform-docs

Build Status GoDoc Go Report Card Codecov Report License Latest release

terraform-docs-teaser

What is terraform-docs

A utility to generate documentation from Terraform modules in various output formats.

Documentation

Visit our website for all documentation.

Installation

The latest version can be installed using go get:

GO111MODULE="on" go get github.com/terraform-docs/[email protected]

NOTE: to download any version before v0.9.1 (inclusive) you need to use to old module namespace (segmentio):

# only for v0.9.1 and before
GO111MODULE="on" go get github.com/segmentio/[email protected]

NOTE: please use the latest Go to do this, minimum go1.16 or greater.

This will put terraform-docs in $(go env GOPATH)/bin. If you encounter the error terraform-docs: command not found after installation then you may need to either add that directory to your $PATH as shown here or do a manual installation by cloning the repo and run make build from the repository which will put terraform-docs in:

$(go env GOPATH)/src/github.com/terraform-docs/terraform-docs/bin/$(uname | tr '[:upper:]' '[:lower:]')-amd64/terraform-docs

Stable binaries are also available on the releases page. To install, download the binary for your platform from "Assets" and place this into your $PATH:

curl -Lo ./terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.13.0/terraform-docs-v0.13.0-$(uname)-amd64.tar.gz
tar -xzf terraform-docs.tar.gz
chmod +x terraform-docs
mv terraform-docs /some-dir-in-your-PATH/terraform-docs

NOTE: Windows releases are in ZIP format.

If you are a Mac OS X user, you can use Homebrew:

brew install terraform-docs

or

brew install terraform-docs/tap/terraform-docs

Windows users can install using Scoop:

scoop bucket add terraform-docs https://github.com/terraform-docs/scoop-bucket
scoop install terraform-docs

or Chocolatey:

choco install terraform-docs

Alternatively you also can run terraform-docs as a container:

docker run quay.io/terraform-docs/terraform-docs:0.13.0

NOTE: Docker tag latest refers to latest stable released version and edge refers to HEAD of master at any given point in time.

Community

  • Discuss terraform-docs on Slack

License

MIT License - Copyright (c) 2021 The terraform-docs Authors.

About

Generate documentation from Terraform modules in various output formats

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.6%
  • Makefile 1.6%
  • Shell 1.5%
  • Dockerfile 0.3%