Skip to content

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

Description

@ulucinar

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions