-
Notifications
You must be signed in to change notification settings - Fork 89
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
Cannot remove topology blocks once added #445
Comments
This is a Terraform issue, and not specific to this provider. The order these resources are declared in the rendered Terraform definition files is important. You can likely update your state definition to include the
becomes
|
@tobio I tried that as well. But somehow, it is expecting |
@shashwat-sec sorry about the bad suggestion there. Digging into the code it looks like this is deeply tied into how these resources are managed. We can look at fixing this behaviour, however that will take some time. An option which works right now would be to include all the expected topology elements, but set the size to 0 for the elements you don't want present in the deployment. Something like:
|
@tobio , I'm actually experiencing the same issue, but it appears to be worse than described. The staging plan wants to set the first declared topology from I can only say that this urgently needs fixing so that the ordering isn't an issue, or expect the same order every time, and to make it consistent. |
@IanMoroney can you include your resource/module definition and the value of any vars defined. Is
Agreed, this behaviour is very frustrating. There's some ongoing investigation around solving this problem, but unfortunately there's no quick win so that ordering isn't an issue. The provider should already expect the same order every time, send me through the definition and we can understand what's going on and go from there. |
It is possible that you may not be able to replicate my exact scenario, as my two deployments of ES have wildly different ES versions. main.tf
In the staging environment (on the EC deployment itself), autoscaling is enabled. It is not currently defined in the terraform, and maybe that's contributing towards the confusion. staging.tfvars
prod.tfvars
staging plan file:
prod plan file:
|
So it does appear that autoscaling is the culprit here for me. The ordering issue is still apparent though when autoscaling is enabled, so I wonder if autoscaling forces a topology order? |
@IanMoroney that's correct. When autoscaling is enabled, all topology elements which may be autoscaled into existence must be defined. We've recently merged a docs change with an updated example for exactly this scenario. Reading over those docs again, we should detail exactly which elements have a non-zero Lmk if you've got any feedback on those docs as well, there's always room for improvement. |
Closed by #567 |
Readiness Checklist
Current Behavior
I am trying to create a scaled down elastic cluster with just hot_content in single zone when
var.dr
is set to true, else it should create a full multi-zone cluster.Creating the scaled down version is working fine. Scaling up by changing
var.dr
tofalse
is also working fine.But when i try to scale down the cluster again by setting
var.dr
totrue
, It tries to delete thehot_content
block and modifycoordinating
block tohot_content
.Plan output:
Applying this plan errors out:
I also tested by keeping the
coordinating
block as is and just try to deletemaster
block.Plan output shows fine:
But applying this plan errors out here:
Expected Behavior
Ideally it should create/delete blocks as we add/remove those topology blocks from elasticsearch. This scaling up and down works fine using console, so it should follow similar behaviour here.
## Terraform definition
Steps to Reproduce
Terraform code and steps added above.
Possible Solution
Your Environment
The text was updated successfully, but these errors were encountered: