Create a Route to a TransitGateway
In a VPC's (or Subnet) RouteTable there is no current method to select the gateway as a TransitGateway.
From the CLI you can do: create-route [--transit-gateway-id
In CDK in the CfnRouteProps there is no withTransitGatewayId to provide in the route.
If used withGatewayId(CfnTransitGateway) the following error happens upon deploy. sbnetP1Route Route did not stabilize in expected time, but Synth correctly runs.
Does the feature you need exist in CloudFormation?
mmmm its missing in CloudFormation also:
In CLI you can do:
ec2 create-route [--transit-gateway-id
Yet, on Cloudformation the route entry does not have a corresponding –transit-gateway-id, from documentation:
{ "Type" : "AWS::EC2::Route", "Properties" : { "DestinationCidrBlock" : String, "DestinationIpv6CidrBlock" : String, "EgressOnlyInternetGatewayId" : String, "GatewayId" : String, "InstanceId" : String, "NatGatewayId" : String, "NetworkInterfaceId" : String, "RouteTableId" : String, "VpcPeeringConnectionId" : String } }
The fact that is missing from CloudFormation means that it can not be included in CDK?
Correct.
Cloudformation supports it now https://docs.aws.amazon.com/en_en/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html
I could also need this one, maybe it should be reopened now that cloud formation also supports it ?
@evildani @konstantinj @giovannidegani
transitGatewayId was added to CfnRouteProps automatically when it was added to Cloudformation since it's an L1. See the docs here. Let me know if this doesn't fully fulfill what you were looking for.