Issue
"wordpressASG": {
"Type": "AWS::AutoScaling::AutoScalingGroup",
"Properties": {
"AvailabilityZones": [
"ap-southeast-2a",
"ap-southeast-2b"
],
"VPCZoneIdentifier": [
{
"ref": "subnetA"
},
{
"ref": "subnetB"
}
],
"MinSize": "0",
"HealthCheckGracePeriod": 300,
"MaxSize": "0",
"Cooldown": "300",
"LaunchTemplate": {
"LaunchTemplateId": {
"Ref": "wordpressTemplate"
},
"Version": {
"Fn::GetAtt": [
"wordpressTemplate",
"LatestVersionNumber"
]
}
},
"MetricsCollection": [
{
"Granularity": "1Minute",
"Metrics": [
"GroupMinSize",
"GroupMaxSize"
]
}
],
"TargetGroupARNs": [
{
"Ref": "wordpressTG"
}
]
}
}
Probably not a new question, but all examples are of using a subnet parameter. List needs to be string, but ref Should give strings for this thing. The Subnets are being created in the same script.
Solution
Based on the comments.
The issue was the use ref
instead of Ref
when listing subsets in VPCZoneIdentifier
.
Answered By - Marcin