I have a resource in the template of type AWS::ElastiCache::ReplicationGroup. When the stack is created, it is assigning a generated name when creating this cluster. Redis engine is being used. In case of AWS::ElastiCache::CacheCluster, there is a property called ClusterName which serves the same purpose. Is there a corresponding property here ?
For me, setting the ReplicationGroupId property worked. I used an input parameter called "ClusterName".
Resources:
RedisReplicationGroup:
DependsOn: SecurityGroup
Type: AWS::ElastiCache::ReplicationGroup
Properties:
AtRestEncryptionEnabled: !Ref AtRestEncryptionEnabled
AuthToken: !Ref AuthToken
AutomaticFailoverEnabled: !Ref AutomaticFailoverEnabled
CacheNodeType: !Ref CacheNodeType
CacheParameterGroupName: !Ref CacheParameterGroupName
CacheSubnetGroupName: !Ref CacheSubnetGroupName
Engine: redis
NumNodeGroups: !Ref NumNodeGroups
ReplicationGroupId: !Ref ClusterName
ReplicasPerNodeGroup: !Ref ReplicasPerNodeGroup
ReplicationGroupDescription: "Redis Cluster"
SecurityGroupIds:
- !Ref SecurityGroup
Tags:
-
Key: "Environment"
Value: !Ref EnvironmentTag
-
Key: "Name"
Value: !Ref ClusterName
-
Key: "CreatedBy"
Value: !Ref CreatedByTag
-
Key: "Project"
Value: !Ref ProjectTag
TransitEncryptionEnabled: !Ref TransitEncryptionEnabled
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.