Elasticache Replication Group Id in CloudFormation Template

How to set Redis ReplicationGroup ID when using CloudFormation template? All parameters in the docs do not show this, but the CLI , you can do it easily. My ultimate goal is for the Redis Reduction Group to consist of 3 cluster members, but I want to select a name, not AWS, to set a unique name for me.

Here is a snippet of my template:

"Resources": { "mqpReplicationGroup": { "Type": "AWS::ElastiCache::ReplicationGroup", "Properties": { "CacheNodeType": { "Ref": "CacheNodeType" }, "CacheSubnetGroupName": { "Ref": "CacheSubnets" }, "ReplicationGroupDescription": "Redis Replication Group", "Engine": "redis", "EngineVersion": { "Ref": "RedisVersion" }, "NumCacheClusters": { "Ref": "NumberOfCacheNodes" }, "AutoMinorVersionUpgrade": "true", "AutomaticFailoverEnabled": "true", "PreferredMaintenanceWindow": "sat:09:25-sat:22:30", "SnapshotRetentionLimit": "4", "SnapshotWindow": "00:05-05:30", "NotificationTopicArn": { "Fn::Join" :[":",["arn:aws:sns",{ "Ref" : "AWS::Region" },{ "Ref" : "AWS::AccountId" },"service-aws"]] }, "SecurityGroupIds": [ { "Fn::Join": [ ",", { "Ref": "VpcSecurityGroupIds" } ] } ] } }, "CacheSubnets": { "Type": "AWS::ElastiCache::SubnetGroup", "Properties": { "Description": "mqp-cache-subnet", "SubnetIds": { "Ref": "SubnetIds" } } } } 
+7
amazon-web-services amazon-elasticache amazon-cloudformation
source share
2 answers

Starting in 2017, this is now possible using the ReplicationGroupId property.

Because this is optional, AWS CloudFormation will still generate a unique physical identifier if not specified.

Limitations for Name Type :

  • Must contain 1 to 20 alphanumeric characters or hyphens.
  • The first character must be a letter.
  • You cannot end with a hyphen or contain two consecutive hyphens.
+5
source share

This is currently not possible with CloudFormation.

0
source share

All Articles