Search code examples
amazon-web-servicesredistagsaws-cloudformationamazon-elasticache

CloudFormation - ReplicationGroup - Specify the name


I'm create a CloudFormation template to create Redis in ElastiCache Cluster, everything works fine. However I'm not able to modify the name of the cluster.

Here is my code:

Resources:
Redis:
    Type: 'AWS::ElastiCache::ReplicationGroup'
    Properties:

        ReplicationGroupDescription: RedisCluster
        NumCacheClusters: '2'
        Engine: redis
        MultiAZEnabled: yes
        CacheNodeType: cache.t2.micro
        AutomaticFailoverEnabled: 'true'
        CacheSubnetGroupName: !Ref RedisSubnetGroup
        EngineVersion: 5.0.6
        PreferredMaintenanceWindow: mon:03:00-mon:04:00
        Tags: 
            - Key: Cluster Name
              Value: "Redis"
            - Key: Name
              Value: "Redis"
        SecurityGroupIds: 
            - !Ref RedisSecurityGroup

It's look like the tags doesn't work in this case.

What is the right way to specify the name for the cluster ?


Solution

  • The name is set using ReplicationGroupId:

    The replication group identifier. This parameter is stored as a lowercase string.