Closed dentarg closed 10 months ago
We are fetching the default version if you leave the version out in the configuration.
resource "cloudamqp_instance" "instance" {
name = "instance"
plan = "bunny-1"
region = "amazon-web-services::eu-north-1"
}
It was introduced in https://github.com/cloudamqp/terraform-provider-cloudamqp/commit/d3f6c1b850e20df7813cdad557540a504d42f43d when we added the version to be manageable.
Looks like we don't really need to make this call at all (behaviour changed from before?). Either use the configured version or leave it out from the create request. Since our required params in the API backend are only name
, plan
and region
. Leaving it out makes our backend pick the default version.
Thanks for checking, what I suspected. We should remove it then :)
Nice catch!
In which situations are we fetching the default RabbitMQ version?
Do we need to do it? / What happens if we don't?
https://github.com/cloudamqp/terraform-provider-cloudamqp/blob/18de509d78e24b1c6b1f486a1f32168e1f99edb4/cloudamqp/resource_cloudamqp_instance.go#L181-L183