On terraform/cloudformation documentation there are two different resources to create an ElastiCache Redis instance:
aws_elasticache_cluster
(https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html) aws_elasticache_replication_group
(https://www.terraform.io/docs/providers/aws/r/elasticache_replication_group.html)What is the difference between these two? Which one should I choose?
Simply, the replication group is for the Redis cluster and the cache cluster is for the Memcache. You cannot apply the command to the others, i.e. cache cluster for Redis cluster and vice versa.
The redis also can use aws_elasticache_cluster
but only if when redis has node 1, that is not a cluster mode.
num_cache_nodes – (Required unless replication_group_id is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With