0

我正在使用 CF 创建站点到站点 VPN 我创建 AWS::EC2::TransitGateway:

TransitGateway:
    Type: "AWS::EC2::TransitGateway"
    Properties:
        Description: "tgw description"
        AmazonSideAsn: 64512
        AutoAcceptSharedAttachments: "disable"
        DefaultRouteTableAssociation: "enable"
        DefaultRouteTablePropagation: "enable"
        DnsSupport: "enable"
        VpnEcmpSupport: "enable"

我还创建:

  • AWS::EC2::TransitGatewayAttachment
  • AWS::EC2::CustomerGateway
  • AWS::EC2::VPN连接

这有效并根据需要创建所有资源。我需要另外一项资源来完成 CF,AWS::EC2::TransitGatewayRoute

 TransitGatewayRoute:
     Type: "AWS::EC2::TransitGatewayRoute"
     Properties:
         DestinationCidrBlock: "0.0.0.0/0"
        TransitGatewayAttachmentId:
           !Ref TransitGatewayAttachment       
         TransitGatewayRouteTableId: 
           #!Ref TransitGateway
           #Fn::GetAtt: ["TransitGateway", "AssociationDefaultRouteTableId"]
           #!GetAtt TransitGateway.AssociationDefaultRouteTableId
         Blackhole: false

如何引用 TransitGateway 的“关联路由表 ID”或“传播路由表 ID”(这些值相同)?我尝试了注释行的变体,但都导致错误。

4

0 回答 0