-
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
Error: Either number_cache_clusters
or cluster_mode
must be set when both are
#10458
Comments
I think You can solve this by adding cluster_mode to condition:
|
Thanks for your reply. I'm struggling to see how a dynamic block will help in this situation though. The cluster block always has populated variables and I always want it to be enabled. Dynamic blocks are usually used if you want to dynamically render some code which I'm not particularly interested in doing. For me, if cluster_mode {} is set the code should automatically create a clustered instance. Have I missed something here I'd be interested in hearing how you go round this issue? |
The ElastiCache Terraform is very confusing and in my opinion needs to be revamped and updated. However, you should either specify number_cache_clusters or cluster_mode, not both. The official documentation states the follow "number_cache_clusters - (Required for Cluster Mode Disabled) ". |
As mentioned above, only one of We have also opened #14959 to address the design of the ElastiCache resources |
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! |
This issue was originally opened by @alepeltier as hashicorp/terraform#23044. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Expected Behavior
According to the documentation, I should be able to make a clustered Redis cache by setting either cluster_mode or number_cache_clusters. I have both set in the above code however when I run an apply Terraform throws an error saying I need to have them set. I've had this issue multiple times and don't think it is the expected behaviour unless I'm doing something wrong.
Actual Behavior
I get the following error
Steps to Reproduce
1: Run terraform apply
The text was updated successfully, but these errors were encountered: