getVpcPeeringConnections

Use this data source to get IDs of Amazon VPC peering connections To get more details on each connection, use the data resource aws.ec2.VpcPeeringConnection

Example Usage

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

pcs = aws.ec2.get_vpc_peering_connections(filters=[aws.ec2.GetVpcPeeringConnectionsFilterArgs(
    name="requester-vpc-info.vpc-id",
    values=[aws_vpc["foo"]["id"]],
)])
pc = [aws.ec2.get_vpc_peering_connection(id=pcs.ids[__index]) for __index in range(len(pcs.ids))]
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const pcs = aws.ec2.getVpcPeeringConnections({
    filters: [{
        name: "requester-vpc-info.vpc-id",
        values: [aws_vpc.foo.id],
    }],
});
const pc = .map(__index => aws.ec2.getVpcPeeringConnection({
    id: _arg0_.ids[__index],
}));

Using getVpcPeeringConnections

function getVpcPeeringConnections(args: GetVpcPeeringConnectionsArgs, opts?: InvokeOptions): Promise<GetVpcPeeringConnectionsResult>
def get_vpc_peering_connections(filters: Optional[Sequence[GetVpcPeeringConnectionsFilter]] = None,
                                tags: Optional[Mapping[str, str]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetVpcPeeringConnectionsResult
func GetVpcPeeringConnections(ctx *Context, args *GetVpcPeeringConnectionsArgs, opts ...InvokeOption) (*GetVpcPeeringConnectionsResult, error)

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

public static class GetVpcPeeringConnections {
    public static Task<GetVpcPeeringConnectionsResult> InvokeAsync(GetVpcPeeringConnectionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetVpcPeeringConnectionsFilter>
Custom filter block as described below.
Tags Dictionary<string, string>
A mapping of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection.
Filters []GetVpcPeeringConnectionsFilter
Custom filter block as described below.
Tags map[string]string
A mapping of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection.
filters GetVpcPeeringConnectionsFilter[]
Custom filter block as described below.
tags {[key: string]: string}
A mapping of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection.
filters Sequence[GetVpcPeeringConnectionsFilter]
Custom filter block as described below.
tags Mapping[str, str]
A mapping of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection.

getVpcPeeringConnections Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
The IDs of the VPC Peering Connections.
Tags Dictionary<string, string>
Filters List<GetVpcPeeringConnectionsFilter>
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
The IDs of the VPC Peering Connections.
Tags map[string]string
Filters []GetVpcPeeringConnectionsFilter
id string
The provider-assigned unique ID for this managed resource.
ids string[]
The IDs of the VPC Peering Connections.
tags {[key: string]: string}
filters GetVpcPeeringConnectionsFilter[]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
The IDs of the VPC Peering Connections.
tags Mapping[str, str]
filters Sequence[GetVpcPeeringConnectionsFilter]

Supporting Types

GetVpcPeeringConnectionsFilter

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. A VPC Peering Connection will 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. A VPC Peering Connection will 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. A VPC Peering Connection will 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 Sequence[str]
Set of values that are accepted for the given field. A VPC Peering Connection will 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.