Before this fix, if the lans wasn't present in the tf file, lans: nil would be send in the request, same for routes.
This led to a validation error since the API accepts lans: null only on PATCH requests, routes: null is not accepted at all.
The error looks like this:
│ Error: an error occured while creating a Dataplatform Cluster: 422 Unprocessable Entity: {"httpStatus":422,"messages":[{"errorCode":"dsaas-400","message":"'Value is not nullable' caused by field /properties/lans"}]}
I modified the code and now, if the lans or routes are missing, instead of nil we send an empty list in the body request.
Checklist
[x] PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
[ ] Tests added or updated
[ ] Documentation updated
[x] Changelog updated and version incremented (label: upcoming release)
What does this fix or implement?
Fixes the first point presented here: https://github.com/ionos-cloud/terraform-provider-ionoscloud/issues/552.
Before this fix, if the
lans
wasn't present in the tf file,lans: nil
would be send in the request, same forroutes
.This led to a validation error since the API accepts
lans: null
only onPATCH
requests,routes: null
is not accepted at all. The error looks like this:I modified the code and now, if the
lans
orroutes
are missing, instead ofnil
we send an empty list in the body request.Checklist
feat:
/fix:
/doc:
/test:
/refactor:
)