Reputation: 27
I'm trying to use ref from parameter here but this is not working:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Creating template to deploy 3 ec2 instances in 3 different AZs",
"Parameters": {
"CFCidrVPC1": {
"Type": "string",
"Default": "10.10.0.0/16"
}
},
"Resources": {
"VPC1": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": {
"Ref": "CFCidrVPC1"
},
"EnableDnsHostnames": "False",
"EnableDnsSupport": "False",
"InstanceTenancy": "default"
}
}
}
}
CFCidrVPC1
: This is defined in parameters and I'm trying to use it in resources but I'm getting Template contains errors.: Template format error: Unrecognized parameter type: string
I don't want to put in CIDR value directly while creating VPC.
Is there any way I can define CIDR somewhere and later reference it?
Upvotes: 0
Views: 967