-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Terraform wants to recreate cluster on every apply #8
Comments
Hey @asaghri I am using this without any problem:
|
Hey @max-rocket-internet, That was super fast ! Thanks for the advice I'll try that right away. Before I had this : |
That's functionally the same as my example. So no worries there. If you could paste your code and the output from Terraform when it wants to destroy and recreate the cluster, that would be good 🙂 |
Ok so here is the code
And the output
|
Ok sorry the problem came from the storage encryption. It recreates the cluster with the storage encryption set to true, but actually it doesn't change it. |
Ah I see! Well mystery solved then. |
Hi Everyone, hope this help, but an article explaining this behaviour might save some day of research for someone else. hope this helps to find the root cause, |
I'm seeing this right now with the latest code, using only the subnets option, no azs or anything else specified. for me, it can't seem to correctly read the AZs and id state for for the existing cluster, so it always thinks those have changed:
|
Could you share the code ? |
yes, I'm not specifying the AZs, all I'm supplying is the subnets, and it's computing the AZs from that. I'm not using a snapshot at all, this is a fresh install. |
|
ok then you should try to add this to use all the zones available and see if it works :
|
looks like if I do that it'll want to kill and recreate my instance too, since we're using specific AZs intentionally, given that us-east-1 is a bit of a mess and not all instance types and configurations are available in all AZs.
strangely, it sees the existing AZs when I supply AZs as an arg, but not when I let it compute them. so I feel like this may be something wrong in the upstream terraform module. note that even if I fix the AZs problem it still wants to recreate it every time because of the id as well. so I'm not sure what the solution here is. |
I think the problem is already solved in this PR: #10. i.e. just pass subnets to the module and don't use the
Are you sure?? I've never heard of different AZs being inconsistent in this way. |
Oh yeah, PR#10 does seem to be what I'm encountering. thanks! as for the AZ issues, we've definitely run into this in the past, were certain instance types were available in certain AZs for extended periods of time. but only in us-east-1. us-west-2, for instance, never seems to have this issue. we've always put it down to it being the oldest and crustiest region, and AWS not exactly keeping things consistent much of anywhere in their codebases. |
Having what looks to be the same issue, did you manage to get round it without needing to destroy the cluster? |
I'm having the same problems with DocumentDB. If I try to pass a subnet group to a cluster, it wants to rebuild it every time. If I pass the availability zones, it wants to rebuild it every time. If I comment out those two lines, it doesn't rebuild it every time. I have to be able to pass a list of subnets at the minimum. We only use two availibility zones of the available 3 in the region. |
My requirement was only two AZ with Aurora , Do not use DB Subnet group in RDS Instance , Not sure thats a logic , but this resolved my issue. ALso need to have lifestyle rule in place apply_immediately = "true" Before the issue resource "aws_rds_cluster_instance" "test" { After solving **** resource "aws_rds_cluster_instance" "test" { Also In avaiability zone i mentioned eu-west1a, and eu-west-1b |
…meter-group [HARRI-136673] Add example for parameter-group
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hello,
Thanks for the great module. However with the avaibility zones variables being set, terraform wants to recreate the cluster on every apply as you can see on this issue (hashicorp/terraform#16724).
I guess a workaround would be to drop the availability_zones variables in the cluster.
Tx !
The text was updated successfully, but these errors were encountered: