UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

80 lines 2.83 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getVpcPeeringConnectionsOutput = exports.getVpcPeeringConnections = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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 * * ```typescript * 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], * }))); * ``` */ function getVpcPeeringConnections(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2/getVpcPeeringConnections:getVpcPeeringConnections", { "filters": args.filters, "region": args.region, "tags": args.tags, }, opts); } exports.getVpcPeeringConnections = 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 * * Note: To use this data source in a count, the resources should exist before trying to access * the data source. * * ## Example Usage * * ```typescript * 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], * }))); * ``` */ function getVpcPeeringConnectionsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2/getVpcPeeringConnections:getVpcPeeringConnections", { "filters": args.filters, "region": args.region, "tags": args.tags, }, opts); } exports.getVpcPeeringConnectionsOutput = getVpcPeeringConnectionsOutput; //# sourceMappingURL=getVpcPeeringConnections.js.map