Closed
Description
Describe the Bug
Since version 1.3.0, terraform plan fails with an existing cluster (running in cluster mode) as all the reader endpoint options are null.
Expected Behavior
Terraform plan with no changes to an existing cluster should just successfully plan and show no changes.
Steps to Reproduce
Create a cluster using version 1.2.0 of this module. Update to version 1.3.0. Run terraform plan.
Screenshots
Error observed during terraform plan
Error: Error in function call
on .terraform/modules/redis.redis/main.tf line 119, in locals:
119: reader_endpoint_address = coalesce(local.reader_endpoint_serverless, local.reader_endpoint_cluster, local.reader_endpoint_instance)
├────────────────
│ while calling coalesce(vals...)
│ local.reader_endpoint_cluster is null
│ local.reader_endpoint_instance is null
│ local.reader_endpoint_serverless is null
Call to function "coalesce" failed: no non-null, non-empty-string arguments.
Environment
TERRAFORM_VERSION: 1.5.6
OS: ubuntu (github actions)
terraform-aws-elasticache-redis version: 1.3.0
Additional Context
Elasticache doesn't give you a reader endpoint when using redis in cluster mode, only a configuration endpoint, so
coalesce(local.reader_endpoint_serverless, local.reader_endpoint_cluster, local.reader_endpoint_instance)
is always going to be coalesce(null, null, null)
if you're using cluster mode, and is always going to throw this error.