1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. PeeringAttachment
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ec2transitgateway.PeeringAttachment

Explore with Pulumi AI

Manages an EC2 Transit Gateway Peering Attachment. For examples of custom route table association and propagation, see the EC2 Transit Gateway Networking Examples Guide.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const peer = aws.getRegion({});
const local = new aws.ec2transitgateway.TransitGateway("local", {tags: {
    Name: "Local TGW",
}});
const peerTransitGateway = new aws.ec2transitgateway.TransitGateway("peer", {tags: {
    Name: "Peer TGW",
}});
const example = new aws.ec2transitgateway.PeeringAttachment("example", {
    peerAccountId: peerTransitGateway.ownerId,
    peerRegion: peer.then(peer => peer.name),
    peerTransitGatewayId: peerTransitGateway.id,
    transitGatewayId: local.id,
    tags: {
        Name: "TGW Peering Requestor",
    },
});
Copy
import pulumi
import pulumi_aws as aws

peer = aws.get_region()
local = aws.ec2transitgateway.TransitGateway("local", tags={
    "Name": "Local TGW",
})
peer_transit_gateway = aws.ec2transitgateway.TransitGateway("peer", tags={
    "Name": "Peer TGW",
})
example = aws.ec2transitgateway.PeeringAttachment("example",
    peer_account_id=peer_transit_gateway.owner_id,
    peer_region=peer.name,
    peer_transit_gateway_id=peer_transit_gateway.id,
    transit_gateway_id=local.id,
    tags={
        "Name": "TGW Peering Requestor",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
	"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 {
		peer, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
		if err != nil {
			return err
		}
		local, err := ec2transitgateway.NewTransitGateway(ctx, "local", &ec2transitgateway.TransitGatewayArgs{
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Local TGW"),
			},
		})
		if err != nil {
			return err
		}
		peerTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, "peer", &ec2transitgateway.TransitGatewayArgs{
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Peer TGW"),
			},
		})
		if err != nil {
			return err
		}
		_, err = ec2transitgateway.NewPeeringAttachment(ctx, "example", &ec2transitgateway.PeeringAttachmentArgs{
			PeerAccountId:        peerTransitGateway.OwnerId,
			PeerRegion:           pulumi.String(peer.Name),
			PeerTransitGatewayId: peerTransitGateway.ID(),
			TransitGatewayId:     local.ID(),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("TGW Peering Requestor"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var peer = Aws.GetRegion.Invoke();

    var local = new Aws.Ec2TransitGateway.TransitGateway("local", new()
    {
        Tags = 
        {
            { "Name", "Local TGW" },
        },
    });

    var peerTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("peer", new()
    {
        Tags = 
        {
            { "Name", "Peer TGW" },
        },
    });

    var example = new Aws.Ec2TransitGateway.PeeringAttachment("example", new()
    {
        PeerAccountId = peerTransitGateway.OwnerId,
        PeerRegion = peer.Apply(getRegionResult => getRegionResult.Name),
        PeerTransitGatewayId = peerTransitGateway.Id,
        TransitGatewayId = local.Id,
        Tags = 
        {
            { "Name", "TGW Peering Requestor" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.ec2transitgateway.TransitGateway;
import com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;
import com.pulumi.aws.ec2transitgateway.PeeringAttachment;
import com.pulumi.aws.ec2transitgateway.PeeringAttachmentArgs;
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) {
        final var peer = AwsFunctions.getRegion(GetRegionArgs.builder()
            .build());

        var local = new TransitGateway("local", TransitGatewayArgs.builder()
            .tags(Map.of("Name", "Local TGW"))
            .build());

        var peerTransitGateway = new TransitGateway("peerTransitGateway", TransitGatewayArgs.builder()
            .tags(Map.of("Name", "Peer TGW"))
            .build());

        var example = new PeeringAttachment("example", PeeringAttachmentArgs.builder()
            .peerAccountId(peerTransitGateway.ownerId())
            .peerRegion(peer.name())
            .peerTransitGatewayId(peerTransitGateway.id())
            .transitGatewayId(local.id())
            .tags(Map.of("Name", "TGW Peering Requestor"))
            .build());

    }
}
Copy
resources:
  local:
    type: aws:ec2transitgateway:TransitGateway
    properties:
      tags:
        Name: Local TGW
  peerTransitGateway:
    type: aws:ec2transitgateway:TransitGateway
    name: peer
    properties:
      tags:
        Name: Peer TGW
  example:
    type: aws:ec2transitgateway:PeeringAttachment
    properties:
      peerAccountId: ${peerTransitGateway.ownerId}
      peerRegion: ${peer.name}
      peerTransitGatewayId: ${peerTransitGateway.id}
      transitGatewayId: ${local.id}
      tags:
        Name: TGW Peering Requestor
variables:
  peer:
    fn::invoke:
      function: aws:getRegion
      arguments: {}
Copy

Create PeeringAttachment Resource

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

Constructor syntax

new PeeringAttachment(name: string, args: PeeringAttachmentArgs, opts?: CustomResourceOptions);
@overload
def PeeringAttachment(resource_name: str,
                      args: PeeringAttachmentArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def PeeringAttachment(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      peer_region: Optional[str] = None,
                      peer_transit_gateway_id: Optional[str] = None,
                      transit_gateway_id: Optional[str] = None,
                      options: Optional[PeeringAttachmentOptionsArgs] = None,
                      peer_account_id: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
func NewPeeringAttachment(ctx *Context, name string, args PeeringAttachmentArgs, opts ...ResourceOption) (*PeeringAttachment, error)
public PeeringAttachment(string name, PeeringAttachmentArgs args, CustomResourceOptions? opts = null)
public PeeringAttachment(String name, PeeringAttachmentArgs args)
public PeeringAttachment(String name, PeeringAttachmentArgs args, CustomResourceOptions options)
type: aws:ec2transitgateway:PeeringAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PeeringAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PeeringAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PeeringAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PeeringAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PeeringAttachmentArgs
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 peeringAttachmentResource = new Aws.Ec2TransitGateway.PeeringAttachment("peeringAttachmentResource", new()
{
    PeerRegion = "string",
    PeerTransitGatewayId = "string",
    TransitGatewayId = "string",
    Options = new Aws.Ec2TransitGateway.Inputs.PeeringAttachmentOptionsArgs
    {
        DynamicRouting = "string",
    },
    PeerAccountId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := ec2transitgateway.NewPeeringAttachment(ctx, "peeringAttachmentResource", &ec2transitgateway.PeeringAttachmentArgs{
	PeerRegion:           pulumi.String("string"),
	PeerTransitGatewayId: pulumi.String("string"),
	TransitGatewayId:     pulumi.String("string"),
	Options: &ec2transitgateway.PeeringAttachmentOptionsArgs{
		DynamicRouting: pulumi.String("string"),
	},
	PeerAccountId: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var peeringAttachmentResource = new PeeringAttachment("peeringAttachmentResource", PeeringAttachmentArgs.builder()
    .peerRegion("string")
    .peerTransitGatewayId("string")
    .transitGatewayId("string")
    .options(PeeringAttachmentOptionsArgs.builder()
        .dynamicRouting("string")
        .build())
    .peerAccountId("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
peering_attachment_resource = aws.ec2transitgateway.PeeringAttachment("peeringAttachmentResource",
    peer_region="string",
    peer_transit_gateway_id="string",
    transit_gateway_id="string",
    options={
        "dynamic_routing": "string",
    },
    peer_account_id="string",
    tags={
        "string": "string",
    })
Copy
const peeringAttachmentResource = new aws.ec2transitgateway.PeeringAttachment("peeringAttachmentResource", {
    peerRegion: "string",
    peerTransitGatewayId: "string",
    transitGatewayId: "string",
    options: {
        dynamicRouting: "string",
    },
    peerAccountId: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:ec2transitgateway:PeeringAttachment
properties:
    options:
        dynamicRouting: string
    peerAccountId: string
    peerRegion: string
    peerTransitGatewayId: string
    tags:
        string: string
    transitGatewayId: string
Copy

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

PeerRegion
This property is required.
Changes to this property will trigger replacement.
string
Region of EC2 Transit Gateway to peer with.
PeerTransitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway to peer with.
TransitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway.
Options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
PeerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
Tags Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
PeerRegion
This property is required.
Changes to this property will trigger replacement.
string
Region of EC2 Transit Gateway to peer with.
PeerTransitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway to peer with.
TransitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway.
Options Changes to this property will trigger replacement. PeeringAttachmentOptionsArgs
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
PeerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
Tags map[string]string
Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
peerRegion
This property is required.
Changes to this property will trigger replacement.
String
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of EC2 Transit Gateway to peer with.
transitGatewayId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of EC2 Transit Gateway.
options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. String
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
tags Map<String,String>
Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
peerRegion
This property is required.
Changes to this property will trigger replacement.
string
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway to peer with.
transitGatewayId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of EC2 Transit Gateway.
options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
tags {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
peer_region
This property is required.
Changes to this property will trigger replacement.
str
Region of EC2 Transit Gateway to peer with.
peer_transit_gateway_id
This property is required.
Changes to this property will trigger replacement.
str
Identifier of EC2 Transit Gateway to peer with.
transit_gateway_id
This property is required.
Changes to this property will trigger replacement.
str
Identifier of EC2 Transit Gateway.
options Changes to this property will trigger replacement. PeeringAttachmentOptionsArgs
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peer_account_id Changes to this property will trigger replacement. str
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
tags Mapping[str, str]
Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
peerRegion
This property is required.
Changes to this property will trigger replacement.
String
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of EC2 Transit Gateway to peer with.
transitGatewayId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of EC2 Transit Gateway.
options Changes to this property will trigger replacement. Property Map
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. String
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
tags Map<String>
Key-value tags for the EC2 Transit Gateway Peering 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 PeeringAttachment resource produces the following output properties:

Arn string
ARN of the attachment.
Id string
The provider-assigned unique ID for this managed resource.
State string
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
ARN of the attachment.
Id string
The provider-assigned unique ID for this managed resource.
State string
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the attachment.
id String
The provider-assigned unique ID for this managed resource.
state String
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
ARN of the attachment.
id string
The provider-assigned unique ID for this managed resource.
state string
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
ARN of the attachment.
id str
The provider-assigned unique ID for this managed resource.
state str
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the attachment.
id String
The provider-assigned unique ID for this managed resource.
state String
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing PeeringAttachment Resource

Get an existing PeeringAttachment 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?: PeeringAttachmentState, opts?: CustomResourceOptions): PeeringAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        options: Optional[PeeringAttachmentOptionsArgs] = None,
        peer_account_id: Optional[str] = None,
        peer_region: Optional[str] = None,
        peer_transit_gateway_id: Optional[str] = None,
        state: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        transit_gateway_id: Optional[str] = None) -> PeeringAttachment
func GetPeeringAttachment(ctx *Context, name string, id IDInput, state *PeeringAttachmentState, opts ...ResourceOption) (*PeeringAttachment, error)
public static PeeringAttachment Get(string name, Input<string> id, PeeringAttachmentState? state, CustomResourceOptions? opts = null)
public static PeeringAttachment get(String name, Output<String> id, PeeringAttachmentState state, CustomResourceOptions options)
resources:  _:    type: aws:ec2transitgateway:PeeringAttachment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
ARN of the attachment.
Options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
PeerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
PeerRegion Changes to this property will trigger replacement. string
Region of EC2 Transit Gateway to peer with.
PeerTransitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway to peer with.
State string
Tags Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Peering 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>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TransitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway.
Arn string
ARN of the attachment.
Options Changes to this property will trigger replacement. PeeringAttachmentOptionsArgs
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
PeerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
PeerRegion Changes to this property will trigger replacement. string
Region of EC2 Transit Gateway to peer with.
PeerTransitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway to peer with.
State string
Tags map[string]string
Key-value tags for the EC2 Transit Gateway Peering 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
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TransitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway.
arn String
ARN of the attachment.
options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. String
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
peerRegion Changes to this property will trigger replacement. String
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId Changes to this property will trigger replacement. String
Identifier of EC2 Transit Gateway to peer with.
state String
tags Map<String,String>
Key-value tags for the EC2 Transit Gateway Peering 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>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

transitGatewayId Changes to this property will trigger replacement. String
Identifier of EC2 Transit Gateway.
arn string
ARN of the attachment.
options Changes to this property will trigger replacement. PeeringAttachmentOptions
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. string
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
peerRegion Changes to this property will trigger replacement. string
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway to peer with.
state string
tags {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Peering 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}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

transitGatewayId Changes to this property will trigger replacement. string
Identifier of EC2 Transit Gateway.
arn str
ARN of the attachment.
options Changes to this property will trigger replacement. PeeringAttachmentOptionsArgs
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peer_account_id Changes to this property will trigger replacement. str
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
peer_region Changes to this property will trigger replacement. str
Region of EC2 Transit Gateway to peer with.
peer_transit_gateway_id Changes to this property will trigger replacement. str
Identifier of EC2 Transit Gateway to peer with.
state str
tags Mapping[str, str]
Key-value tags for the EC2 Transit Gateway Peering 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]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

transit_gateway_id Changes to this property will trigger replacement. str
Identifier of EC2 Transit Gateway.
arn String
ARN of the attachment.
options Changes to this property will trigger replacement. Property Map
Describes whether dynamic routing is enabled or disabled for the transit gateway peering request. See options below for more details!
peerAccountId Changes to this property will trigger replacement. String
Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the AWS provider is currently connected to.
peerRegion Changes to this property will trigger replacement. String
Region of EC2 Transit Gateway to peer with.
peerTransitGatewayId Changes to this property will trigger replacement. String
Identifier of EC2 Transit Gateway to peer with.
state String
tags Map<String>
Key-value tags for the EC2 Transit Gateway Peering 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>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

transitGatewayId Changes to this property will trigger replacement. String
Identifier of EC2 Transit Gateway.

Supporting Types

PeeringAttachmentOptions
, PeeringAttachmentOptionsArgs

DynamicRouting Changes to this property will trigger replacement. string
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.
DynamicRouting Changes to this property will trigger replacement. string
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.
dynamicRouting Changes to this property will trigger replacement. String
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.
dynamicRouting Changes to this property will trigger replacement. string
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.
dynamic_routing Changes to this property will trigger replacement. str
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.
dynamicRouting Changes to this property will trigger replacement. String
Indicates whether dynamic routing is enabled or disabled.. Supports enable and disable.

Import

Using pulumi import, import aws_ec2_transit_gateway_peering_attachment using the EC2 Transit Gateway Attachment identifier. For example:

$ pulumi import aws:ec2transitgateway/peeringAttachment:PeeringAttachment example tgw-attach-12345678
Copy

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.