aws.ec2transitgateway.PrefixListReference
Explore with Pulumi AI
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PrefixListReference resource accepts the following input properties:
- Prefix
List stringId - Identifier of EC2 Prefix List.
- Transit
Gateway stringRoute Table Id 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 stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- Prefix
List stringId - Identifier of EC2 Prefix List.
- Transit
Gateway stringRoute Table Id 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 stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- prefix
List StringId - Identifier of EC2 Prefix List.
- transit
Gateway StringRoute Table Id 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
. - transit
Gateway StringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- prefix
List stringId - Identifier of EC2 Prefix List.
- transit
Gateway stringRoute Table Id 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
. - transit
Gateway stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- prefix_
list_ strid - Identifier of EC2 Prefix List.
- transit_
gateway_ strroute_ table_ id 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_ strattachment_ id - Identifier of EC2 Transit Gateway Attachment.
- prefix
List StringId - Identifier of EC2 Prefix List.
- transit
Gateway StringRoute Table Id 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
. - transit
Gateway StringAttachment Id - 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.
- Prefix
List stringOwner Id
- Id string
- The provider-assigned unique ID for this managed resource.
- Prefix
List stringOwner Id
- id String
- The provider-assigned unique ID for this managed resource.
- prefix
List StringOwner Id
- id string
- The provider-assigned unique ID for this managed resource.
- prefix
List stringOwner Id
- id str
- The provider-assigned unique ID for this managed resource.
- prefix_
list_ strowner_ id
- id String
- The provider-assigned unique ID for this managed resource.
- prefix
List StringOwner Id
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.
- Blackhole bool
- Indicates whether to drop traffic that matches the Prefix List. Defaults to
false
. - Prefix
List stringId - Identifier of EC2 Prefix List.
- Prefix
List stringOwner Id - Transit
Gateway stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id 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 stringId - Identifier of EC2 Prefix List.
- Prefix
List stringOwner Id - Transit
Gateway stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id 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
. - prefix
List StringId - Identifier of EC2 Prefix List.
- prefix
List StringOwner Id - transit
Gateway StringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- transit
Gateway StringRoute Table Id 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
. - prefix
List stringId - Identifier of EC2 Prefix List.
- prefix
List stringOwner Id - transit
Gateway stringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- transit
Gateway stringRoute Table Id 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_ strid - Identifier of EC2 Prefix List.
- prefix_
list_ strowner_ id - transit_
gateway_ strattachment_ id - Identifier of EC2 Transit Gateway Attachment.
- transit_
gateway_ strroute_ table_ id 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
. - prefix
List StringId - Identifier of EC2 Prefix List.
- prefix
List StringOwner Id - transit
Gateway StringAttachment Id - Identifier of EC2 Transit Gateway Attachment.
- transit
Gateway StringRoute Table Id 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.