Show / Hide Table of Contents

Class PeeringAttachment

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var local = new Aws.Provider("local", new Aws.ProviderArgs
    {
        Region = "us-east-1",
    });
    var peer = new Aws.Provider("peer", new Aws.ProviderArgs
    {
        Region = "us-west-2",
    });
    var peerRegion = Output.Create(Aws.GetRegion.InvokeAsync());
    var localTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("localTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs
    {
        Tags = 
        {
            { "Name", "Local TGW" },
        },
    });
    var peerTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("peerTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs
    {
        Tags = 
        {
            { "Name", "Peer TGW" },
        },
    });
    var example = new Aws.Ec2TransitGateway.PeeringAttachment("example", new Aws.Ec2TransitGateway.PeeringAttachmentArgs
    {
        PeerAccountId = peerTransitGateway.OwnerId,
        PeerRegion = peerRegion.Apply(peerRegion => peerRegion.Name),
        PeerTransitGatewayId = peerTransitGateway.Id,
        TransitGatewayId = localTransitGateway.Id,
        Tags = 
        {
            { "Name", "TGW Peering Requestor" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
PeeringAttachment
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2TransitGateway
Assembly: Pulumi.Aws.dll
Syntax
public class PeeringAttachment : CustomResource

Constructors

View Source

PeeringAttachment(String, PeeringAttachmentArgs, CustomResourceOptions)

Create a PeeringAttachment resource with the given unique name, arguments, and options.

Declaration
public PeeringAttachment(string name, PeeringAttachmentArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

PeeringAttachmentArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

PeerAccountId

Account ID of EC2 Transit Gateway to peer with. Defaults to the account ID the current provider is currently connected to.

Declaration
public Output<string> PeerAccountId { get; }
Property Value
Type Description
Output<System.String>
View Source

PeerRegion

Region of EC2 Transit Gateway to peer with.

Declaration
public Output<string> PeerRegion { get; }
Property Value
Type Description
Output<System.String>
View Source

PeerTransitGatewayId

Identifier of EC2 Transit Gateway to peer with.

Declaration
public Output<string> PeerTransitGatewayId { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

Key-value tags for the EC2 Transit Gateway Peering Attachment.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TransitGatewayId

Identifier of EC2 Transit Gateway.

Declaration
public Output<string> TransitGatewayId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, PeeringAttachmentState, CustomResourceOptions)

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

Declaration
public static PeeringAttachment Get(string name, Input<string> id, PeeringAttachmentState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

PeeringAttachmentState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
PeeringAttachment
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.