Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize native schema.Schema.Deprecated to automatically mark deprecated fields in generated MR CRDs #230

Open
ulucinar opened this issue Jul 14, 2023 · 0 comments
Labels
enhancement New feature or request is:triaged v2
Milestone

Comments

@ulucinar
Copy link
Collaborator

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 #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

@jeanduplessis jeanduplessis modified the milestones: 1.2, 1.3 Feb 3, 2024
@jeanduplessis jeanduplessis modified the milestones: 1.4, 2.x Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request is:triaged v2
Projects
None yet
Development

No branches or pull requests

2 participants