-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_elasticache_replication_group logic does not permit automatic_failover_enabled when num_of_clusters = 1 #18522
Comments
I have same problem. #17605 (comment) I saw these 2 comments from related issues, so I feel like the developer of this code predicts that this terraform code works.
unfortunately, I can't create smallest redis-cluster set @gdavison mentioned. I hope it'll be fixed soon. |
For clarification, is part of the issue that you haven't directly configured For your existing replication group, can you add a screenshot of the current parameters? In the list of replication groups, click on the triangle to show this. I'm wondering if there's an unexpected configuration, especially since AWS changed how some settings are interpreted. |
@gdavison I didn't configure My setting is same as @DoctorPolski, so
and it's not greater than 1. I didn't add In below terraform plan result doesn't show the change of
PS. I changed my terraform plan result to my last try to resolve this problem, and like as you think, this terraform code failed to apply because I changed my |
I'll take a look at improving the error messaging. Part of the complication is that we allow setting either, I'll do some more investigation around the configuration and try to reproduce it. It theoretically should not be possible, at least now, unless there's also some interaction with "Cluster-Mode enabled"/sharding. Right now, if the validation is turned off, the AWS API returns an error, but I haven't tried it with a |
I have tested the creation of a "single node cluster" directly on the console and your suspicions are correct @gdavison, This is my creation template:Selecting the Setting Resulting cluster:In respect of clustering, this matches the config of my "small environments". |
Thanks for testing that, @DoctorPolski. That's not the result I expected… 😀 |
This has been released in version 3.36.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.14.8
Affected Resource(s)
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
With the above config, Terraform should plan.
Actual Behavior
Error: if automatic_failover_enabled is true, number_cache_clusters must be greater than 1
Steps to Reproduce
terraform apply
Important Factoids
Source: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_replication_group#automatic_failover_enabled
Which does not agree with the working config I currently have on AWS:
So I have to question whether or not the assertion made by Terraform is correct. It is my belief that number of clusters DOES NOT need to be > 1 for
automatic_failover_enabled
to beTRUE
.I agree with @gdavison here #17605 (comment) that it makes no logical sense setting
automatic_failover_enabled
to true for a single node since indeed where would it failover to. But AWS permits this and therefore it is incorrect for Terraform enforce otherwise.I have Serverless code dependencies on cluster mode being set so I cannot specify my single node environments without clustering mode enabled.
References
The text was updated successfully, but these errors were encountered: