cloudposse / terraform-aws-elasticache-redis

Terraform module to provision an ElastiCache Redis Cluster
https://cloudposse.com/accelerate
Apache License 2.0
141 stars 244 forks source link

How to activate Multi-AZ option. #104

Closed zhixiangjoy closed 2 years ago

zhixiangjoy commented 3 years ago

Describe the Bug

By default, I create a redis cluster, but I can't find how to active the Multi-Az option. image

Expected Behavior

How can I do it , Thanks a lot !

siozosdr commented 3 years ago

it looks like the option was not added in the code. Basically the resource aws_elasticache_replication_group.default is missing the option multi_az_enabled. There is an open PR about it pending approval... https://github.com/cloudposse/terraform-aws-elasticache-redis/pull/109

gregory commented 3 years ago

Pr #109 got merged but not working locally:

Acquiring state lock. This may take a few moments...

Error: Unsupported argument

  on .terraform/modules/redis/main.tf line 91, in resource "aws_elasticache_replication_group" "default":
  91:   multi_az_enabled              = var.multi_az_enabled

An argument named "multi_az_enabled" is not expected here.

Releasing state lock. This may take a few moments...
patrick-armitage commented 3 years ago

@gregory not sure what's going on here, maybe a Terraform version issue? Here's their own doc with that arg for reference:

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_replication_group#multi_az_enabled

markbaird commented 3 years ago

I just ran into this as well. Here's the PR where it was added, you need the AWS provider 3.26.0 or later.