elastic / cloud-sdk-go

Apache License 2.0
21 stars 46 forks source link

ECE stilling requiring KibanaClusterPlan.ZoneCount which got removed #421

Closed farseerfc closed 1 year ago

farseerfc commented 1 year ago

Readiness Checklist

Expected Behavior

We are running ECE 3.4.1 and using cloud-sdk-go to automate some of the management tasks like creating ES/Kibana deployments on our ECE platform.

We used to build against cloud-sdk-go@v1.3.0 , which is quite old at this time. So I am considering to update to the latest version 1.11.0 . Building against cloud-sdk-go@v1.11.0 gives me an error saying KibanaClusterPlan do not have ZoneCount field.

Since we also set the ZoneCount in KibanaClusterTopologyElement, I tried to remove the line. The code compiles but trying to create a deployment with kibana will give an error:

api error: 1 error occurred:
        * clusters.cluster_invalid_plan: Zone Count not specified but there is no default (resources.kibana[0].zone_count)

I expected it to work with ECE 3.4.1 but apparently the ECE api endpoint is still requiring this field to be set.

In the old version it had the field: https://github.com/elastic/cloud-sdk-go/blob/b20b77e3557ba9ca41311036dc23a182d7688225/pkg/models/kibana_cluster_plan.go#L38-L54

In the newer version it got removed: https://github.com/elastic/cloud-sdk-go/blob/master/pkg/models/kibana_cluster_plan.go#L38-L50

It seems that the last version that having this field is 1.7.0, and we can confirm that 1.7.0 works with our codebase. The first version broke the behavior is 1.8.0

Is this a bug or behavior discrepancy between the ECE platform and the Elastic Cloud platform?

Your Environment

AlexP-Elastic commented 1 year ago

@farseerfc is it possible that you are not including an instance_configuration_id? If not can you try including one and seeing if that fixes it?

farseerfc commented 1 year ago

@AlexP-Elastic Thanks! The problem was that we did not include a instance_configuration_id: "kibana" , after adding that the problem is fixed. Thank you!

AlexP-Elastic commented 1 year ago

Thanks for closing the loop <3! Apologies that our error messaging here wasn't great for identifying what was going on.