Resource: aws_ec2_local_gateway_route

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

Example Usage

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
}

Argument Reference

The following arguments are required:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

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