Resource: aws_ec2_local_gateway_route_table_vpc_association

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

Example Usage

data "aws_ec2_local_gateway_route_table" "example" {
  outpost_arn = "arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef"
}

resource "aws_vpc" "example" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_ec2_local_gateway_route_table_vpc_association" "example" {
  local_gateway_route_table_id = data.aws_ec2_local_gateway_route_table.example.id
  vpc_id                       = aws_vpc.example.id
}

Argument Reference

The following arguments are required:

The following arguments are optional:

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_table_vpc_association using the Local Gateway Route Table VPC Association identifier. For example:

import {
  to = aws_ec2_local_gateway_route_table_vpc_association.example
  id = "lgw-vpc-assoc-1234567890abcdef"
}

Using terraform import, import aws_ec2_local_gateway_route_table_vpc_association using the Local Gateway Route Table VPC Association identifier. For example:

% terraform import aws_ec2_local_gateway_route_table_vpc_association.example lgw-vpc-assoc-1234567890abcdef