We have an ElastiCache Replication group (AWS::ElastiCache::ReplicationGroup) with NumCacheClusters currently set to 2 in a CloudFormation template and want to setup a set of CloudWatch alarms for each CacheClusterId that CloudFormation creates for us as part of the replication group.
There are 2 roadblocks that I am facing:
- how do you set up a variable number of resources in the CloudFormation template (want N number of
AWS::CloudWatch::Alarm, where N ==NumCacheClusters) - A CloudWatch alarm needs the
CacheClusterIdwithin theDimensionsproperty, how do I get that value for each Cache Cluster that CloudFormation creates for us.
BTW, I'm very new to CloudFormation so any resources on the topic would be helpful as well.
Thanks.