-
Notifications
You must be signed in to change notification settings - Fork 91
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
One-element arrays could be considered as objects #136
Comments
imho, I think the provider should hide the terraform limitations from the idealized API. |
If we find cases where the As much as I am frustrated by the need to have all of these single element arrays, (especially when patching to |
What problem are you facing?
There are cases where a field is actually a struct in the API but Terraform has it as single-element array, like here https://github.com/hashicorp/terraform-provider-aws/blob/7ff39c5b11aafe812e3a4b414aa6d345286b95ec/internal/service/efs/access_point.go#L52
How could Upjet help solve your problem?
We can generate the arrays with
maxLength: 1
as structs so that we don't run into much patching problems and also the structural difference between the cloud API and CRD would be reduced. Though this would mean a breaking change, hence newapiVersion
for many resources.I think we should assess how reliable
maxLength: 1
condition is to figure out whether it should be struct or not. If it's close to 100%, it may be worth to bear the burden.The text was updated successfully, but these errors were encountered: