Elasticache: Cluster mode updates are not supported while attempting to update additional properties

1

This is the template I used to create elasticache redis. When I try to make any update to this I'm getting an error. The change can be as simple as updating the tag. I have to delete and recreate the db but when I go to production with this we can't do that. What's wrong here?

Error: "Cluster mode updates are not supported while attempting to update additional properties"

AWSTemplateFormatVersion: '2010-09-09'
Description: CloudFormation template to create an Amazon ElastiCache Redis cluster.

Parameters:
  CacheNodeType:
    Description: The compute and memory capacity for the nodes in the cluster.
    Type: String
    AllowedValues:
      - cache.t2.micro
    ConstraintDescription: Must select a valid cache node type.
  ReplicasPerNodeGroup:
    Description: Replicas per node group
    Type: Number
  Environment:
    Description: Enter the environment
    Type: String
    AllowedValues:
      - "dev"
      - "prod"
  Group:
    Description: Enter the group this belong to
    Type: String
    AllowedValues:
      - "group1"
      - "group2"
      - "group3"

    ### to do 
    ### add security groups
    ### enable automated backups

Resources:
  RedisReplicationGroup:
    Type: AWS::ElastiCache::ReplicationGroup
    Properties:
      AtRestEncryptionEnabled: false
      AutomaticFailoverEnabled: true
      AutoMinorVersionUpgrade: true
      # CacheSecurityGroupNames: 
      #   - String
      ClusterMode: Disabled
      CacheSubnetGroupName: !Ref CacheSubnetGroup
      CacheNodeType: !Ref CacheNodeType
      DataTieringEnabled: false
      Engine: redis
      IpDiscovery: ipv4
      MultiAZEnabled: true
      NetworkType: ipv4
      NumNodeGroups: 1
      ReplicasPerNodeGroup: !Ref ReplicasPerNodeGroup
      Port: 6379
      PreferredMaintenanceWindow: sun:05:30-sun:06:30
      ReplicationGroupDescription: test
      ReplicationGroupId: test
      Tags:
        - Key: Environment
          Value: !Ref Environment
        - Key: Group
          Value: !Ref Group

  CacheSubnetGroup:
    Type: AWS::ElastiCache::SubnetGroup
    Properties:
      Description: ElastiCache Redis Subnet Group
      SubnetIds: 
        - !ImportValue redis-subnet-private-a
        - !ImportValue redis-subnet-private-b

Outputs:
  RedisPrimaryEndpoint:
    Description: The primary endpoint of the ElastiCache Redis cluster.
    Value: !Join
      - ''
      - - !GetAtt RedisReplicationGroup.PrimaryEndPoint.Address
        - ':'
        - !GetAtt RedisReplicationGroup.PrimaryEndPoint.Port

  RedisReaderEndpoint:
    Description: The Reader endpoint of the ElastiCache Redis cluster.
    Value: !Join
      - ''
      - - !GetAtt RedisReplicationGroup.ReaderEndPoint.Address
        - ':'
        - !GetAtt RedisReplicationGroup.ReaderEndPoint.Port
feita há 9 meses584 visualizações
3 Respostas
3
Resposta aceita

It appears to be inaccurate CFN documentation for ClusterMode:

The schema resource type AWS::ElastiCache::ReplicationGroup handles looks like using lower case values "enabled or disabled" instead of documented "Enabled or Disabled".

I tested using lower case "enabled" in template allows required update of other properties to be invoked, for instance Tags:

  MyCfnReplicationGroup:
    Type: AWS::ElastiCache::ReplicationGroup
    Properties:
     ...
      ClusterMode: enabled
      Engine: redis
      EngineVersion: "6.2"
      ...
      Tags:
        - Key: TestTagChange
          Value: changed
AWS
respondido há 6 meses
  • I had the same issue. The value was set to 'Disabled' when the resource was created. When I tried to modify the resource I got the error noted in op. After changing the value to 'disabled', my update went through. Thanks!

0

We experienced the same event and responded with the following alternative solution.

Remove (or comment out) the ClusterMode property from the template. When we updated the stack, we confirmed that the other properties could be updated. Note that removing (or commenting out) the ClusterMode property does not change the value of the ClusterMode setting.

I contacted AWS support and they said this is an issue on the infrastructure side.

We have received a report of a CloudFormation issue where, when updating a resource in AWS::ElastiCache::ReplicationGroup, the said error is unexpectedly output even though the ClusterMode property has not been changed.

We have shared a temporary solution, but we encourage you to check with AWS Support for the latest information.

respondido há 6 meses
0

In my case, I am using a custom L2 construct for elasticache. I needed to set automatic failover to true as it had been mistakenly set to true. I tried to set the automatic failover to true, but I ended up with the Elasticache: Cluster mode updates are not supported while attempting to update additional properties error. This response popped up when I googled the error. I updated the cluster mode from the documented Disabled to disabled and deployed that change. Then I updated the automatic failover from false to true and it deployed fine.

I just wanted to make sure there was some google search that might help those struggling with CDK. They're probably using the aws_elasticache module. They might have updated the opensource cdk-redisdb module like I had to do. alternatively, they might be using the L1 construct CfnReplicationGroup in CDK.

respondido há 3 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas