Manages an EC2 Local Gateway Route. More information can be found in the Outposts User Guide.
resource "aws_ec2_local_gateway_route" "example" {
destination_cidr_block = "172.16.0.0/16"
local_gateway_route_table_id = data.aws_ec2_local_gateway_route_table.example.id
local_gateway_virtual_interface_group_id = data.aws_ec2_local_gateway_virtual_interface_group.example.id
}
The following arguments are required:
destination_cidr_block
- (Required) IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.local_gateway_route_table_id
- (Required) Identifier of EC2 Local Gateway Route Table.local_gateway_virtual_interface_group_id
- (Required) Identifier of EC2 Local Gateway Virtual Interface Group.This resource exports the following attributes in addition to the arguments above:
id
- EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_
)In Terraform v1.5.0 and later, use an import
block to import aws_ec2_local_gateway_route
using the EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_
). For example:
import {
to = aws_ec2_local_gateway_route.example
id = "lgw-rtb-12345678_172.16.0.0/16"
}
Using terraform import
, import aws_ec2_local_gateway_route
using the EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_
). For example:
% terraform import aws_ec2_local_gateway_route.example lgw-rtb-12345678_172.16.0.0/16