@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
222 lines (221 loc) • 7.52 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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),
* });
* ```
*/
export declare function getVpcPeeringConnection(args?: GetVpcPeeringConnectionArgs, opts?: pulumi.InvokeOptions): Promise<GetVpcPeeringConnectionResult>;
/**
* A collection of arguments for invoking getVpcPeeringConnection.
*/
export interface GetVpcPeeringConnectionArgs {
/**
* Primary CIDR block of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
cidrBlock?: string;
/**
* Custom filter block as described below.
*/
filters?: inputs.ec2.GetVpcPeeringConnectionFilter[];
/**
* ID of the specific VPC Peering Connection to retrieve.
*/
id?: string;
/**
* AWS account ID of the owner of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
ownerId?: string;
/**
* Primary CIDR block of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerCidrBlock?: string;
/**
* AWS account ID of the owner of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerOwnerId?: string;
/**
* ID of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerVpcId?: string;
/**
* Status of the specific VPC Peering Connection to retrieve.
*/
status?: string;
/**
* Map of tags, each pair of which must exactly match
* a pair on the desired VPC Peering Connection.
*
* The arguments of this data source act as filters for querying the available VPC peering connection.
* The given filters must match exactly one VPC peering connection whose data will be exported as attributes.
*/
tags?: {
[key: string]: string;
};
/**
* ID of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
vpcId?: string;
}
/**
* A collection of values returned by getVpcPeeringConnection.
*/
export interface GetVpcPeeringConnectionResult {
/**
* Configuration block that describes [VPC Peering Connection]
* (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options set for the accepter VPC.
*/
readonly accepter: {
[key: string]: boolean;
};
/**
* CIDR block associated to the VPC of the specific VPC Peering Connection.
*/
readonly cidrBlock: string;
/**
* List of objects with IPv4 CIDR blocks of the requester VPC.
*/
readonly cidrBlockSets: outputs.ec2.GetVpcPeeringConnectionCidrBlockSet[];
readonly filters?: outputs.ec2.GetVpcPeeringConnectionFilter[];
readonly id: string;
/**
* List of objects with IPv6 CIDR blocks of the requester VPC.
*/
readonly ipv6CidrBlockSets: outputs.ec2.GetVpcPeeringConnectionIpv6CidrBlockSet[];
readonly ownerId: string;
readonly peerCidrBlock: string;
/**
* List of objects with IPv4 CIDR blocks of the accepter VPC.
*/
readonly peerCidrBlockSets: outputs.ec2.GetVpcPeeringConnectionPeerCidrBlockSet[];
/**
* List of objects with IPv6 CIDR blocks of the accepter VPC.
*/
readonly peerIpv6CidrBlockSets: outputs.ec2.GetVpcPeeringConnectionPeerIpv6CidrBlockSet[];
readonly peerOwnerId: string;
/**
* Region of the accepter VPC.
*/
readonly peerRegion: string;
readonly peerVpcId: string;
/**
* (**Deprecated**) Region of the requester VPC. Use `requesterRegion` instead.
*
* @deprecated region is deprecated. Use requesterRegion instead.
*/
readonly region: string;
/**
* Configuration block that describes [VPC Peering Connection]
* (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options set for the requester VPC.
*/
readonly requester: {
[key: string]: boolean;
};
/**
* Region of the requester VPC.
*/
readonly requesterRegion: string;
readonly status: string;
readonly tags: {
[key: string]: string;
};
readonly vpcId: string;
}
/**
* 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),
* });
* ```
*/
export declare function getVpcPeeringConnectionOutput(args?: GetVpcPeeringConnectionOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetVpcPeeringConnectionResult>;
/**
* A collection of arguments for invoking getVpcPeeringConnection.
*/
export interface GetVpcPeeringConnectionOutputArgs {
/**
* Primary CIDR block of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
cidrBlock?: pulumi.Input<string>;
/**
* Custom filter block as described below.
*/
filters?: pulumi.Input<pulumi.Input<inputs.ec2.GetVpcPeeringConnectionFilterArgs>[]>;
/**
* ID of the specific VPC Peering Connection to retrieve.
*/
id?: pulumi.Input<string>;
/**
* AWS account ID of the owner of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
ownerId?: pulumi.Input<string>;
/**
* Primary CIDR block of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerCidrBlock?: pulumi.Input<string>;
/**
* AWS account ID of the owner of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerOwnerId?: pulumi.Input<string>;
/**
* ID of the accepter VPC of the specific VPC Peering Connection to retrieve.
*/
peerVpcId?: pulumi.Input<string>;
/**
* Status of the specific VPC Peering Connection to retrieve.
*/
status?: pulumi.Input<string>;
/**
* Map of tags, each pair of which must exactly match
* a pair on the desired VPC Peering Connection.
*
* The arguments of this data source act as filters for querying the available VPC peering connection.
* The given filters must match exactly one VPC peering connection whose data will be exported as attributes.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* ID of the requester VPC of the specific VPC Peering Connection to retrieve.
*/
vpcId?: pulumi.Input<string>;
}