The answer is yes - you reference an AWS::EC2::Subnet from AWS::ElastiCache::SubnetGroup. Here is an example from my code:
The subnet:
"subnet9732c5f2": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.5.2.0/24",
"AvailabilityZone": "eu-west-1b",
"VpcId": {
"Ref": "vpcc140a7a4"
},
"Tags": [
{
"Key": "Name",
"Value": "Private subnet #2"
}
]
}
}
The subnet group:
"cachesubnetgroup": {
"Type" : "AWS::ElastiCache::SubnetGroup",
"Properties" : {
"Description" : "Cache Subnet for UAT",
"SubnetIds" : [
{
"Ref" : "subnet9732c5f2"
},
{
"Ref" : "AnotherSubnetId"
}
]
}
}