Skip to content

Commit ff3f01a

Browse files
authored
Merge pull request #6 from VIOOH/aws_provider_upgrade
Changed deprecated parameters to support latest AWS provide
2 parents d545fd7 + 534bd81 commit ff3f01a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ resource "random_id" "salt" {
88

99
resource "aws_elasticache_replication_group" "redis" {
1010
replication_group_id = replace(format("%.20s", "${var.name}-${var.env}"), "/-$/", "")
11-
replication_group_description = "Terraform-managed ElastiCache replication group for ${var.name}-${var.env}"
12-
number_cache_clusters = var.redis_clusters
11+
description = "Terraform-managed ElastiCache replication group for ${var.name}-${var.env}"
12+
num_cache_clusters = var.redis_clusters
1313
node_type = var.redis_node_type
1414
automatic_failover_enabled = var.redis_failover
1515
engine_version = var.redis_version
@@ -21,6 +21,8 @@ resource "aws_elasticache_replication_group" "redis" {
2121
maintenance_window = var.redis_maintenance_window
2222
snapshot_window = var.redis_snapshot_window
2323
snapshot_retention_limit = var.redis_snapshot_retention_limit
24+
security_group_names = [] # This is needed to fix bug in AWS provider 5.30.0 - see https://github.com/hashicorp/terraform-provider-aws/issues/32835
25+
preferred_cache_cluster_azs = var.availability_zones
2426
tags = merge(
2527
{
2628
"Name" = format(

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,8 @@ variable "tags" {
9797
default = {}
9898
}
9999

100+
variable "availability_zones" {
101+
description = "A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important"
102+
type = list(string)
103+
default = []
104+
}

0 commit comments

Comments
 (0)