crossplane / upjet

A code generation framework and runtime for Crossplane providers
Apache License 2.0
319 stars 89 forks source link

TF Conversions are not applied in Update function #438

Open digna-ionos opened 2 months ago

digna-ionos commented 2 months ago

Not applying the tf conversion after mashalling state map causes error when setting observation.

https://github.com/crossplane/upjet/blob/3afbb7796d468b52e48ba0d59026babbd11d283a/pkg/controller/external_tfpluginsdk.go#L699

Possible solution:

    stateValueMap, err = n.config.ApplyTFConversions(stateValueMap, config.FromTerraform)
    if err != nil {
        return managed.ExternalUpdate{}, errors.Wrap(err, "cannot convert the singleton lists for the updated resource state value map into embedded objects")
    }