vurconcept.blogg.se

Terraform plugins docs
Terraform plugins docs













terraform plugins docs

  • Update the schema fields to be decorated with Description attributes.
  • Resource/datasource/guide changesĪs for individual resources, there are only two (well, technically 3) steps: Using this approach allows us to keep our existing documentation until we explicitly cut over the resources to automatic generation.
  • Add make targets for generating documentation.įor a Pull Request demonstrating the change, check out cloudflare/terraform-provider-cloudflare#1680.
  • Moved contributing docs to a top level directory.
  • This is important as otherwise, it will try to generate them all and you’ll end up with duplicate documentation.
  • Rename all files to match the resource/datasource names.
  • Expand inner subdirectories to be their full representations.
  • This will allow us to copy over the existing documentation verbatim.
  • Move website/docs to a top level templates directory.
  • The Terraform documentation touches on some of these steps, however, leaves alot to be desired when it comes to migrating from an existing setup. In this directory, files with the extension ".md" (markdown) are copied over verbatim whereas files with the extension "md.tmpl" (templated markdown) are parsed through Go’s text/template package before rendering.
  • docs/: Templates are the files used as a blueprint to generate the outputs.
  • So, how do we migrate to it? Repository changesĪt a high level, terraform-plugin-docs has some inbuilt concepts for the directory structure.

    terraform plugins docs terraform plugins docs

    As of v0.9.0, the tool is mature and configurable enough for most providers. Terraform-plugin-docs uses the provider schema to generate consistent and automatic documentation. However, that is all changing with terraform-plugin-docs. This has always been painful to remember and keep in sync given the number of sources of documentation already out there for the Cloudflare provider. For the longest time, Terraform Registry documentation has been manually updated as the resource is created or modified.















    Terraform plugins docs