UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

201 lines 5.8 kB
import * as pulumi from "@pulumi/pulumi"; /** * Retrieve information about a VPC Peering for use in other resources. * * This data source provides all of the VPC Peering's properties as configured on your * DigitalOcean account. This is useful if the VPC Peering in question is not managed by * Terraform or you need to utilize any of the VPC Peering's data. * * VPC Peerings may be looked up by `id` or `name`. * * ## Example Usage * * ### VPC Peering By Id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * id: "example-id", * }); * ``` * * Reuse the data about a VPC Peering in other resources: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * id: "example-id", * }); * const exampleDroplet = new digitalocean.Droplet("example", { * name: "example-01", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-18-04-x64", * region: digitalocean.Region.NYC3, * vpcUuid: example.then(example => example.vpcIds?.[0]), * }); * ``` * * ### VPC Peering By Name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * name: "example-peering", * }); * ``` * * Reuse the data about a VPC Peering in other resources: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * name: "example-peering", * }); * const exampleDroplet = new digitalocean.Droplet("example", { * name: "example-01", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-18-04-x64", * region: digitalocean.Region.NYC3, * vpcUuid: example.then(example => example.vpcIds?.[0]), * }); * ``` */ export declare function getVpcPeering(args?: GetVpcPeeringArgs, opts?: pulumi.InvokeOptions): Promise<GetVpcPeeringResult>; /** * A collection of arguments for invoking getVpcPeering. */ export interface GetVpcPeeringArgs { /** * The unique identifier of an existing VPC Peering. */ id?: string; /** * The name of an existing VPC Peering. */ name?: string; /** * The list of VPC IDs involved in the peering. */ vpcIds?: string[]; } /** * A collection of values returned by getVpcPeering. */ export interface GetVpcPeeringResult { /** * The date and time of when the VPC Peering was created. */ readonly createdAt: string; /** * The unique identifier for the VPC Peering. */ readonly id: string; /** * The name of the VPC Peering. */ readonly name: string; /** * The status of the VPC Peering. */ readonly status: string; /** * The list of VPC IDs involved in the peering. */ readonly vpcIds: string[]; } /** * Retrieve information about a VPC Peering for use in other resources. * * This data source provides all of the VPC Peering's properties as configured on your * DigitalOcean account. This is useful if the VPC Peering in question is not managed by * Terraform or you need to utilize any of the VPC Peering's data. * * VPC Peerings may be looked up by `id` or `name`. * * ## Example Usage * * ### VPC Peering By Id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * id: "example-id", * }); * ``` * * Reuse the data about a VPC Peering in other resources: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * id: "example-id", * }); * const exampleDroplet = new digitalocean.Droplet("example", { * name: "example-01", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-18-04-x64", * region: digitalocean.Region.NYC3, * vpcUuid: example.then(example => example.vpcIds?.[0]), * }); * ``` * * ### VPC Peering By Name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * name: "example-peering", * }); * ``` * * Reuse the data about a VPC Peering in other resources: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = digitalocean.getVpcPeering({ * name: "example-peering", * }); * const exampleDroplet = new digitalocean.Droplet("example", { * name: "example-01", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-18-04-x64", * region: digitalocean.Region.NYC3, * vpcUuid: example.then(example => example.vpcIds?.[0]), * }); * ``` */ export declare function getVpcPeeringOutput(args?: GetVpcPeeringOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetVpcPeeringResult>; /** * A collection of arguments for invoking getVpcPeering. */ export interface GetVpcPeeringOutputArgs { /** * The unique identifier of an existing VPC Peering. */ id?: pulumi.Input<string | undefined>; /** * The name of an existing VPC Peering. */ name?: pulumi.Input<string | undefined>; /** * The list of VPC IDs involved in the peering. */ vpcIds?: pulumi.Input<pulumi.Input<string>[] | undefined>; } //# sourceMappingURL=getVpcPeering.d.ts.map