amazon-cloudformation - 是否可以重用 cloudformation 模板中的现有路由表
问题描述
我正在编写一个 cft 来连接 dynamodb uisng vpcEndpoint。
DynamoDBEndpoint:
Type: "AWS::EC2::VPCEndpoint"
Properties:
RouteTableIds:
- !Ref PublicRouteTable
- !Ref Private0RouteTable
- !Ref Private1RouteTable
- !Ref Private2RouteTable
ServiceName:
!Sub "com.amazonaws.${AWS::Region}.dynamodb"
VpcId: !Ref VPC
Parameters:
vpcId:
Description: Choose the existing one
Type: AWS::EC2::VPC::Id
我通过使用参数获取现有的 vpcId,有什么办法可以使用我现有的路由表,请建议我如何定义这个 ref PublicRouteTable 和 ref PrivateRouteTable。
解决方案
您的参数vpcId
有效,因为它使用AWS::EC2::VPC::Id
属于 CloudFormation 中支持的 AWS 特定参数类型的类型。
遗憾的是,CloudFormation不支持路由表的类似类型。指定参数时,您必须在控制台中手动输入路由表 ID。
推荐阅读
- flutter - 在颤振中导航时未获取提供者数据
- python-3.x - 如何从网页中抓取简单的图像
- html - CSS table > td - 强制内容到一行跨浏览器
- c++ - C++/Tcl 调用 Tcl_CreateCommand 记录的函数时,我可以检索 Tcl 文件行号吗
- angular - 带有日期选择器的 Angular Material unittest 组件
- python - 使用 python 使用文件系统调整和存储图像文件夹的大小
- reactjs - 将两个类添加到一个 div,第一个类应始终应用,但第二个类应有条件地应用
- python - UnicodeEncodeError:“ascii”编解码器无法在位置 12 编码字符“\u200b”:序数不在范围内(128),即使在每个字符串之前添加 u
- python - z3 参数关系编码表
- ruby - 如何更改 RubyGems 环境变量(USER INSTALLATION DIRECTORY 和 SPEC CACHE DIRECTORY)