Resource: aws_ec2_transit_gateway_prefix_list_reference

Manages an EC2 Transit Gateway Prefix List Reference.

Example Usage

Attachment Routing

resource "aws_ec2_transit_gateway_prefix_list_reference" "example" {
  prefix_list_id                 = aws_ec2_managed_prefix_list.example.id
  transit_gateway_attachment_id  = aws_ec2_transit_gateway_vpc_attachment.example.id
  transit_gateway_route_table_id = aws_ec2_transit_gateway.example.association_default_route_table_id
}

Blackhole Routing

resource "aws_ec2_transit_gateway_prefix_list_reference" "example" {
  blackhole                      = true
  prefix_list_id                 = aws_ec2_managed_prefix_list.example.id
  transit_gateway_route_table_id = aws_ec2_transit_gateway.example.association_default_route_table_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_transit_gateway_prefix_list_reference using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (_). For example:

import {
  to = aws_ec2_transit_gateway_prefix_list_reference.example
  id = "tgw-rtb-12345678_pl-12345678"
}

Using terraform import, import aws_ec2_transit_gateway_prefix_list_reference using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (_). For example:

% terraform import aws_ec2_transit_gateway_prefix_list_reference.example tgw-rtb-12345678_pl-12345678