我在AWS :: ElastiCache :: ReplicationGroup类型的模板中有一个资源。创建堆栈后,将在创建该群集时分配一个生成的名称。正在使用Redis引擎。如果使用AWS :: ElastiCache :: CacheCluster,则存在一个名为ClusterName的属性,该属性具有相同的用途。这里有相应的属性吗?
答案 0 :(得分:0)
对我来说,设置ReplicationGroupId属性有效。我使用了一个名为“ 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