aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::ElastiCache::ReplicationGroup does not add shard nodes in specific AZs when updating stack
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
## 1. Title
AWS::ElastiCache::ReplicationGroup
## 2. Scope of request
AWS::ElastiCache::ReplicationGroup NodeGroupConfiguration should be able to add new shards (primary and replicate nodes) in expected AZs
## 3. Expected behavior
In Create, works just fine. Shard (primary and replicate nodes) are created in expected AZs
In Update, Shards AZs nodes are created the other way around. For example, I have a cluster with 2 shards.
```
First shard:
primary node: eu-west-1b
replication node: eu-west-1a
Second shard:
primary node: eu-west-1c
replication node: eu-west-1b
```
"MyRedisCluster": {
"Properties": {
"Engine": "redis",
"MultiAZEnabled": "true",
"NodeGroupConfiguration": [
{
"NodeGroupId": "0001",
"PrimaryAvailabilityZone": "eu-west-1b",
"ReplicaAvailabilityZones": [
"eu-west-1a"
]
},
{
"NodeGroupId": "0002",
"PrimaryAvailabilityZone": "eu-west-1c",
"ReplicaAvailabilityZones": [
"eu-west-1b"
]
},
],
"NumNodeGroups": 2,
"ReplicasPerNodeGroup": 1,
},
"Type": "AWS::ElastiCache::ReplicationGroup",
"UpdatePolicy": {
"UseOnlineResharding": "true"
}
}
Then I want to update my stack and add a new shard like this:
```
Thrid shard:
primary node: eu-west-1a
replication node: eu-west-1c
```
```
{
"NodeGroupId": "0003",
"PrimaryAvailabilityZone": "eu-west-1a",
"ReplicaAvailabilityZones": [
"eu-west-1c"
]
}
```
However, Cloudformtion creates it this way:
```
Thrid shard:
primary node: eu-west-1c
replication node: eu-west-1a
```
It's important to mention that it works fine when updating shards using AWS CLI [modify-replication-group-shard-configuration](https://docs.aws.amazon.com/cli/latest/reference/elasticache/modify-replication-group-shard-configuration.html)
## 4. Helpful Links to speed up research and evaluation
https://stackoverflow.com/questions/68587858/read-replicas-are-created-in-wrong-az-when-adding-new-shards-through-cloudformat
API docs at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html
Contributor guide
Assessment
This issue has not been assessed yet.