aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

AWS::ElastiCache::GlobalReplicationGroup properties update #1965

Open byF opened 3 months ago

byF commented 3 months ago

Name of the resource

AWS::ElastiCache::GlobalReplicationGroup

Resource Name

No response

Issue Description

AWS::ElastiCache::ReplicationGroup are interdependent AWS::ElastiCache::GlobalReplicationGroup.

GlobalReplicationGroup needs at least one member, which must be a reference to ReplicationGroup.

During stack creation, CFN will create a ReplicationGroup first, while it requires cacheNodeType set (even though it’s marked as optional in the CFN template reference). Afterwards, CFN will create GlobalReplicationGroup. That works.

However, the stack update will fail because CFN tries to update cacheNodeType in ReplicationGroup which it can't as the property is now controlled by the GlobalReplicationGroup

Expected Behavior

If you change cacheNodeType, the stack update should pass.

Observed Behavior

If you change cacheNodeType, the stack update will fail with:

Replication Group [abc] is a member of Global Replication Group [xyz], hence NodeType property cannot be modified.Current value = [cache.m6g.large], Desired value = [cache.m6g.xlarge]

Test Cases

  1. Create a CFN template with AWS::ElastiCache::ReplicationGroup and AWS::ElastiCache::GlobalReplicationGroup
  2. Deploy the stack
  3. Change cacheNodeType
  4. Try to deploy the update

Other Details

No response