Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.ec2transitgateway.getVpcAttachment
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Get information on an EC2 Transit Gateway VPC Attachment.
Example Usage
By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getVpcAttachment({
filters: [{
name: "vpc-id",
values: ["vpc-12345678"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_vpc_attachment(filters=[{
"name": "vpc-id",
"values": ["vpc-12345678"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2transitgateway.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
Filters: []ec2transitgateway.GetVpcAttachmentFilter{
{
Name: "vpc-id",
Values: []string{
"vpc-12345678",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2TransitGateway.GetVpcAttachment.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2TransitGateway.Inputs.GetVpcAttachmentFilterInputArgs
{
Name = "vpc-id",
Values = new[]
{
"vpc-12345678",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetVpcAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2transitgatewayFunctions.getVpcAttachment(GetVpcAttachmentArgs.builder()
.filters(GetVpcAttachmentFilterArgs.builder()
.name("vpc-id")
.values("vpc-12345678")
.build())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2transitgateway:getVpcAttachment
Arguments:
filters:
- name: vpc-id
values:
- vpc-12345678
By Identifier
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getVpcAttachment({
id: "tgw-attach-12345678",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_vpc_attachment(id="tgw-attach-12345678")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2transitgateway.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
Id: pulumi.StringRef("tgw-attach-12345678"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2TransitGateway.GetVpcAttachment.Invoke(new()
{
Id = "tgw-attach-12345678",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetVpcAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2transitgatewayFunctions.getVpcAttachment(GetVpcAttachmentArgs.builder()
.id("tgw-attach-12345678")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2transitgateway:getVpcAttachment
Arguments:
id: tgw-attach-12345678
Using getVpcAttachment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVpcAttachment(args: GetVpcAttachmentArgs, opts?: InvokeOptions): Promise<GetVpcAttachmentResult>
function getVpcAttachmentOutput(args: GetVpcAttachmentOutputArgs, opts?: InvokeOptions): Output<GetVpcAttachmentResult>
def get_vpc_attachment(filters: Optional[Sequence[GetVpcAttachmentFilter]] = None,
id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcAttachmentResult
def get_vpc_attachment_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcAttachmentFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcAttachmentResult]
func LookupVpcAttachment(ctx *Context, args *LookupVpcAttachmentArgs, opts ...InvokeOption) (*LookupVpcAttachmentResult, error)
func LookupVpcAttachmentOutput(ctx *Context, args *LookupVpcAttachmentOutputArgs, opts ...InvokeOption) LookupVpcAttachmentResultOutput
> Note: This function is named LookupVpcAttachment
in the Go SDK.
public static class GetVpcAttachment
{
public static Task<GetVpcAttachmentResult> InvokeAsync(GetVpcAttachmentArgs args, InvokeOptions? opts = null)
public static Output<GetVpcAttachmentResult> Invoke(GetVpcAttachmentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcAttachmentResult> getVpcAttachment(GetVpcAttachmentArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2transitgateway/getVpcAttachment:getVpcAttachment
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<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.
- 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
List<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
Sequence[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.
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway VPC Attachment
- filters List<Property Map>
- One or more configuration blocks containing name-values filters. Detailed below.
- id String
- Identifier of the EC2 Transit Gateway VPC Attachment.
- Map<String>
- Key-value tags for the EC2 Transit Gateway VPC Attachment
getVpcAttachment Result
The following output properties are available:
- Appliance
Mode stringSupport - Whether Appliance Mode support is enabled.
- Dns
Support string - Whether DNS support is enabled.
- Id string
- EC2 Transit Gateway VPC Attachment identifier
- 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>
- Appliance
Mode stringSupport - Whether Appliance Mode support is enabled.
- Dns
Support string - Whether DNS support is enabled.
- Id string
- EC2 Transit Gateway VPC Attachment identifier
- 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
- appliance
Mode StringSupport - Whether Appliance Mode support is enabled.
- dns
Support String - Whether DNS support is enabled.
- id String
- EC2 Transit Gateway VPC Attachment identifier
- ipv6Support String
- Whether IPv6 support is enabled.
- subnet
Ids List<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
List<Get
Vpc Attachment Filter>
- appliance
Mode stringSupport - Whether Appliance Mode support is enabled.
- dns
Support string - Whether DNS support is enabled.
- id string
- EC2 Transit Gateway VPC Attachment identifier
- 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[]
- appliance_
mode_ strsupport - Whether Appliance Mode support is enabled.
- dns_
support str - Whether DNS support is enabled.
- id str
- EC2 Transit Gateway VPC Attachment identifier
- ipv6_
support str - Whether IPv6 support is enabled.
- subnet_
ids Sequence[str] - Identifiers of EC2 Subnets.
- Mapping[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
Sequence[Get
Vpc Attachment Filter]
- appliance
Mode StringSupport - Whether Appliance Mode support is enabled.
- dns
Support String - Whether DNS support is enabled.
- id String
- EC2 Transit Gateway VPC Attachment identifier
- ipv6Support String
- Whether IPv6 support is enabled.
- subnet
Ids List<String> - Identifiers of EC2 Subnets.
- Map<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<Property Map>
Supporting Types
GetVpcAttachmentFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi