Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Allow to set preferred_cache_cluster_azs for ElastiCache Redis Сluster #37497

Open
everythings-gonna-be-alright opened this issue May 14, 2024 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticache Issues and PRs that pertain to the elasticache service.

Comments

@everythings-gonna-be-alright
Copy link

Description

For now, on the AWS web interface, users can choose which available zones they prefer for primary and replica Redis Cluster nodes.
But you can't choose preferred available zones when you create an ElastiCache Redis Cluster as code using Terraform.
As a result, one of the shards is always created in a different zone than your main available zone. This leads to additional traffic transfers and a bad connection time.
Please add the ability to choose preferred_cache_cluster_azs for the Redis Сluster.

Affected Resource(s) and/or Data Source(s)

No response

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

@everythings-gonna-be-alright everythings-gonna-be-alright added the enhancement Requests to existing resources that expand the functionality or scope. label May 14, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 14, 2024
@everythings-gonna-be-alright everythings-gonna-be-alright changed the title [Enhancement]: Allow to set preferred_cache_cluster_azs for Redis Сluster [Enhancement]: Allow to set preferred_cache_cluster_azs for ElastiCache Redis Сluster May 14, 2024
@acwwat
Copy link
Contributor

acwwat commented May 15, 2024

Just adding some research notes here.

aws_elasticache_replication_group already has a preferred_cache_cluster_azs argument. This argument is applicable to cluster with cluster mode disabled (per the UI selection).

But perhaps you are referring to the case where cluster mode is enabled. From the CloudTrail event for creating one such cluster, I can see that it doesn't use preferredCacheCluasterAzs but instead use nodeGroupConfiguration:

...
    "requestParameters": {
        "replicationGroupId": "test",
        "replicationGroupDescription": "",
        "automaticFailoverEnabled": true,
        "multiAZEnabled": true,
        "numNodeGroups": 3,
        "replicasPerNodeGroup": 1,
        "nodeGroupConfiguration": [
            {
                "primaryAvailabilityZone": "us-east-1a",
                "replicaAvailabilityZones": [
                    "us-east-1b"
                ]
            },
            {
                "primaryAvailabilityZone": "us-east-1a",
                "replicaAvailabilityZones": [
                    "us-east-1b"
                ]
            },
            {
                "primaryAvailabilityZone": "us-east-1a",
                "replicaAvailabilityZones": [
                    "us-east-1b"
                ]
            }
        ],
...

aws_elasticache_replication_group doesn't seem to support a node_group_configuration block so I think that's what needs to be added to address the requirement.

@justinretzolk justinretzolk added service/elasticache Issues and PRs that pertain to the elasticache service. and removed needs-triage Waiting for first response or review from a maintainer. labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticache Issues and PRs that pertain to the elasticache service.
Projects
None yet
Development

No branches or pull requests

3 participants