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" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2TransitGateway
Assembly: Pulumi.Aws.dll
Syntax
public class PeeringAttachment : CustomResource
Constructors
View SourcePeeringAttachment(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 SourcePeerAccountId
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> |
PeerRegion
Region of EC2 Transit Gateway to peer with.
Declaration
public Output<string> PeerRegion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PeerTransitGatewayId
Identifier of EC2 Transit Gateway to peer with.
Declaration
public Output<string> PeerTransitGatewayId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
TransitGatewayId
Identifier of EC2 Transit Gateway.
Declaration
public Output<string> TransitGatewayId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |