Not possible to create Redis engine with primary and read replica in one node in the same AZs

Hello everyone,

I’m trying to create Elasticache cluster with Redis engine with the following requirements:

  1. 3 shards
  2. 1 replica per shard
  3. Multi-AZ disabled

BUT I would like to have primary and replica in first shard in first AZ, primary and replica
in second shard in second AZ and so on. It is doable via AWS console:

but I cannot do this by using terraform :frowning:

I received following error when I tried to put availability_zones parameter:

Error creating Elasticache Replication Group: InvalidParameterCombination: PreferredCacheClusterAZs can only be specified for one node group.

I’ve noticed also that there is something like NodeGroupConfiguration but I’m not sure if this can be somehow used in terraform?

I found also different topics describing similar situation, but it seems like they are not resolved.