Amazon Intrinsic 函数从一个帐户中获取所有 VPC 以进行云形成

Amazon Intrinsic function to get all the VPC from an account for cloud formation

对于 CloudFormation 脚本,我需要一个函数来从执行该脚本的帐户中获取所有可用的 VPC ID。

我希望用户从现有 VPC 列表中select,就像您在启动 EC2 实例(网络组合框)时使用的方式一样。

使用 AWS-specific parameter type, AWS::EC2::VPC::Id:

For AWS-specific parameter types, template users must specify existing AWS values that are in their account.

示例:

Parameters: 
  VPCId:
    Type: AWS::EC2::VPC::Id