You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Invalid function argument
on .terraform/modules/memcached/main.tf line 101, in resource "aws_elasticache_cluster""default":101:preferred_availability_zones=slice(var.availability_zones, 0, var.cluster_size)
|----------------
| var.cluster_size is 3
Invalid value for "end_index" parameter: end index must not be greater than
the length of the list.
Additional Context
I'll try to figure out a way to construct a list with AZs that matches the number of cache nodes and make a PR myself.
The text was updated successfully, but these errors were encountered:
Found a bug? Maybe our Slack Community can help.
Describe the Bug
You cannot define more cache nodes than you have defined availability zones.
Expected Behavior
You should be able to have more nodes than AZs (max 20 for memcached), terraform documentation does mention that the
preferred_availability_zones
parameter should have a list with same amount of AZ as you havenum_cache_nodes
defined (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster#preferred_availability_zones) so I do understand the attempt to useslice()
function in https://github.com/cloudposse/terraform-aws-elasticache-memcached/blob/master/main.tf#L101, but I doesn't work for this use case.Steps to Reproduce
Steps to reproduce the behavior:
terraform plan
Additional Context
I'll try to figure out a way to construct a list with AZs that matches the number of cache nodes and make a PR myself.
The text was updated successfully, but these errors were encountered: