cloudposse / terraform-aws-elasticache-redis

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

Fix deprecation warnings #160

Closed purplepangolin closed 2 years ago

purplepangolin commented 2 years ago

what

why

Eliminate warnings when running terraform plan by moving to latest supported attributes instead.

references

Terraform aws provider docs

aknysh commented 2 years ago

/test all

syphernl commented 2 years ago

Shouldn't this have been marked as a breaking change and/or also updated the minimum AWS provider version?

This is causing issues with v3 of the AWS provider (hashicorp/aws v3.75.2 to be exact):

│ Error: Missing required argument
│ 
│   on .terraform/modules/redis/main.tf line 116, in resource "aws_elasticache_replication_group" "default":
│  116: resource "aws_elasticache_replication_group" "default" {
│ 
│ The argument "replication_group_description" is required, but no definition was found.
╵
╷
│ Error: Unsupported argument
│ 
│   on .terraform/modules/redis/main.tf line 121, in resource "aws_elasticache_replication_group" "default":
│  121:   description                = module.this.id
│ 
│ An argument named "description" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on .terraform/modules/redis/main.tf line 123, in resource "aws_elasticache_replication_group" "default":
│  123:   num_cache_clusters         = var.cluster_mode_enabled ? null : var.cluster_size
│ 
│ An argument named "num_cache_clusters" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on .terraform/modules/redis/main.tf line 149, in resource "aws_elasticache_replication_group" "default":
│  149:   num_node_groups         = var.cluster_mode_enabled ? var.cluster_mode_num_node_groups : null
│ 
│ An argument named "num_node_groups" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on .terraform/modules/redis/main.tf line 150, in resource "aws_elasticache_replication_group" "default":
│  150:   replicas_per_node_group = var.cluster_mode_enabled ? var.cluster_mode_replicas_per_node_group : null
│ 
│ An argument named "replicas_per_node_group" is not expected here.