get Vpc Peering Connections
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 Note: To use this data source in a count, the resources should exist before trying to access the data source.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Declare the data source
const pcs = aws.ec2.getVpcPeeringConnections({
filters: [{
name: "requester-vpc-info.vpc-id",
values: [foo.id],
}],
});
// get the details of each resource
const pc = .map(__index => (aws.ec2.getVpcPeeringConnection({
id: _arg0_.ids[__index],
})));
import pulumi
import pulumi_aws as aws
# Declare the data source
pcs = aws.ec2.get_vpc_peering_connections(filters=[{
"name": "requester-vpc-info.vpc-id",
"values": [foo["id"]],
}])
# get the details of each resource
pc = [aws.ec2.get_vpc_peering_connection(id=pcs.ids[__index]) for __index in range(len(pcs.ids))]
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var pcs = Aws.Ec2.GetVpcPeeringConnections.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetVpcPeeringConnectionsFilterInputArgs
{
Name = "requester-vpc-info.vpc-id",
Values = new[]
{
foo.Id,
},
},
},
});
// get the details of each resource
var pc = ;
});
Return
A collection of values returned by getVpcPeeringConnections.
Parameters
A collection of arguments for invoking getVpcPeeringConnections.
Return
A collection of values returned by getVpcPeeringConnections.
Parameters
Custom filter block as described below.
Mapping of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection. More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
See also
Return
A collection of values returned by getVpcPeeringConnections.
Parameters
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetVpcPeeringConnectionsPlainArgs.