Skip to content

Resource: awsEc2TransitGatewayPrefixListReference

Manages an EC2 Transit Gateway Prefix List Reference.

Example Usage

Attachment Routing

/*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.ec2TransitGatewayPrefixListReference.Ec2TransitGatewayPrefixListReference(
  this,
  "example",
  {
    prefixListId: "${aws_ec2_managed_prefix_list.example.id}",
    transitGatewayAttachmentId:
      "${aws_ec2_transit_gateway_vpc_attachment.example.id}",
    transitGatewayRouteTableId:
      "${aws_ec2_transit_gateway.example.association_default_route_table_id}",
  }
);

Blackhole Routing

/*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.ec2TransitGatewayPrefixListReference.Ec2TransitGatewayPrefixListReference(
  this,
  "example",
  {
    blackhole: true,
    prefixListId: "${aws_ec2_managed_prefix_list.example.id}",
    transitGatewayRouteTableId:
      "${aws_ec2_transit_gateway.example.association_default_route_table_id}",
  }
);

Argument Reference

The following arguments are required:

  • prefixListId - (Required) Identifier of EC2 Prefix List.
  • transitGatewayRouteTableId - (Required) Identifier of EC2 Transit Gateway Route Table.

The following arguments are optional:

  • blackhole - (Optional) Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
  • transitGatewayAttachmentId - (Optional) Identifier of EC2 Transit Gateway Attachment.

Attributes Reference

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

  • id - EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (_)

Import

awsEc2TransitGatewayPrefixListReference can be imported by using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (_), e.g.,

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