gpt4 book ai didi

amazon-web-services - AWS cloudformation:创建 AWS::ElastiCache::ReplicationGroup 资源时如何设置集群名称

转载 作者:行者123 更新时间:2023-12-05 02:59:25 25 4
gpt4 key购买 nike

我的模板中有一个 AWS::ElastiCache::ReplicationGroup 类型的资源。创建堆栈时,它会在创建此集群时分配一个生成的名称。正在使用Redis引擎。对于 AWS::ElastiCache::CacheCluster,有一个名为 ClusterName 的属性具有相同的用途。这里有对应的属性吗?

最佳答案

对我来说,设置 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

关于amazon-web-services - AWS cloudformation:创建 AWS::ElastiCache::ReplicationGroup 资源时如何设置集群名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57911732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com