1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2transitgateway
  5. PrefixListReference

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.ec2transitgateway.PrefixListReference

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Manages an EC2 Transit Gateway Prefix List Reference.

    Example Usage

    Attachment Routing

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.PrefixListReference("example", {
        prefixListId: exampleAwsEc2ManagedPrefixList.id,
        transitGatewayAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id,
        transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.PrefixListReference("example",
        prefix_list_id=example_aws_ec2_managed_prefix_list["id"],
        transit_gateway_attachment_id=example_aws_ec2_transit_gateway_vpc_attachment["id"],
        transit_gateway_route_table_id=example_aws_ec2_transit_gateway["associationDefaultRouteTableId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.NewPrefixListReference(ctx, "example", &ec2transitgateway.PrefixListReferenceArgs{
    			PrefixListId:               pulumi.Any(exampleAwsEc2ManagedPrefixList.Id),
    			TransitGatewayAttachmentId: pulumi.Any(exampleAwsEc2TransitGatewayVpcAttachment.Id),
    			TransitGatewayRouteTableId: pulumi.Any(exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2TransitGateway.PrefixListReference("example", new()
        {
            PrefixListId = exampleAwsEc2ManagedPrefixList.Id,
            TransitGatewayAttachmentId = exampleAwsEc2TransitGatewayVpcAttachment.Id,
            TransitGatewayRouteTableId = exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.PrefixListReference;
    import com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new PrefixListReference("example", PrefixListReferenceArgs.builder()        
                .prefixListId(exampleAwsEc2ManagedPrefixList.id())
                .transitGatewayAttachmentId(exampleAwsEc2TransitGatewayVpcAttachment.id())
                .transitGatewayRouteTableId(exampleAwsEc2TransitGateway.associationDefaultRouteTableId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:PrefixListReference
        properties:
          prefixListId: ${exampleAwsEc2ManagedPrefixList.id}
          transitGatewayAttachmentId: ${exampleAwsEc2TransitGatewayVpcAttachment.id}
          transitGatewayRouteTableId: ${exampleAwsEc2TransitGateway.associationDefaultRouteTableId}
    

    Blackhole Routing

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.PrefixListReference("example", {
        blackhole: true,
        prefixListId: exampleAwsEc2ManagedPrefixList.id,
        transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.PrefixListReference("example",
        blackhole=True,
        prefix_list_id=example_aws_ec2_managed_prefix_list["id"],
        transit_gateway_route_table_id=example_aws_ec2_transit_gateway["associationDefaultRouteTableId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.NewPrefixListReference(ctx, "example", &ec2transitgateway.PrefixListReferenceArgs{
    			Blackhole:                  pulumi.Bool(true),
    			PrefixListId:               pulumi.Any(exampleAwsEc2ManagedPrefixList.Id),
    			TransitGatewayRouteTableId: pulumi.Any(exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2TransitGateway.PrefixListReference("example", new()
        {
            Blackhole = true,
            PrefixListId = exampleAwsEc2ManagedPrefixList.Id,
            TransitGatewayRouteTableId = exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.PrefixListReference;
    import com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new PrefixListReference("example", PrefixListReferenceArgs.builder()        
                .blackhole(true)
                .prefixListId(exampleAwsEc2ManagedPrefixList.id())
                .transitGatewayRouteTableId(exampleAwsEc2TransitGateway.associationDefaultRouteTableId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:PrefixListReference
        properties:
          blackhole: true
          prefixListId: ${exampleAwsEc2ManagedPrefixList.id}
          transitGatewayRouteTableId: ${exampleAwsEc2TransitGateway.associationDefaultRouteTableId}
    

    Create PrefixListReference Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrefixListReference(name: string, args: PrefixListReferenceArgs, opts?: CustomResourceOptions);
    @overload
    def PrefixListReference(resource_name: str,
                            args: PrefixListReferenceArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrefixListReference(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            prefix_list_id: Optional[str] = None,
                            transit_gateway_route_table_id: Optional[str] = None,
                            blackhole: Optional[bool] = None,
                            transit_gateway_attachment_id: Optional[str] = None)
    func NewPrefixListReference(ctx *Context, name string, args PrefixListReferenceArgs, opts ...ResourceOption) (*PrefixListReference, error)
    public PrefixListReference(string name, PrefixListReferenceArgs args, CustomResourceOptions? opts = null)
    public PrefixListReference(String name, PrefixListReferenceArgs args)
    public PrefixListReference(String name, PrefixListReferenceArgs args, CustomResourceOptions options)
    
    type: aws:ec2transitgateway:PrefixListReference
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrefixListReferenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrefixListReferenceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrefixListReferenceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrefixListReferenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrefixListReferenceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var prefixListReferenceResource = new Aws.Ec2TransitGateway.PrefixListReference("prefixListReferenceResource", new()
    {
        PrefixListId = "string",
        TransitGatewayRouteTableId = "string",
        Blackhole = false,
        TransitGatewayAttachmentId = "string",
    });
    
    example, err := ec2transitgateway.NewPrefixListReference(ctx, "prefixListReferenceResource", &ec2transitgateway.PrefixListReferenceArgs{
    	PrefixListId:               pulumi.String("string"),
    	TransitGatewayRouteTableId: pulumi.String("string"),
    	Blackhole:                  pulumi.Bool(false),
    	TransitGatewayAttachmentId: pulumi.String("string"),
    })
    
    var prefixListReferenceResource = new PrefixListReference("prefixListReferenceResource", PrefixListReferenceArgs.builder()        
        .prefixListId("string")
        .transitGatewayRouteTableId("string")
        .blackhole(false)
        .transitGatewayAttachmentId("string")
        .build());
    
    prefix_list_reference_resource = aws.ec2transitgateway.PrefixListReference("prefixListReferenceResource",
        prefix_list_id="string",
        transit_gateway_route_table_id="string",
        blackhole=False,
        transit_gateway_attachment_id="string")
    
    const prefixListReferenceResource = new aws.ec2transitgateway.PrefixListReference("prefixListReferenceResource", {
        prefixListId: "string",
        transitGatewayRouteTableId: "string",
        blackhole: false,
        transitGatewayAttachmentId: "string",
    });
    
    type: aws:ec2transitgateway:PrefixListReference
    properties:
        blackhole: false
        prefixListId: string
        transitGatewayAttachmentId: string
        transitGatewayRouteTableId: string
    

    PrefixListReference Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PrefixListReference resource accepts the following input properties:

    PrefixListId string
    Identifier of EC2 Prefix List.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    Blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    TransitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    PrefixListId string
    Identifier of EC2 Prefix List.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    Blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    TransitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    prefixListId String
    Identifier of EC2 Prefix List.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole Boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    transitGatewayAttachmentId String
    Identifier of EC2 Transit Gateway Attachment.
    prefixListId string
    Identifier of EC2 Prefix List.
    transitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    transitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    prefix_list_id str
    Identifier of EC2 Prefix List.
    transit_gateway_route_table_id str

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    transit_gateway_attachment_id str
    Identifier of EC2 Transit Gateway Attachment.
    prefixListId String
    Identifier of EC2 Prefix List.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole Boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    transitGatewayAttachmentId String
    Identifier of EC2 Transit Gateway Attachment.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrefixListReference resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PrefixListOwnerId string
    Id string
    The provider-assigned unique ID for this managed resource.
    PrefixListOwnerId string
    id String
    The provider-assigned unique ID for this managed resource.
    prefixListOwnerId String
    id string
    The provider-assigned unique ID for this managed resource.
    prefixListOwnerId string
    id str
    The provider-assigned unique ID for this managed resource.
    prefix_list_owner_id str
    id String
    The provider-assigned unique ID for this managed resource.
    prefixListOwnerId String

    Look up Existing PrefixListReference Resource

    Get an existing PrefixListReference resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PrefixListReferenceState, opts?: CustomResourceOptions): PrefixListReference
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blackhole: Optional[bool] = None,
            prefix_list_id: Optional[str] = None,
            prefix_list_owner_id: Optional[str] = None,
            transit_gateway_attachment_id: Optional[str] = None,
            transit_gateway_route_table_id: Optional[str] = None) -> PrefixListReference
    func GetPrefixListReference(ctx *Context, name string, id IDInput, state *PrefixListReferenceState, opts ...ResourceOption) (*PrefixListReference, error)
    public static PrefixListReference Get(string name, Input<string> id, PrefixListReferenceState? state, CustomResourceOptions? opts = null)
    public static PrefixListReference get(String name, Output<String> id, PrefixListReferenceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    PrefixListId string
    Identifier of EC2 Prefix List.
    PrefixListOwnerId string
    TransitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    Blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    PrefixListId string
    Identifier of EC2 Prefix List.
    PrefixListOwnerId string
    TransitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    TransitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole Boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    prefixListId String
    Identifier of EC2 Prefix List.
    prefixListOwnerId String
    transitGatewayAttachmentId String
    Identifier of EC2 Transit Gateway Attachment.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    prefixListId string
    Identifier of EC2 Prefix List.
    prefixListOwnerId string
    transitGatewayAttachmentId string
    Identifier of EC2 Transit Gateway Attachment.
    transitGatewayRouteTableId string

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole bool
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    prefix_list_id str
    Identifier of EC2 Prefix List.
    prefix_list_owner_id str
    transit_gateway_attachment_id str
    Identifier of EC2 Transit Gateway Attachment.
    transit_gateway_route_table_id str

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    blackhole Boolean
    Indicates whether to drop traffic that matches the Prefix List. Defaults to false.
    prefixListId String
    Identifier of EC2 Prefix List.
    prefixListOwnerId String
    transitGatewayAttachmentId String
    Identifier of EC2 Transit Gateway Attachment.
    transitGatewayRouteTableId String

    Identifier of EC2 Transit Gateway Route Table.

    The following arguments are optional:

    Import

    Using pulumi 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:

    $ pulumi import aws:ec2transitgateway/prefixListReference:PrefixListReference example tgw-rtb-12345678_pl-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi