provider-docs: add action documentation guidance - #84
Open
AdamTylerLynch wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
provider-docsskill covered resources, data sources, ephemeral resources, listresources, functions, and guides — but not actions, so an agent invoked to
document an action got no guidance, even though the sibling
provider-actionsskillpoints here for the docs workflow.
Verified before writing (sources checked, not assumed):
docs/actions/<action>.mdpages(developer.hashicorp.com/terraform/registry/providers/docs)
tfplugindocsgenerates action documentation — including scaffolding missingaction templates — with Terraform v1.14.0+, using
templates/actions/<action type name>.md[.tmpl]and example files atexamples/actions/<action_type>/action*.tf(hashicorp/terraform-plugin-docs)Changes
template-path list (with the v1.14.0+ note), plus a pointer to the new reference
section for action-page structure
references/hashicorp-provider-docs.md: new Action Pages section anchored onhow terraform-provider-aws documents its actions (
website/docs/actions/, 11hand-written pages analyzed):
# Action: <name>H1 prefix, parallel to# Resource:/# Data Source:actionblock and the resource-sidelifecycle { action_trigger { ... } }wiring — an action example without atrigger is not runnable
## Argument Referenceforconfigarguments; no attribute/output section(actions produce no state — every AWS action page omits it)
~> **Note:**alpha/previewdisclaimer and
!> **Warning:**when the action mutates state Terraform doesnot reconcile (the aws_ec2_stop_instance precedent)
release-note:new-actionchangelog type for repos using go-changelognew providers should generate instead
Verification:
scripts/validate-structure.shpasses; two-file diff confined tothe provider-docs skill; no conflicts with the other six branches (none touch
provider-docs).
The follow-up commit also captures the documentation-example conventions requested in #14: examples live in
examples/(one per file, imported viatffile) and must not containterraform,provider, oroutputblocks.