Skip to content

Resource: awsEc2LocalGatewayRoute

Manages an EC2 Local Gateway Route. More information can be found in the Outposts User Guide.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ec2LocalGatewayRoute.Ec2LocalGatewayRoute(this, "example", {
  destinationCidrBlock: "172.16.0.0/16",
  localGatewayRouteTableId:
    "${data.aws_ec2_local_gateway_route_table.example.id}",
  localGatewayVirtualInterfaceGroupId:
    "${data.aws_ec2_local_gateway_virtual_interface_group.example.id}",
});

Argument Reference

The following arguments are required:

  • destinationCidrBlock - (Required) IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
  • localGatewayRouteTableId - (Required) Identifier of EC2 Local Gateway Route Table.
  • localGatewayVirtualInterfaceGroupId - (Required) Identifier of EC2 Local Gateway Virtual Interface Group.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_)

Import

awsEc2LocalGatewayRoute can be imported by using the EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_), e.g.,

$ terraform import aws_ec2_local_gateway_route.example lgw-rtb-12345678_172.16.0.0/16