-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Provider-Defined Function Documentation #307
Comments
Initial Terraform implementation: hashicorp/terraform#34450 |
Created hashicorp/terraform-json#118 for tracking terraform-json updates necessary. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Background
Terraform 1.8 will be introducing provider-defined function support and the public Terraform Registry will support the ingress and display of provider-defined function documentation. Both parts of this feature are under active development, so this issue description may change slightly to match implementation details.
For extracting machine-readable function information from providers, the existing
terraform providers schema -json
command output will be updated to include the following:For ingress and display of this documentation, the public Terraform Registry expects Markdown source files in conventional file locations similar to existing managed resource and data source files. From the base directory of a provider codebase:
docs/functions/NAME.md
.Proposal
Update the
migrate
command to automatically handle migratingwebsite/docs/functions/NAME.*
files.Update the
generate
command to automatically generate provider-defined function documentation, similar to managed resource and data source documentation. Function documentation should support custom templates and those templates should support existing template functions.The proposed conventional function documentation content is as follows:
So a default template may look like the following:
Where the new
FunctionSignatureMarkdown
andFunctionArgumentsMarkdown
template functions handle the business of looping through the parameters, variadic parameter, and return.The text was updated successfully, but these errors were encountered: