Skip to content

[FEAT]: migrate documentation to tfplugindocs auto-generation #3241

Closed

Description

@mkushakov

Summary

Migrate documentation from the manually-maintained website/docs/ format to auto-generated documentation using terraform-plugin-docs (tfplugindocs).

Motivation

Currently, documentation is manually written in website/docs/ as .html.markdown files. This has several limitations:

  • Schema drift: Schema changes in Go code don't automatically reflect in docs, leading to outdated documentation
  • No validation: There's no way to validate that docs match the actual provider schema
  • Inconsistent formatting: Manual authoring leads to inconsistent formatting across resource docs
  • No example extraction: HCL examples are embedded in markdown rather than being testable .tf files
  • Not standard: Most Terraform providers use tfplugindocs — the upstream standard tooling

Proposed Changes

  • Add tools.go with terraform-plugin-docs dependency
  • Add docs-generate, docs-validate, docs-migrate Makefile targets
  • Migrate website/docs/ to templates/ + docs/ format using tfplugindocs migrate
  • Extract HCL examples into examples/resources/ and examples/data-sources/
  • Enable gradual adoption of {{ .SchemaMarkdown }} for auto-generated schema docs

Benefits

  • Standard tooling: Aligns with the Terraform provider ecosystem best practice
  • Validation: make docs-validate catches documentation issues early
  • Gradual migration: Templates can progressively use {{ .SchemaMarkdown }} as schema descriptions improve
  • Testable examples: Extracted .tf files can be validated independently
  • CI integration: Easy to add docs-validate as a CI check

Workflow After Migration

  1. Edit templates in templates/ or update schema descriptions in Go source code
  2. Run make docs-generate to regenerate docs/
  3. Run make docs-validate to verify
  4. Commit both templates/ changes and docs/ output

Activity

  1. github-actions commented on Feb 27, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  2. changed the title [-]feat: migrate documentation to tfplugindocs auto-generation[/-] [+][FEAT]: migrate documentation to tfplugindocs auto-generation[/+] on Feb 27, 2026
  3. stevehipwell commented on Mar 6, 2026

    @stevehipwell
    Collaborator

    This is a duplication of #2961.

  4. mkushakov commented on Mar 6, 2026

    @mkushakov
    Author

    Sorry, closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions