GetVpcAttachment

Get information on an EC2 Transit Gateway VPC Attachment.

Example Usage

By Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetVpcAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetVpcAttachmentArgs
        {
            Filters = 
            {
                new Aws.Ec2TransitGateway.Inputs.GetVpcAttachmentFilterArgs
                {
                    Name = "vpc-id",
                    Values = 
                    {
                        "vpc-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.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
            Filters: []ec2transitgateway.GetVpcAttachmentFilter{
                ec2transitgateway.GetVpcAttachmentFilter{
                    Name: "vpc-id",
                    Values: []string{
                        "vpc-12345678",
                    },
                },
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_vpc_attachment(filters=[{
    "name": "vpc-id",
    "values": ["vpc-12345678"],
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getVpcAttachment({
    filters: [{
        name: "vpc-id",
        values: ["vpc-12345678"],
    }],
}, { async: true }));

By Identifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetVpcAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetVpcAttachmentArgs
        {
            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.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
            Id: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

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

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

Using GetVpcAttachment

function getVpcAttachment(args: GetVpcAttachmentArgs, opts?: InvokeOptions): Promise<GetVpcAttachmentResult>
function  get_vpc_attachment(filters=None, id=None, tags=None, opts=None)
func LookupVpcAttachment(ctx *Context, args *LookupVpcAttachmentArgs, opts ...InvokeOption) (*LookupVpcAttachmentResult, error)

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

public static class GetVpcAttachment {
    public static Task<GetVpcAttachmentResult> InvokeAsync(GetVpcAttachmentArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetVpcAttachmentFilterArgs>

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

Id string

Identifier of the EC2 Transit Gateway VPC Attachment.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway VPC Attachment

Filters []GetVpcAttachmentFilter

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

Id string

Identifier of the EC2 Transit Gateway VPC Attachment.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway VPC Attachment

filters GetVpcAttachmentFilter[]

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

id string

Identifier of the EC2 Transit Gateway VPC Attachment.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway VPC Attachment

filters List[GetVpcAttachmentFilter]

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

id str

Identifier of the EC2 Transit Gateway VPC Attachment.

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway VPC Attachment

GetVpcAttachment Result

The following output properties are available:

DnsSupport string

Whether DNS support is enabled.

Ipv6Support string

Whether IPv6 support is enabled.

SubnetIds List<string>

Identifiers of EC2 Subnets.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway VPC Attachment

TransitGatewayId string

EC2 Transit Gateway identifier

VpcId string

Identifier of EC2 VPC.

VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

Filters List<GetVpcAttachmentFilter>
Id string

EC2 Transit Gateway VPC Attachment identifier

DnsSupport string

Whether DNS support is enabled.

Ipv6Support string

Whether IPv6 support is enabled.

SubnetIds []string

Identifiers of EC2 Subnets.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway VPC Attachment

TransitGatewayId string

EC2 Transit Gateway identifier

VpcId string

Identifier of EC2 VPC.

VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

Filters []GetVpcAttachmentFilter
Id string

EC2 Transit Gateway VPC Attachment identifier

dnsSupport string

Whether DNS support is enabled.

ipv6Support string

Whether IPv6 support is enabled.

subnetIds string[]

Identifiers of EC2 Subnets.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway VPC Attachment

transitGatewayId string

EC2 Transit Gateway identifier

vpcId string

Identifier of EC2 VPC.

vpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

filters GetVpcAttachmentFilter[]
id string

EC2 Transit Gateway VPC Attachment identifier

dns_support str

Whether DNS support is enabled.

ipv6_support str

Whether IPv6 support is enabled.

subnet_ids List[str]

Identifiers of EC2 Subnets.

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway VPC Attachment

transit_gateway_id str

EC2 Transit Gateway identifier

vpc_id str

Identifier of EC2 VPC.

vpc_owner_id str

Identifier of the AWS account that owns the EC2 VPC.

filters List[GetVpcAttachmentFilter]
id str

EC2 Transit Gateway VPC Attachment identifier

Supporting Types

GetVpcAttachmentFilter

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

Name of the filter.

Values List<string>

List of one or more values for the filter.

Name string

Name of the filter.

Values []string

List of one or more values for the filter.

name string

Name of the filter.

values string[]

List of one or more values for the filter.

name str

Name of the filter.

values List[str]

List of one or more values for the filter.

Package Details

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