UNPKG

@pulumi/aws

Version:

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

92 lines 3.16 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.getVpcPeeringConnectionOutput = exports.getVpcPeeringConnection = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The VPC Peering Connection data source provides details about * a specific VPC peering connection. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // Declare the data source * const pc = aws.ec2.getVpcPeeringConnection({ * vpcId: foo.id, * peerCidrBlock: "10.0.1.0/22", * }); * // Create a route table * const rt = new aws.ec2.RouteTable("rt", {vpcId: foo.id}); * // Create a route * const r = new aws.ec2.Route("r", { * routeTableId: rt.id, * destinationCidrBlock: pc.then(pc => pc.peerCidrBlock), * vpcPeeringConnectionId: pc.then(pc => pc.id), * }); * ``` */ function getVpcPeeringConnection(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2/getVpcPeeringConnection:getVpcPeeringConnection", { "cidrBlock": args.cidrBlock, "filters": args.filters, "id": args.id, "ownerId": args.ownerId, "peerCidrBlock": args.peerCidrBlock, "peerOwnerId": args.peerOwnerId, "peerVpcId": args.peerVpcId, "status": args.status, "tags": args.tags, "vpcId": args.vpcId, }, opts); } exports.getVpcPeeringConnection = getVpcPeeringConnection; /** * The VPC Peering Connection data source provides details about * a specific VPC peering connection. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // Declare the data source * const pc = aws.ec2.getVpcPeeringConnection({ * vpcId: foo.id, * peerCidrBlock: "10.0.1.0/22", * }); * // Create a route table * const rt = new aws.ec2.RouteTable("rt", {vpcId: foo.id}); * // Create a route * const r = new aws.ec2.Route("r", { * routeTableId: rt.id, * destinationCidrBlock: pc.then(pc => pc.peerCidrBlock), * vpcPeeringConnectionId: pc.then(pc => pc.id), * }); * ``` */ function getVpcPeeringConnectionOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2/getVpcPeeringConnection:getVpcPeeringConnection", { "cidrBlock": args.cidrBlock, "filters": args.filters, "id": args.id, "ownerId": args.ownerId, "peerCidrBlock": args.peerCidrBlock, "peerOwnerId": args.peerOwnerId, "peerVpcId": args.peerVpcId, "status": args.status, "tags": args.tags, "vpcId": args.vpcId, }, opts); } exports.getVpcPeeringConnectionOutput = getVpcPeeringConnectionOutput; //# sourceMappingURL=getVpcPeeringConnection.js.map