GetPeeringAttachment

Get information on an EC2 Transit Gateway Peering Attachment.

Example Usage

By Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetPeeringAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetPeeringAttachmentArgs
        {
            Filters = 
            {
                new Aws.Ec2TransitGateway.Inputs.GetPeeringAttachmentFilterArgs
                {
                    Name = "transit-gateway-attachment-id",
                    Values = 
                    {
                        "tgw-attach-12345678",
                    },
                },
            },
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ec2transitgateway.LookupPeeringAttachment(ctx, &ec2transitgateway.LookupPeeringAttachmentArgs{
            Filters: []ec2transitgateway.GetPeeringAttachmentFilter{
                ec2transitgateway.GetPeeringAttachmentFilter{
                    Name: "transit-gateway-attachment-id",
                    Values: []string{
                        "tgw-attach-12345678",
                    },
                },
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_peering_attachment(filters=[{
    "name": "transit-gateway-attachment-id",
    "values": ["tgw-attach-12345678"],
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getPeeringAttachment({
    filters: [{
        name: "transit-gateway-attachment-id",
        values: ["tgw-attach-12345678"],
    }],
}, { async: true }));

By Identifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var attachment = Output.Create(Aws.Ec2TransitGateway.GetPeeringAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetPeeringAttachmentArgs
        {
            Id = "tgw-attach-12345678",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "tgw-attach-12345678"
        _, err := ec2transitgateway.LookupPeeringAttachment(ctx, &ec2transitgateway.LookupPeeringAttachmentArgs{
            Id: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

attachment = aws.ec2transitgateway.get_peering_attachment(id="tgw-attach-12345678")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const attachment = pulumi.output(aws.ec2transitgateway.getPeeringAttachment({
    id: "tgw-attach-12345678",
}, { async: true }));

Using GetPeeringAttachment

function getPeeringAttachment(args: GetPeeringAttachmentArgs, opts?: InvokeOptions): Promise<GetPeeringAttachmentResult>
function  get_peering_attachment(filters=None, id=None, tags=None, opts=None)
func LookupPeeringAttachment(ctx *Context, args *LookupPeeringAttachmentArgs, opts ...InvokeOption) (*LookupPeeringAttachmentResult, error)

Note: This function is named LookupPeeringAttachment in the Go SDK.

public static class GetPeeringAttachment {
    public static Task<GetPeeringAttachmentResult> InvokeAsync(GetPeeringAttachmentArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetPeeringAttachmentFilterArgs>

One or more configuration blocks containing name-values filters. Detailed below.

Id string

Identifier of the EC2 Transit Gateway Peering Attachment.

Tags Dictionary<string, string>

A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.

Filters []GetPeeringAttachmentFilter

One or more configuration blocks containing name-values filters. Detailed below.

Id string

Identifier of the EC2 Transit Gateway Peering Attachment.

Tags map[string]string

A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.

filters GetPeeringAttachmentFilter[]

One or more configuration blocks containing name-values filters. Detailed below.

id string

Identifier of the EC2 Transit Gateway Peering Attachment.

tags {[key: string]: string}

A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.

filters List[GetPeeringAttachmentFilter]

One or more configuration blocks containing name-values filters. Detailed below.

id str

Identifier of the EC2 Transit Gateway Peering Attachment.

tags Dict[str, str]

A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.

GetPeeringAttachment Result

The following output properties are available:

PeerAccountId string

Identifier of the peer AWS account

PeerRegion string

Identifier of the peer AWS region

PeerTransitGatewayId string

Identifier of the peer EC2 Transit Gateway

Tags Dictionary<string, string>
TransitGatewayId string

Identifier of the local EC2 Transit Gateway

Filters List<GetPeeringAttachmentFilter>
Id string
PeerAccountId string

Identifier of the peer AWS account

PeerRegion string

Identifier of the peer AWS region

PeerTransitGatewayId string

Identifier of the peer EC2 Transit Gateway

Tags map[string]string
TransitGatewayId string

Identifier of the local EC2 Transit Gateway

Filters []GetPeeringAttachmentFilter
Id string
peerAccountId string

Identifier of the peer AWS account

peerRegion string

Identifier of the peer AWS region

peerTransitGatewayId string

Identifier of the peer EC2 Transit Gateway

tags {[key: string]: string}
transitGatewayId string

Identifier of the local EC2 Transit Gateway

filters GetPeeringAttachmentFilter[]
id string
peer_account_id str

Identifier of the peer AWS account

peer_region str

Identifier of the peer AWS region

peer_transit_gateway_id str

Identifier of the peer EC2 Transit Gateway

tags Dict[str, str]
transit_gateway_id str

Identifier of the local EC2 Transit Gateway

filters List[GetPeeringAttachmentFilter]
id str

Supporting Types

GetPeeringAttachmentFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values List<string>

Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values []string

Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.

name string

The name of the field to filter by, as defined by the underlying AWS API.

values string[]

Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.

name str

The name of the field to filter by, as defined by the underlying AWS API.

values List[str]

Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.