Terraform: aws_elasticache_cluster does not allow creation of multi-AZ Redis

Created on 2 Feb 2016  ยท  22Comments  ยท  Source: hashicorp/terraform

Per the documentation at https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html

the multi-az option is only available for Memcache. AWS allows for multi-AZ Redis:

https://aws.amazon.com/blogs/aws/elasticache-redis-multi-az/

enhancement provideaws

Most helpful comment

This would be an awesome improvement to Elasticache support in Terraform :)

All 22 comments

@rkulagowski with redis it must belong to replication_group we can't add multi-az to redis by setting az-parameter to true

:replication_group_id (String) โ€” The ID of the replication group to which this cache cluster should belong. If this parameter is specified, the cache cluster will be added to the specified replication group as a read replica; otherwise, the cache cluster will be a standalone primary that is not part of any replication group.
If the specified replication group is Multi-AZ enabled and the availability zone is not specified, the cache cluster will be created in availability zones that provide the best spread of read replicas across availability zones.

Note: This parameter is only valid if the Engine parameter is redis.

OK, but the replication group that you're discussing still doesn't appear to have any support in aws_elasticache_cluster

Or am I misunderstanding something? Is it possible to create a Redis cluster in multiple AZs yet?

Yes it's possible to have multi-az redis. I don't think terraform supports as of now. But i will try to add it on this weekend @rkulagowski

I'm running into this same problem. We're trying to create a fault tolerant redis elasticache cluster through terraform, but replication_group isn't supported. Terraform supports adding a single node redis cluster, but can you really call it a cluster at that point?

:+1:

This would be an awesome improvement to Elasticache support in Terraform :)

This is a real showstopper and again would be awesome if it could be added!

:+1:

really missing multiaz elasticache redis cluster support, adding my voice here

๐Ÿ‘

๐Ÿ‘ , but backport into 0.6.X ๐Ÿ™ ๐Ÿ˜„ ?

+1 still not possible in terraform

Could definitely use this!

Closing this as a duplicate of #4361

I am going to track the progress on this in that ticket going forward.

Hi,

It is feasible to configure " Multi-AZ enabled read abd write redis cluster"? At this moment looks it is not possible via terraform. Can you provide some feedback?

Thanks in advance

@agomezvidal for 0.8.7, according to https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html it appears that MultiAZ is possible only for memcached clusters so far. So, we are waiting for implementation of the same for Redis.

@agomezvidal @mbravorus MultiAZ is supported with Redis by using elasticache-replication-group. Support for it was added in https://github.com/hashicorp/terraform/pull/8275.

Check out the docs: https://www.terraform.io/docs/providers/aws/r/elasticache_replication_group.html

@stack72 This ticket is a different issue https://github.com/hashicorp/terraform/issues/4361

Right now if you try to build Redis with Multi-AZ you'll get the following error

"engine "redis" does not support num_cache_nodes >1 "

This ticket is not yet resolved.

@jasonkuehl AWS has some very confusing terminology between the console and API. Terraform implements the API naming as its generally more consistent longterm and translates more easily between the CLI, CloudFormation, and other AWS SDKs.

Its only possible to create a single Redis node with the aws_elasticache_cluster resource. The naming is unfortunate as "cluster" in the API only refers to singlular Redis nodes but supports multiple Memcached nodes in multi-AZ. The aws_elasticache_replication_group resource ("replication group" in the API) is what provides multi-AZ Redis support by enabling multiple Redis "clusters" (again, singular nodes) to talk to each other.

@bflad AH ok. Im going to test this out right away. Thanks for the reply!

Jason.

@bflad - did we have multi-az enabled for elastic cache Redis in terraform yet

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rjinski picture rjinski  ยท  3Comments

zeninfinity picture zeninfinity  ยท  3Comments

thebenwaters picture thebenwaters  ยท  3Comments

franklinwise picture franklinwise  ยท  3Comments

rkulagowski picture rkulagowski  ยท  3Comments