Skip to content
v2.274.0

Experimental

@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

RouteTableProps Struct ​

Properties to define a route table.

Example ​

ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc');
const vpnGateway = myVpc.enableVpnGatewayV2({
  vpnRoutePropagation: [{ subnetType: SubnetType.PUBLIC }],
  type: VpnConnectionType.IPSEC_1,
});

const routeTable = new RouteTable(stack, 'routeTable', {
  vpc: myVpc
  } );

new Route(stack, 'route', {
  destination: '172.31.0.0/24',
  target: { gateway: vpnGateway },
  routeTable: routeTable,
});

Properties ​

routeTableNameoptionalstringroute_table_nameoptionalstrrouteTableNameoptionalStringRouteTableNameoptionalstringRouteTableNameoptional*string#
The resource name of the route table.

Default: provisioned without a route table name

vpcIVpcV2vpcIVpcV2vpcIVpcV2VpcIVpcV2VpcIVpcV2required#
The ID of the VPC.