crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
289 stars 38 forks source link

"omitempty" JSON tag should be included for fields of Observation structs of Terraformed resources #64

Closed ulucinar closed 2 years ago

ulucinar commented 2 years ago

What happened?

When I gave provider-tf-azure KubernetesCluster a try, provider cannot initially update the observed state at state.atProvider because in the generated v1alpha1.KubernetesClusterObservation struct, currently all the fields are required. However, values of most fields are not initially available like KubeConfig.

How can we reproduce it?

Provisioning a KubernetesCluster using https://github.com/crossplane-contrib/provider-tf-azure/blob/258830e0bc0627f2749bcd7e285e3c831849a04a/examples/kubernetes/kubernetescluster.yaml reveals the issue.

ulucinar commented 2 years ago

Closed & tested via #63.