terraform-docs is a utility to generate documentation from Terraform modules in
various output formats.
You can also have consistent execution through a
Once you set it up and configured it, every time you or your teammates want to
regenerate documentation (manually, through a pre-commit hook, or as part
of a CI pipeline) all you need to do is run
Read all about Configuration.
One of the most popular format is markdown table, which is a very good fit for generating README of module.
Read all about available formats.
terraform-docs compatiblity matrix with Terraform can be found below: