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

aws.networkmanager.TransitGatewayPeering

Explore with Pulumi AI

Creates a peering connection between an AWS Cloud WAN core network and an AWS Transit Gateway.

Example Usage

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

const example = new aws.networkmanager.TransitGatewayPeering("example", {
    coreNetworkId: exampleAwsccNetworkmanagerCoreNetwork.id,
    transitGatewayArn: exampleAwsEc2TransitGateway.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.TransitGatewayPeering("example",
    core_network_id=example_awscc_networkmanager_core_network["id"],
    transit_gateway_arn=example_aws_ec2_transit_gateway["arn"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkmanager.NewTransitGatewayPeering(ctx, "example", &networkmanager.TransitGatewayPeeringArgs{
			CoreNetworkId:     pulumi.Any(exampleAwsccNetworkmanagerCoreNetwork.Id),
			TransitGatewayArn: pulumi.Any(exampleAwsEc2TransitGateway.Arn),
		})
		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 example = new Aws.NetworkManager.TransitGatewayPeering("example", new()
    {
        CoreNetworkId = exampleAwsccNetworkmanagerCoreNetwork.Id,
        TransitGatewayArn = exampleAwsEc2TransitGateway.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.TransitGatewayPeering;
import com.pulumi.aws.networkmanager.TransitGatewayPeeringArgs;
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 TransitGatewayPeering("example", TransitGatewayPeeringArgs.builder()
            .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
            .transitGatewayArn(exampleAwsEc2TransitGateway.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:networkmanager:TransitGatewayPeering
    properties:
      coreNetworkId: ${exampleAwsccNetworkmanagerCoreNetwork.id}
      transitGatewayArn: ${exampleAwsEc2TransitGateway.arn}
Copy

Create TransitGatewayPeering Resource

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

Constructor syntax

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

@overload
def TransitGatewayPeering(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          core_network_id: Optional[str] = None,
                          transit_gateway_arn: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None)
func NewTransitGatewayPeering(ctx *Context, name string, args TransitGatewayPeeringArgs, opts ...ResourceOption) (*TransitGatewayPeering, error)
public TransitGatewayPeering(string name, TransitGatewayPeeringArgs args, CustomResourceOptions? opts = null)
public TransitGatewayPeering(String name, TransitGatewayPeeringArgs args)
public TransitGatewayPeering(String name, TransitGatewayPeeringArgs args, CustomResourceOptions options)
type: aws:networkmanager:TransitGatewayPeering
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. TransitGatewayPeeringArgs
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. TransitGatewayPeeringArgs
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. TransitGatewayPeeringArgs
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. TransitGatewayPeeringArgs
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. TransitGatewayPeeringArgs
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 transitGatewayPeeringResource = new Aws.NetworkManager.TransitGatewayPeering("transitGatewayPeeringResource", new()
{
    CoreNetworkId = "string",
    TransitGatewayArn = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := networkmanager.NewTransitGatewayPeering(ctx, "transitGatewayPeeringResource", &networkmanager.TransitGatewayPeeringArgs{
	CoreNetworkId:     pulumi.String("string"),
	TransitGatewayArn: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var transitGatewayPeeringResource = new TransitGatewayPeering("transitGatewayPeeringResource", TransitGatewayPeeringArgs.builder()
    .coreNetworkId("string")
    .transitGatewayArn("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
transit_gateway_peering_resource = aws.networkmanager.TransitGatewayPeering("transitGatewayPeeringResource",
    core_network_id="string",
    transit_gateway_arn="string",
    tags={
        "string": "string",
    })
Copy
const transitGatewayPeeringResource = new aws.networkmanager.TransitGatewayPeering("transitGatewayPeeringResource", {
    coreNetworkId: "string",
    transitGatewayArn: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:networkmanager:TransitGatewayPeering
properties:
    coreNetworkId: string
    tags:
        string: string
    transitGatewayArn: string
Copy

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

CoreNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a core network.
TransitGatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the transit gateway for the peering request.
Tags Dictionary<string, string>
Key-value tags for the peering. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
CoreNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a core network.
TransitGatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the transit gateway for the peering request.
Tags map[string]string
Key-value tags for the peering. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
coreNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of a core network.
transitGatewayArn
This property is required.
Changes to this property will trigger replacement.
String
The ARN of the transit gateway for the peering request.
tags Map<String,String>
Key-value tags for the peering. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
coreNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a core network.
transitGatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the transit gateway for the peering request.
tags {[key: string]: string}
Key-value tags for the peering. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
core_network_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of a core network.
transit_gateway_arn
This property is required.
Changes to this property will trigger replacement.
str
The ARN of the transit gateway for the peering request.
tags Mapping[str, str]
Key-value tags for the peering. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
coreNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of a core network.
transitGatewayArn
This property is required.
Changes to this property will trigger replacement.
String
The ARN of the transit gateway for the peering request.
tags Map<String>
Key-value tags for the peering. 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 TransitGatewayPeering resource produces the following output properties:

Arn string
Peering Amazon Resource Name (ARN).
CoreNetworkArn string
The ARN of the core network.
EdgeLocation string
The edge location for the peer.
Id string
The provider-assigned unique ID for this managed resource.
OwnerAccountId string
The ID of the account owner.
PeeringType string
The type of peering. This will be TRANSIT_GATEWAY.
ResourceArn string
The resource ARN of the peer.
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.

TransitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
Arn string
Peering Amazon Resource Name (ARN).
CoreNetworkArn string
The ARN of the core network.
EdgeLocation string
The edge location for the peer.
Id string
The provider-assigned unique ID for this managed resource.
OwnerAccountId string
The ID of the account owner.
PeeringType string
The type of peering. This will be TRANSIT_GATEWAY.
ResourceArn string
The resource ARN of the peer.
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.

TransitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
arn String
Peering Amazon Resource Name (ARN).
coreNetworkArn String
The ARN of the core network.
edgeLocation String
The edge location for the peer.
id String
The provider-assigned unique ID for this managed resource.
ownerAccountId String
The ID of the account owner.
peeringType String
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn String
The resource ARN of the peer.
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.

transitGatewayPeeringAttachmentId String
The ID of the transit gateway peering attachment.
arn string
Peering Amazon Resource Name (ARN).
coreNetworkArn string
The ARN of the core network.
edgeLocation string
The edge location for the peer.
id string
The provider-assigned unique ID for this managed resource.
ownerAccountId string
The ID of the account owner.
peeringType string
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn string
The resource ARN of the peer.
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.

transitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
arn str
Peering Amazon Resource Name (ARN).
core_network_arn str
The ARN of the core network.
edge_location str
The edge location for the peer.
id str
The provider-assigned unique ID for this managed resource.
owner_account_id str
The ID of the account owner.
peering_type str
The type of peering. This will be TRANSIT_GATEWAY.
resource_arn str
The resource ARN of the peer.
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_peering_attachment_id str
The ID of the transit gateway peering attachment.
arn String
Peering Amazon Resource Name (ARN).
coreNetworkArn String
The ARN of the core network.
edgeLocation String
The edge location for the peer.
id String
The provider-assigned unique ID for this managed resource.
ownerAccountId String
The ID of the account owner.
peeringType String
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn String
The resource ARN of the peer.
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.

transitGatewayPeeringAttachmentId String
The ID of the transit gateway peering attachment.

Look up Existing TransitGatewayPeering Resource

Get an existing TransitGatewayPeering 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?: TransitGatewayPeeringState, opts?: CustomResourceOptions): TransitGatewayPeering
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: 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_type: Optional[str] = None,
        resource_arn: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        transit_gateway_arn: Optional[str] = None,
        transit_gateway_peering_attachment_id: Optional[str] = None) -> TransitGatewayPeering
func GetTransitGatewayPeering(ctx *Context, name string, id IDInput, state *TransitGatewayPeeringState, opts ...ResourceOption) (*TransitGatewayPeering, error)
public static TransitGatewayPeering Get(string name, Input<string> id, TransitGatewayPeeringState? state, CustomResourceOptions? opts = null)
public static TransitGatewayPeering get(String name, Output<String> id, TransitGatewayPeeringState state, CustomResourceOptions options)
resources:  _:    type: aws:networkmanager:TransitGatewayPeering    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
Peering Amazon Resource Name (ARN).
CoreNetworkArn string
The ARN of the core network.
CoreNetworkId Changes to this property will trigger replacement. string
The ID of a core network.
EdgeLocation string
The edge location for the peer.
OwnerAccountId string
The ID of the account owner.
PeeringType string
The type of peering. This will be TRANSIT_GATEWAY.
ResourceArn string
The resource ARN of the peer.
Tags Dictionary<string, string>
Key-value tags for the peering. 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.

TransitGatewayArn Changes to this property will trigger replacement. string
The ARN of the transit gateway for the peering request.
TransitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
Arn string
Peering Amazon Resource Name (ARN).
CoreNetworkArn string
The ARN of the core network.
CoreNetworkId Changes to this property will trigger replacement. string
The ID of a core network.
EdgeLocation string
The edge location for the peer.
OwnerAccountId string
The ID of the account owner.
PeeringType string
The type of peering. This will be TRANSIT_GATEWAY.
ResourceArn string
The resource ARN of the peer.
Tags map[string]string
Key-value tags for the peering. 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.

TransitGatewayArn Changes to this property will trigger replacement. string
The ARN of the transit gateway for the peering request.
TransitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
arn String
Peering Amazon Resource Name (ARN).
coreNetworkArn String
The ARN of the core network.
coreNetworkId Changes to this property will trigger replacement. String
The ID of a core network.
edgeLocation String
The edge location for the peer.
ownerAccountId String
The ID of the account owner.
peeringType String
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn String
The resource ARN of the peer.
tags Map<String,String>
Key-value tags for the peering. 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.

transitGatewayArn Changes to this property will trigger replacement. String
The ARN of the transit gateway for the peering request.
transitGatewayPeeringAttachmentId String
The ID of the transit gateway peering attachment.
arn string
Peering Amazon Resource Name (ARN).
coreNetworkArn string
The ARN of the core network.
coreNetworkId Changes to this property will trigger replacement. string
The ID of a core network.
edgeLocation string
The edge location for the peer.
ownerAccountId string
The ID of the account owner.
peeringType string
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn string
The resource ARN of the peer.
tags {[key: string]: string}
Key-value tags for the peering. 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.

transitGatewayArn Changes to this property will trigger replacement. string
The ARN of the transit gateway for the peering request.
transitGatewayPeeringAttachmentId string
The ID of the transit gateway peering attachment.
arn str
Peering Amazon Resource Name (ARN).
core_network_arn str
The ARN of the core network.
core_network_id Changes to this property will trigger replacement. str
The ID of a core network.
edge_location str
The edge location for the peer.
owner_account_id str
The ID of the account owner.
peering_type str
The type of peering. This will be TRANSIT_GATEWAY.
resource_arn str
The resource ARN of the peer.
tags Mapping[str, str]
Key-value tags for the peering. 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_arn Changes to this property will trigger replacement. str
The ARN of the transit gateway for the peering request.
transit_gateway_peering_attachment_id str
The ID of the transit gateway peering attachment.
arn String
Peering Amazon Resource Name (ARN).
coreNetworkArn String
The ARN of the core network.
coreNetworkId Changes to this property will trigger replacement. String
The ID of a core network.
edgeLocation String
The edge location for the peer.
ownerAccountId String
The ID of the account owner.
peeringType String
The type of peering. This will be TRANSIT_GATEWAY.
resourceArn String
The resource ARN of the peer.
tags Map<String>
Key-value tags for the peering. 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.

transitGatewayArn Changes to this property will trigger replacement. String
The ARN of the transit gateway for the peering request.
transitGatewayPeeringAttachmentId String
The ID of the transit gateway peering attachment.

Import

Using pulumi import, import aws_networkmanager_transit_gateway_peering using the peering ID. For example:

$ pulumi import aws:networkmanager/transitGatewayPeering:TransitGatewayPeering example peering-444555aaabbb11223
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.