You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Support for Provider-defined Function Documentation (#328)
* Implement `functionmd` package
* Implement provider-defined function support for `generate` command
* Fix spacing for `functionmd.RenderFunctions()` output
* Update README.md
* Implement provider-defined function support for `migrate` command
* Add copywrite headers
* Add `templates` directory to list of accepted directory names in `validate`
* Update `provider-build` acceptance tests
* Add Changelog entries
* Update README.md to include Terraform binary requirement for functions
Copy file name to clipboardExpand all lines: README.md
+43-19Lines changed: 43 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ When you run `tfplugindocs`, by default from the root directory of a provider co
105
105
* Generate a default provider template file, if missing (**index.md**)
106
106
* Generate resource template files, if missing
107
107
* Generate data source template files, if missing
108
+
* Generate function template files, if missing (Requires Terraform v1.8.0+)
108
109
* Copy all non-template files to the output website directory
109
110
* Process all the remaining templates to generate files for the output website directory
110
111
@@ -165,19 +166,21 @@ The `migrate` subcommand takes the following actions:
165
166
166
167
The generation of missing documentation is based on a number of assumptions / conventional paths.
167
168
168
-
>**NOTE:** In the following conventional paths, `<data source name>` and `<resource name>` include the provider prefix as well.
169
+
>**NOTE:** In the following conventional paths, `<data source name>` and `<resource name>` include the provider prefix as well, but the provider prefix is **NOT** included in`<function name>`.
169
170
> For example, the data source [`caller_identity`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) in the `aws` provider would have an "example" conventional path of: `examples/data-sources/aws_caller_identity/data-source.tf`
Files named `index` (before the first `.`) in the website docs root directory and files in the `website/docs/d/`, `website/docs/r/`, `docs/data-sources/`,
@@ -229,7 +235,7 @@ using the following data fields and functions:
Copy file name to clipboardExpand all lines: cmd/tfplugindocs/testdata/scripts/provider-build/generate/framework_provider_success_generic_templates.txtar
Copy file name to clipboardExpand all lines: cmd/tfplugindocs/testdata/scripts/provider-build/generate/framework_provider_success_named_templates.txtar
0 commit comments