UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

116 lines (115 loc) 4.09 kB
import * as pulumi from "@pulumi/pulumi"; /** * > **Deprecated:** DigitalOcean Floating IPs have been renamed reserved IPs. This resource will be removed in a future release. Please use `digitalocean.ReservedIp` instead. * * Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets. * * > **NOTE:** Floating IPs can be assigned to a Droplet either directly on the `digitalocean.FloatingIp` resource by setting a `dropletId` or using the `digitalocean.FloatingIpAssignment` resource, but the two cannot be used together. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const foobar = new digitalocean.Droplet("foobar", { * name: "baz", * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * image: "ubuntu-18-04-x64", * region: digitalocean.Region.SGP1, * ipv6: true, * privateNetworking: true, * }); * const foobarFloatingIp = new digitalocean.FloatingIp("foobar", { * dropletId: foobar.id, * region: foobar.region, * }); * ``` * * ## Import * * Floating IPs can be imported using the `ip`, e.g. * * ```sh * $ pulumi import digitalocean:index/floatingIp:FloatingIp myip 192.168.0.1 * ``` */ export declare class FloatingIp extends pulumi.CustomResource { /** * Get an existing FloatingIp 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?: FloatingIpState, opts?: pulumi.CustomResourceOptions): FloatingIp; /** * Returns true if the given object is an instance of FloatingIp. 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 FloatingIp; /** * The ID of Droplet that the Floating IP will be assigned to. */ readonly dropletId: pulumi.Output<number | undefined>; /** * The uniform resource name of the floating ip */ readonly floatingIpUrn: pulumi.Output<string>; /** * The IP Address of the resource */ readonly ipAddress: pulumi.Output<string>; /** * The region that the Floating IP is reserved to. */ readonly region: pulumi.Output<string>; /** * Create a FloatingIp 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: FloatingIpArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FloatingIp resources. */ export interface FloatingIpState { /** * The ID of Droplet that the Floating IP will be assigned to. */ dropletId?: pulumi.Input<number>; /** * The uniform resource name of the floating ip */ floatingIpUrn?: pulumi.Input<string>; /** * The IP Address of the resource */ ipAddress?: pulumi.Input<string>; /** * The region that the Floating IP is reserved to. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a FloatingIp resource. */ export interface FloatingIpArgs { /** * The ID of Droplet that the Floating IP will be assigned to. */ dropletId?: pulumi.Input<number>; /** * The IP Address of the resource */ ipAddress?: pulumi.Input<string>; /** * The region that the Floating IP is reserved to. */ region: pulumi.Input<string>; }