-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Terraform Version
latest
Use Cases
I want to improve the documentation generated from: https://github.com/hashicorp/terraform-plugin-docs
Attempted Solutions
you can jam a lot of information in to the description field
Proposal
the json schema generated from a provider / resource schema should include information information on:
default
plan_modifiers
validators
"resource_schemas": {
"resource_name": {
"version": 0,
"block": {
"attributes": {
"type": {
"type": "string",
"description_kind": "plain",
"optional": true,
# new fields to add to schema
"default": "default",
"validators": [
"validator description 1"
],
"plan_modifers": [
"plan mod description 1"
]
}
},
The plan modifiers could pull from descriptions provided by each. ex: https://github.com/hashicorp/terraform-plugin-framework/blob/main/resource/schema/stringplanmodifier/requires_replace.go#L27
Validators also seem to have the concept: https://github.com/hashicorp/terraform-plugin-framework-validators/blob/main/stringvalidator/any.go#L46
References
benjamin-lykins, hare011 and SKalt