terraform-plugin-docs
terraform-plugin-docs copied to clipboard
feat: add default values to attributes to documentation
Current behavior
Given the schema entry:
"rm": {
Type: schema.TypeBool,
Description: "If true, then the container will be automatically removed after his execution.",
Default: false,
Optional: true,
},
the rendered output is
- **rm** (Boolean) If true, then the container will be automatically removed after his execution.
Desired behavior
I'd like to have Defaults to abc in the generation as well as follows:
- **rm** (Boolean) If true, then the container will be automatically removed after his execution. Defaults to `false`
Versions
- terraform-plugin-docs:
v0.4.0 - terraform-plugin-sdk/v2
v2.6.1
While not official, you can achieve this with a workaround in your own provider. Check out https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/internal/provider/provider.go#L23-L48 for an example.