cloudposse / terraform-aws-elasticache-redis

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

'aws_elasticache_replication_group.default' does not have attribute 'primary_endpoint_address' #16

Closed osterman closed 6 years ago

osterman commented 6 years ago

what

seeing this weird issue when I'm trying to use the terraform-aws-elasticache-redis

Error: Error running plan: 2 error(s) occurred:

* module.elasticache_redis.module.dns.var.records: Resource 'aws_elasticache_replication_group.default' does not have attribute 'primary_endpoint_address' for variable 'aws_elasticache_replication_group.default.*.primary_endpoint_address'
* module.elasticache_redis.output.id: Resource 'aws_elasticache_replication_group.default' does not have attribute 'id' for variable 'aws_elasticache_replication_group.default.*.id'
osterman commented 6 years ago

After enabling TF_LOG=DEBUG feature flag, it was revealed that the following error message was getting squashed:

2018/07/202018/07/20 16:39:35 [ERROR] root.elasticache_redis: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: ["replication_group_id" must contain from 1 to 20 alphanumeric characters or hyphens]
osterman commented 6 years ago

The problem was replication_group_id was too long. This is generated from namespace, stage and name, so picking shorter names is suggested as we want to avoid using truncation.