Utilize native schema.Schema.Deprecated to automatically mark deprecated fields in generated MR CRDs
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
### What problem are you facing?
When a Terraform configuration parameter (or attribute) is deprecated, we cannot currently automatically mark the corresponding `spec.forProvider` field.
### How could Upjet help solve your problem?
The native schema already contains this information under `schema.Schema.Deprecated`. An example is here:
https://github.com/hashicorp/terraform-provider-azurerm/blob/2e0ef13d1d8b5510cb77948d3ccd5ce8397f03fb/internal/services/compute/windows_virtual_machine_scale_set_resource.go#L1502
Just like https://github.com/upbound/upjet/issues/197, we may consider utilizing this information from the terraform native schema. We could also use this to generate the `Deprecated` CRD field comment and include an appropriate deprecation message. We could further attempt to configure the late initializer as discussed here: https://github.com/upbound/provider-azure/pull/490/files#r1263645445
Contributor guide
Assessment
This issue has not been assessed yet.