I want to list out the subnets only from specific VPC in my cloudformation parameters section:
VPC:
Description: VPC Id
Type: AWS::EC2::VPC::Id
Subnets:
Description: Select Subnets (Minimum 2)
Type: List<AWS::EC2::Subnet::Id>
The above displays all subnets (from other subnets also) but I want to show only subnets from selected VPC.
Is it possible? What is the workaround for the same?
2
Answers
No.
There is none, unless you develop your own frotnend for deployment of templates.
You can’t list them that way, but you can prevent deployment if the chosen subnets are not in the VPC by using a CloudFormation rule: