Skip to content

Generating Documentation#

This provider uses terraform-plugin-docs to generate documentation and store it in the docs/ directory. Once a release is cut, the Terraform Registry will download the documentation from docs/ and associate it with the release version. Read more about how this works on the official page.

Adding documentation for a new function#

To add documentation for a new function, you need to do 2 things:

  • Add a <function>.md.tmpl file in the templates/ directory. This file is used by terraform-plugin-docs to generate the documentation. You can refer to one of the existing files to create a new one.

  • Add examples to the examples/ directory. These examples are referenced in the template files and are used to generate the examples section in the documentation. We recommend adding an example for Terraform Test and Variable Validation. You can refer to one of the existing examples to create a new one.

Generating documentation#

After adding a new function to the templates/ and examples/ directories, run:

make generate