Open nmuesch opened 3 years ago
Could you also include the deprecation message associated with the field in the description?
Drive-by note about potentially including the deprecation message that can be included in attribute definitions. Currently this information is not possible to inject into the documentation generation because this tool is dependent on information output via the Terraform Plugin Protocol and the terraform providers schema -json
command. They only expose deprecation as a boolean true/false today. There have been some considerations about exposing the existing deprecation message string as a "quick win" across the protocol (and also help fix empty messaging shown in editors, such as https://github.com/hashicorp/terraform-ls/issues/1538), however it may make more sense to encode and send more structured information from providers to help editors and other tools actually remediate these deprecations and many other configuration refactoring situations (code actions in editor terminology). Since that discovery and implementation effort might take a bit of time based on prioritization, I think we can be pragmatic to include the existing data though since there are situations where a deprecation might not be directly usable as this sort of code action.
Currently, when a field in a schema is deprecated, it shows up in parenthesis next to whether it's required or not.
Live example here under
thresholds
- https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/monitor#optionalCould the fact that a field is deprecated be more strongly represented? A few ideas for this may be -
Deprecated
bold to stand out moreRequired
,Optional
,Deprecated
Thanks for this project 🙂