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

Invalid function argument in reader_endpoint_address output #137

Closed AlessioCasco closed 2 years ago

AlessioCasco commented 2 years ago

Describe the Bug

Error during plan and apply

│ Error: Invalid function argument
│ 
│   on .terraform/modules/status-api-redis-prod/outputs.tf line 27, in output "reader_endpoint_address":
│   27:   value       = join("", aws_elasticache_replication_group.default.*.reader_endpoint_address)
│     ├────────────────
│     │ aws_elasticache_replication_group.default is tuple with 1 element
│ 
│ Invalid value for "lists" parameter: element 0 is null; cannot concatenate null values.

Expected Behavior

Plan and apply should not error

Steps to Reproduce

It seems that these are the parameters that make it fail, I have another cluster with cluster_mode_enabled set to false that doesn't have the issue

  cluster_mode_enabled                 = true
  cluster_mode_num_node_groups         = 1
  cluster_mode_replicas_per_node_group = 2

Environment:

Anything that will help us triage the bug will help. Here are some ideas: