AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.ec2transitgateway.getVpcAttachments
Explore with Pulumi AI
Get information on EC2 Transit Gateway VPC Attachments.
Example Usage
By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const filtered = aws.ec2transitgateway.getVpcAttachments({
    filters: [{
        name: "state",
        values: ["pendingAcceptance"],
    }],
});
const unit = .map(__index => (aws.ec2transitgateway.getVpcAttachment({
    id: _arg0_.ids[__index],
})));
import pulumi
import pulumi_aws as aws
filtered = aws.ec2transitgateway.get_vpc_attachments(filters=[{
    "name": "state",
    "values": ["pendingAcceptance"],
}])
unit = [aws.ec2transitgateway.get_vpc_attachment(id=filtered.ids[__index]) for __index in range(len(filtered.ids))]
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var filtered = Aws.Ec2TransitGateway.GetVpcAttachments.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Ec2TransitGateway.Inputs.GetVpcAttachmentsFilterInputArgs
            {
                Name = "state",
                Values = new[]
                {
                    "pendingAcceptance",
                },
            },
        },
    });
    var unit = ;
});
Coming soon!
Coming soon!
Using getVpcAttachments
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 getVpcAttachments(args: GetVpcAttachmentsArgs, opts?: InvokeOptions): Promise<GetVpcAttachmentsResult>
function getVpcAttachmentsOutput(args: GetVpcAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetVpcAttachmentsResult>def get_vpc_attachments(filters: Optional[Sequence[GetVpcAttachmentsFilter]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetVpcAttachmentsResult
def get_vpc_attachments_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcAttachmentsFilterArgs]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetVpcAttachmentsResult]func GetVpcAttachments(ctx *Context, args *GetVpcAttachmentsArgs, opts ...InvokeOption) (*GetVpcAttachmentsResult, error)
func GetVpcAttachmentsOutput(ctx *Context, args *GetVpcAttachmentsOutputArgs, opts ...InvokeOption) GetVpcAttachmentsResultOutput> Note: This function is named GetVpcAttachments in the Go SDK.
public static class GetVpcAttachments 
{
    public static Task<GetVpcAttachmentsResult> InvokeAsync(GetVpcAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcAttachmentsResult> Invoke(GetVpcAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVpcAttachmentsResult> getVpcAttachments(GetVpcAttachmentsArgs args, InvokeOptions options)
public static Output<GetVpcAttachmentsResult> getVpcAttachments(GetVpcAttachmentsArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ec2transitgateway/getVpcAttachments:getVpcAttachments
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetVpc Attachments Filter> 
- One or more configuration blocks containing name-values filters. Detailed below.
- Filters
[]GetVpc Attachments Filter 
- One or more configuration blocks containing name-values filters. Detailed below.
- filters
List<GetVpc Attachments Filter> 
- One or more configuration blocks containing name-values filters. Detailed below.
- filters
GetVpc Attachments Filter[] 
- One or more configuration blocks containing name-values filters. Detailed below.
- filters
Sequence[GetVpc Attachments Filter] 
- One or more configuration blocks containing name-values filters. Detailed below.
- filters List<Property Map>
- One or more configuration blocks containing name-values filters. Detailed below.
getVpcAttachments Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- Filters
List<GetVpc Attachments Filter> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- Filters
[]GetVpc Attachments Filter 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- filters
List<GetVpc Attachments Filter> 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- filters
GetVpc Attachments Filter[] 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- filters
Sequence[GetVpc Attachments Filter] 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.VpcAttachment][2] data source, searching by identifier.
- filters List<Property Map>
Supporting Types
GetVpcAttachmentsFilter   
- Name string
- Name of the filter check available value on official documentation
- Values List<string>
- List of one or more values for the filter.
- Name string
- Name of the filter check available value on official documentation
- Values []string
- List of one or more values for the filter.
- name String
- Name of the filter check available value on official documentation
- values List<String>
- List of one or more values for the filter.
- name string
- Name of the filter check available value on official documentation
- values string[]
- List of one or more values for the filter.
- name str
- Name of the filter check available value on official documentation
- values Sequence[str]
- List of one or more values for the filter.
- name String
- Name of the filter check available value on official documentation
- values List<String>
- List of one or more values for the filter.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.