hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.59k stars 9.54k forks source link

Add reader connection endpoint for aws_elasticache_replication_group #23691

Closed Shivang44 closed 4 years ago

Shivang44 commented 4 years ago

Current Terraform Version

Terraform v0.12.13

Use-cases

When creating an elasticache redis cluster (with cluster mode disabled) you get a "primary" endpoint and a read-only "reader" endpoint. The aws_elasticache_replication_group doesn't output the reader endpoint, despite this information being displayed (both the primary and reader) when you click the redis cluster in AWS: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Endpoints.html

Attempted Solutions

A workaround right now is to replace the word "master" in the primary endpoint with "replica". However this seems brittle as AWS could change their naming scheme. It would be nice to use the Reader URL returned directly in the AWS response.

Proposal

add reader_endpoint_address to the output of aws_elasticache_replication_group

Shivang44 commented 4 years ago

Made this request in the provider itself https://github.com/terraform-providers/terraform-provider-aws/issues/11313

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.