╷
│ Error: Invalid function argument
│
│ on .terraform/modules/redis_clusters.redis/main.tf line 223, in module "dns":
│ 223: records = var.cluster_mode_enabled ? [join("", aws_elasticache_replication_group.default.*.configuration_endpoint_address)] : [join("", aws_elasticache_replication_group.default.*.primary_endpoint_address)]
│ ├────────────────
│ │ while calling join(separator, lists...)
│ │ aws_elasticache_replication_group.default is tuple with 1 element
│
│ Invalid value for "lists" parameter: element 0 is null; cannot concatenate null values.
╵
╷
│ Error: Invalid function argument
│
│ on .terraform/modules/redis_clusters.redis/outputs.tf line 22, in output "endpoint":
│ 22: value = var.cluster_mode_enabled ? join("", aws_elasticache_replication_group.default.*.configuration_endpoint_address) : join("", aws_elasticache_replication_group.default.*.primary_endpoint_address)
│ ├────────────────
│ │ while calling join(separator, lists...)
│ │ aws_elasticache_replication_group.default is tuple with 1 element
│
│ Invalid value for "lists" parameter: element 0 is null; cannot concatenate null values.
╵
Releasing state lock. This may take a few moments...
exit status 1
Environment (please complete the following information):
Describe the Bug
If the module is already deployed with cluster mode enabled, attempting to modify the deployment to disable cluster mode will fail
Expected Behavior
The cluster should be able to be modified to non-cluster mode
Steps to Reproduce
Deploy the resource with cluster mode enabled, via
Now disable cluster mode and redeploy
Screenshots
Environment (please complete the following information):