1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. TransitGatewayRouteTableAttachment
AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi

aws.networkmanager.TransitGatewayRouteTableAttachment

Explore with Pulumi AI

aws logo
AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi

    Manages a Network Manager transit gateway route table attachment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkmanager.TransitGatewayRouteTableAttachment("example", {
        peeringId: exampleAwsNetworkmanagerTransitGatewayPeering.id,
        transitGatewayRouteTableArn: exampleAwsEc2TransitGatewayRouteTable.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.TransitGatewayRouteTableAttachment("example",
        peering_id=example_aws_networkmanager_transit_gateway_peering["id"],
        transit_gateway_route_table_arn=example_aws_ec2_transit_gateway_route_table["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkmanager.NewTransitGatewayRouteTableAttachment(ctx, "example", &networkmanager.TransitGatewayRouteTableAttachmentArgs{
    			PeeringId:                   pulumi.Any(exampleAwsNetworkmanagerTransitGatewayPeering.Id),
    			TransitGatewayRouteTableArn: pulumi.Any(exampleAwsEc2TransitGatewayRouteTable.Arn),
    		})
    		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.NetworkManager.TransitGatewayRouteTableAttachment("example", new()
        {
            PeeringId = exampleAwsNetworkmanagerTransitGatewayPeering.Id,
            TransitGatewayRouteTableArn = exampleAwsEc2TransitGatewayRouteTable.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.TransitGatewayRouteTableAttachment;
    import com.pulumi.aws.networkmanager.TransitGatewayRouteTableAttachmentArgs;
    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 TransitGatewayRouteTableAttachment("example", TransitGatewayRouteTableAttachmentArgs.builder()
                .peeringId(exampleAwsNetworkmanagerTransitGatewayPeering.id())
                .transitGatewayRouteTableArn(exampleAwsEc2TransitGatewayRouteTable.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:TransitGatewayRouteTableAttachment
        properties:
          peeringId: ${exampleAwsNetworkmanagerTransitGatewayPeering.id}
          transitGatewayRouteTableArn: ${exampleAwsEc2TransitGatewayRouteTable.arn}
    

    Create TransitGatewayRouteTableAttachment Resource

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

    Constructor syntax

    new TransitGatewayRouteTableAttachment(name: string, args: TransitGatewayRouteTableAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def TransitGatewayRouteTableAttachment(resource_name: str,
                                           args: TransitGatewayRouteTableAttachmentArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def TransitGatewayRouteTableAttachment(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           peering_id: Optional[str] = None,
                                           transit_gateway_route_table_arn: Optional[str] = None,
                                           tags: Optional[Mapping[str, str]] = None)
    func NewTransitGatewayRouteTableAttachment(ctx *Context, name string, args TransitGatewayRouteTableAttachmentArgs, opts ...ResourceOption) (*TransitGatewayRouteTableAttachment, error)
    public TransitGatewayRouteTableAttachment(string name, TransitGatewayRouteTableAttachmentArgs args, CustomResourceOptions? opts = null)
    public TransitGatewayRouteTableAttachment(String name, TransitGatewayRouteTableAttachmentArgs args)
    public TransitGatewayRouteTableAttachment(String name, TransitGatewayRouteTableAttachmentArgs args, CustomResourceOptions options)
    
    type: aws:networkmanager:TransitGatewayRouteTableAttachment
    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 TransitGatewayRouteTableAttachmentArgs
    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 TransitGatewayRouteTableAttachmentArgs
    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 TransitGatewayRouteTableAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TransitGatewayRouteTableAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TransitGatewayRouteTableAttachmentArgs
    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 transitGatewayRouteTableAttachmentResource = new Aws.NetworkManager.TransitGatewayRouteTableAttachment("transitGatewayRouteTableAttachmentResource", new()
    {
        PeeringId = "string",
        TransitGatewayRouteTableArn = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := networkmanager.NewTransitGatewayRouteTableAttachment(ctx, "transitGatewayRouteTableAttachmentResource", &networkmanager.TransitGatewayRouteTableAttachmentArgs{
    	PeeringId:                   pulumi.String("string"),
    	TransitGatewayRouteTableArn: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var transitGatewayRouteTableAttachmentResource = new TransitGatewayRouteTableAttachment("transitGatewayRouteTableAttachmentResource", TransitGatewayRouteTableAttachmentArgs.builder()
        .peeringId("string")
        .transitGatewayRouteTableArn("string")
        .tags(Map.of("string", "string"))
        .build());
    
    transit_gateway_route_table_attachment_resource = aws.networkmanager.TransitGatewayRouteTableAttachment("transitGatewayRouteTableAttachmentResource",
        peering_id="string",
        transit_gateway_route_table_arn="string",
        tags={
            "string": "string",
        })
    
    const transitGatewayRouteTableAttachmentResource = new aws.networkmanager.TransitGatewayRouteTableAttachment("transitGatewayRouteTableAttachmentResource", {
        peeringId: "string",
        transitGatewayRouteTableArn: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:networkmanager:TransitGatewayRouteTableAttachment
    properties:
        peeringId: string
        tags:
            string: string
        transitGatewayRouteTableArn: string
    

    TransitGatewayRouteTableAttachment 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 TransitGatewayRouteTableAttachment resource accepts the following input properties:

    PeeringId string
    ID of the peer for the attachment.
    TransitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    PeeringId string
    ID of the peer for the attachment.
    TransitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    Tags map[string]string
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    peeringId String
    ID of the peer for the attachment.
    transitGatewayRouteTableArn String

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    tags Map<String,String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    peeringId string
    ID of the peer for the attachment.
    transitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    tags {[key: string]: string}
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    peering_id str
    ID of the peer for the attachment.
    transit_gateway_route_table_arn str

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    tags Mapping[str, str]
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    peeringId String
    ID of the peer for the attachment.
    transitGatewayRouteTableArn String

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    tags Map<String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    Attachment ARN.
    AttachmentPolicyRuleNumber int
    Policy rule number associated with the attachment.
    AttachmentType string
    Type of attachment.
    CoreNetworkArn string
    ARN of the core network.
    CoreNetworkId string
    ID of the core network.
    EdgeLocation string
    Edge location for the peer.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    ID of the attachment account owner.
    ResourceArn string
    Attachment resource ARN.
    SegmentName string
    Name of the segment attachment.
    State string
    State of the attachment.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Arn string
    Attachment ARN.
    AttachmentPolicyRuleNumber int
    Policy rule number associated with the attachment.
    AttachmentType string
    Type of attachment.
    CoreNetworkArn string
    ARN of the core network.
    CoreNetworkId string
    ID of the core network.
    EdgeLocation string
    Edge location for the peer.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    ID of the attachment account owner.
    ResourceArn string
    Attachment resource ARN.
    SegmentName string
    Name of the segment attachment.
    State string
    State of the attachment.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    arn String
    Attachment ARN.
    attachmentPolicyRuleNumber Integer
    Policy rule number associated with the attachment.
    attachmentType String
    Type of attachment.
    coreNetworkArn String
    ARN of the core network.
    coreNetworkId String
    ID of the core network.
    edgeLocation String
    Edge location for the peer.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    ID of the attachment account owner.
    resourceArn String
    Attachment resource ARN.
    segmentName String
    Name of the segment attachment.
    state String
    State of the attachment.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    arn string
    Attachment ARN.
    attachmentPolicyRuleNumber number
    Policy rule number associated with the attachment.
    attachmentType string
    Type of attachment.
    coreNetworkArn string
    ARN of the core network.
    coreNetworkId string
    ID of the core network.
    edgeLocation string
    Edge location for the peer.
    id string
    The provider-assigned unique ID for this managed resource.
    ownerAccountId string
    ID of the attachment account owner.
    resourceArn string
    Attachment resource ARN.
    segmentName string
    Name of the segment attachment.
    state string
    State of the attachment.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    arn str
    Attachment ARN.
    attachment_policy_rule_number int
    Policy rule number associated with the attachment.
    attachment_type str
    Type of attachment.
    core_network_arn str
    ARN of the core network.
    core_network_id str
    ID of the core network.
    edge_location str
    Edge location for the peer.
    id str
    The provider-assigned unique ID for this managed resource.
    owner_account_id str
    ID of the attachment account owner.
    resource_arn str
    Attachment resource ARN.
    segment_name str
    Name of the segment attachment.
    state str
    State of the attachment.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    arn String
    Attachment ARN.
    attachmentPolicyRuleNumber Number
    Policy rule number associated with the attachment.
    attachmentType String
    Type of attachment.
    coreNetworkArn String
    ARN of the core network.
    coreNetworkId String
    ID of the core network.
    edgeLocation String
    Edge location for the peer.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    ID of the attachment account owner.
    resourceArn String
    Attachment resource ARN.
    segmentName String
    Name of the segment attachment.
    state String
    State of the attachment.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Look up Existing TransitGatewayRouteTableAttachment Resource

    Get an existing TransitGatewayRouteTableAttachment 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?: TransitGatewayRouteTableAttachmentState, opts?: CustomResourceOptions): TransitGatewayRouteTableAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            attachment_policy_rule_number: Optional[int] = None,
            attachment_type: Optional[str] = None,
            core_network_arn: Optional[str] = None,
            core_network_id: Optional[str] = None,
            edge_location: Optional[str] = None,
            owner_account_id: Optional[str] = None,
            peering_id: Optional[str] = None,
            resource_arn: Optional[str] = None,
            segment_name: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            transit_gateway_route_table_arn: Optional[str] = None) -> TransitGatewayRouteTableAttachment
    func GetTransitGatewayRouteTableAttachment(ctx *Context, name string, id IDInput, state *TransitGatewayRouteTableAttachmentState, opts ...ResourceOption) (*TransitGatewayRouteTableAttachment, error)
    public static TransitGatewayRouteTableAttachment Get(string name, Input<string> id, TransitGatewayRouteTableAttachmentState? state, CustomResourceOptions? opts = null)
    public static TransitGatewayRouteTableAttachment get(String name, Output<String> id, TransitGatewayRouteTableAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: aws:networkmanager:TransitGatewayRouteTableAttachment    get:      id: ${id}
    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:
    Arn string
    Attachment ARN.
    AttachmentPolicyRuleNumber int
    Policy rule number associated with the attachment.
    AttachmentType string
    Type of attachment.
    CoreNetworkArn string
    ARN of the core network.
    CoreNetworkId string
    ID of the core network.
    EdgeLocation string
    Edge location for the peer.
    OwnerAccountId string
    ID of the attachment account owner.
    PeeringId string
    ID of the peer for the attachment.
    ResourceArn string
    Attachment resource ARN.
    SegmentName string
    Name of the segment attachment.
    State string
    State of the attachment.
    Tags Dictionary<string, string>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    Arn string
    Attachment ARN.
    AttachmentPolicyRuleNumber int
    Policy rule number associated with the attachment.
    AttachmentType string
    Type of attachment.
    CoreNetworkArn string
    ARN of the core network.
    CoreNetworkId string
    ID of the core network.
    EdgeLocation string
    Edge location for the peer.
    OwnerAccountId string
    ID of the attachment account owner.
    PeeringId string
    ID of the peer for the attachment.
    ResourceArn string
    Attachment resource ARN.
    SegmentName string
    Name of the segment attachment.
    State string
    State of the attachment.
    Tags map[string]string
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    arn String
    Attachment ARN.
    attachmentPolicyRuleNumber Integer
    Policy rule number associated with the attachment.
    attachmentType String
    Type of attachment.
    coreNetworkArn String
    ARN of the core network.
    coreNetworkId String
    ID of the core network.
    edgeLocation String
    Edge location for the peer.
    ownerAccountId String
    ID of the attachment account owner.
    peeringId String
    ID of the peer for the attachment.
    resourceArn String
    Attachment resource ARN.
    segmentName String
    Name of the segment attachment.
    state String
    State of the attachment.
    tags Map<String,String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayRouteTableArn String

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    arn string
    Attachment ARN.
    attachmentPolicyRuleNumber number
    Policy rule number associated with the attachment.
    attachmentType string
    Type of attachment.
    coreNetworkArn string
    ARN of the core network.
    coreNetworkId string
    ID of the core network.
    edgeLocation string
    Edge location for the peer.
    ownerAccountId string
    ID of the attachment account owner.
    peeringId string
    ID of the peer for the attachment.
    resourceArn string
    Attachment resource ARN.
    segmentName string
    Name of the segment attachment.
    state string
    State of the attachment.
    tags {[key: string]: string}
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayRouteTableArn string

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    arn str
    Attachment ARN.
    attachment_policy_rule_number int
    Policy rule number associated with the attachment.
    attachment_type str
    Type of attachment.
    core_network_arn str
    ARN of the core network.
    core_network_id str
    ID of the core network.
    edge_location str
    Edge location for the peer.
    owner_account_id str
    ID of the attachment account owner.
    peering_id str
    ID of the peer for the attachment.
    resource_arn str
    Attachment resource ARN.
    segment_name str
    Name of the segment attachment.
    state str
    State of the attachment.
    tags Mapping[str, str]
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transit_gateway_route_table_arn str

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    arn String
    Attachment ARN.
    attachmentPolicyRuleNumber Number
    Policy rule number associated with the attachment.
    attachmentType String
    Type of attachment.
    coreNetworkArn String
    ARN of the core network.
    coreNetworkId String
    ID of the core network.
    edgeLocation String
    Edge location for the peer.
    ownerAccountId String
    ID of the attachment account owner.
    peeringId String
    ID of the peer for the attachment.
    resourceArn String
    Attachment resource ARN.
    segmentName String
    Name of the segment attachment.
    state String
    State of the attachment.
    tags Map<String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayRouteTableArn String

    ARN of the transit gateway route table for the attachment.

    The following arguments are optional:

    Import

    Using pulumi import, import aws_networkmanager_transit_gateway_route_table_attachment using the attachment ID. For example:

    $ pulumi import aws:networkmanager/transitGatewayRouteTableAttachment:TransitGatewayRouteTableAttachment example attachment-0f8fa60d2238d1bd8
    

    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
    AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi