amazon-web-services - AWS cloudformation:创建 AWS::ElastiCache::ReplicationGroup 资源时如何设置集群名称
问题描述
我在 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
推荐阅读
- netty - 禁用后启用套接字自动读取
- azure - Azure function returns HTTP ERROR 404
- .htaccess - .htaccess 将子域重定向到子目录
- javascript - 使用 FakerJS 时,forEach 不是 NodeJS 中的函数错误
- python - Rdflib 命名空间 - 如何避免“无法拆分 URI”错误?
- python-3.x - Python subprocess another python script not producing output
- api - 具有多个用户的 OAuth2 客户端身份验证
- android - 这里不允许元素项(动画列表)?
- laravel - Attach existing record to eloquent hasMany / belongsTo relationship
- javascript - My Add and remove Button disappears