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
LookupVpcAttachmentin the Go SDK.
public static class GetVpcAttachment {
public static Task<GetVpcAttachmentResult> InvokeAsync(GetVpcAttachmentArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Vpc Attachment Filter Args> One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway VPC Attachment.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway VPC Attachment
- Filters
[]Get
Vpc Attachment Filter One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway VPC Attachment.
- map[string]string
Key-value tags for the EC2 Transit Gateway VPC Attachment
- filters
Get
Vpc Attachment Filter[] One or more configuration blocks containing name-values filters. Detailed below.
- id string
Identifier of the EC2 Transit Gateway VPC Attachment.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway VPC Attachment
- filters
List[Get
Vpc Attachment Filter] One or more configuration blocks containing name-values filters. Detailed below.
- id str
Identifier of the EC2 Transit Gateway VPC Attachment.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway VPC Attachment
GetVpcAttachment Result
The following output properties are available:
- Dns
Support string Whether DNS support is enabled.
- Ipv6Support string
Whether IPv6 support is enabled.
- Subnet
Ids List<string> Identifiers of EC2 Subnets.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway VPC Attachment
- Transit
Gateway stringId EC2 Transit Gateway identifier
- Vpc
Id string Identifier of EC2 VPC.
- Vpc
Owner stringId Identifier of the AWS account that owns the EC2 VPC.
- Filters
List<Get
Vpc Attachment Filter> - Id string
EC2 Transit Gateway VPC Attachment identifier
- Dns
Support string Whether DNS support is enabled.
- Ipv6Support string
Whether IPv6 support is enabled.
- Subnet
Ids []string Identifiers of EC2 Subnets.
- map[string]string
Key-value tags for the EC2 Transit Gateway VPC Attachment
- Transit
Gateway stringId EC2 Transit Gateway identifier
- Vpc
Id string Identifier of EC2 VPC.
- Vpc
Owner stringId Identifier of the AWS account that owns the EC2 VPC.
- Filters
[]Get
Vpc Attachment Filter - Id string
EC2 Transit Gateway VPC Attachment identifier
- dns
Support string Whether DNS support is enabled.
- ipv6Support string
Whether IPv6 support is enabled.
- subnet
Ids string[] Identifiers of EC2 Subnets.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway VPC Attachment
- transit
Gateway stringId EC2 Transit Gateway identifier
- vpc
Id string Identifier of EC2 VPC.
- vpc
Owner stringId Identifier of the AWS account that owns the EC2 VPC.
- filters
Get
Vpc Attachment Filter[] - 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.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway VPC Attachment
- transit_
gateway_ strid EC2 Transit Gateway identifier
- vpc_
id str Identifier of EC2 VPC.
- vpc_
owner_ strid Identifier of the AWS account that owns the EC2 VPC.
- filters
List[Get
Vpc Attachment Filter] - id str
EC2 Transit Gateway VPC Attachment identifier
Supporting Types
GetVpcAttachmentFilter
- Name string
Name of the filter.
- Values List<string>
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
awsTerraform Provider.