terraform-provider-ec: "Value of field 'elasticsearch.version' cannot be changed" when creating new deployment
Unsure if this is a bug or a general question, as it seems rather strange that this basic functionality wouldn’t work. Apologies if there’s an obvious step I missed.
Using terraform 0.14.7 and ec provider version v0.1.0-beta, I can not create a new deployment as per the docs in https://github.com/elastic/terraform-provider-ec/blob/master/docs/resources/ec_deployment.md
When trying, i get the error message:
Error: failed creating deployment: 2 errors occurred:
* api error: clusters.cluster_plan_change_prohibited: The requested cluster configuration change is not permitted. Value of field 'elasticsearch.version' cannot be changed to [7.9.2]. (resources.elasticsearch[0].elasticsearch.version)
* set "request_id" to "9sa1pv9xsnqugs7qo3rd62nyz87byja4gkxebw5k8q6hm771yu938ear8di5ykfr" to recreate the deployment resources
Expected Behavior
Im expecting a deployment to be created
Current Behavior
Error: failed creating deployment: 2 errors occurred: * api error: clusters.cluster_plan_change_prohibited: The requested cluster configuration change is not permitted. Value of field ‘elasticsearch.version’ cannot be changed to [7.9.2]. (resources.elasticsearch[0].elasticsearch.version) * set “request_id” to “9sa1pv9xsnqugs7qo3rd62nyz87byja4gkxebw5k8q6hm771yu938ear8di5ykfr” to recreate the deployment resources
## Terraform definition resource “ec_deployment” “example_minimal” { name = “my_example_deployment” region = “us-east-1” version = “7.9.2” deployment_template_id = “aws-io-optimized-v2”
elasticsearch {}
kibana {}
apm {}
enterprise_search {} }
Steps to Reproduce
- Get an API key
- Create terraform code for provider and resource as per the docs
- terraform apply
Context
I am trying to create a second ec deployment using terraform, we have one previous deployment in our account, that was created through the EC portal.
Your Environment
- Version used: terraform 0.14.7
- Operating System and version: Fedora Linux 33
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15 (9 by maintainers)
This error comes from our API, I will relay the feedback back to the relevant team to have a more actionable error message.