UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

114 lines (113 loc) 3.92 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a DigitalOcean reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets. * * > **NOTE:** Reserved IPs can be assigned to a Droplet either directly on the `digitalocean.ReservedIp` resource by setting a `dropletId` or using the `digitalocean.ReservedIpAssignment` resource, but the two cannot be used together. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const example = new digitalocean.Droplet("example", { * name: "example", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-22-04-x64", * region: digitalocean.Region.NYC3, * ipv6: true, * privateNetworking: true, * }); * const exampleReservedIp = new digitalocean.ReservedIp("example", { * dropletId: example.id, * region: example.region, * }); * ``` * * ## Import * * Reserved IPs can be imported using the `ip`, e.g. * * ```sh * $ pulumi import digitalocean:index/reservedIp:ReservedIp myip 192.168.0.1 * ``` */ export declare class ReservedIp extends pulumi.CustomResource { /** * Get an existing ReservedIp resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReservedIpState, opts?: pulumi.CustomResourceOptions): ReservedIp; /** * Returns true if the given object is an instance of ReservedIp. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ReservedIp; /** * The ID of Droplet that the reserved IP will be assigned to. */ readonly dropletId: pulumi.Output<number | undefined>; /** * The IP Address of the resource */ readonly ipAddress: pulumi.Output<string>; /** * The region that the reserved IP is reserved to. */ readonly region: pulumi.Output<string>; /** * The uniform resource name of the reserved ip */ readonly reservedIpUrn: pulumi.Output<string>; /** * Create a ReservedIp resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ReservedIpArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ReservedIp resources. */ export interface ReservedIpState { /** * The ID of Droplet that the reserved IP will be assigned to. */ dropletId?: pulumi.Input<number>; /** * The IP Address of the resource */ ipAddress?: pulumi.Input<string>; /** * The region that the reserved IP is reserved to. */ region?: pulumi.Input<string>; /** * The uniform resource name of the reserved ip */ reservedIpUrn?: pulumi.Input<string>; } /** * The set of arguments for constructing a ReservedIp resource. */ export interface ReservedIpArgs { /** * The ID of Droplet that the reserved IP will be assigned to. */ dropletId?: pulumi.Input<number>; /** * The IP Address of the resource */ ipAddress?: pulumi.Input<string>; /** * The region that the reserved IP is reserved to. */ region: pulumi.Input<string>; }