UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

206 lines (205 loc) 7.19 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource which can be used to create a [custom image](https://www.digitalocean.com/docs/images/custom-images/) * from a URL. The URL must point to an image in one of the following file formats: * * - Raw (.img) with an MBR or GPT partition table * - qcow2 * - VHDX * - VDI * - VMDK * * The image may be compressed using gzip or bzip2. See the DigitalOcean Custom * Image documentation for [additional requirements](https://www.digitalocean.com/docs/images/custom-images/#image-requirements). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const flatcar = new digitalocean.CustomImage("flatcar", { * name: "flatcar", * url: "https://stable.release.flatcar-linux.net/amd64-usr/2605.7.0/flatcar_production_digitalocean_image.bin.bz2", * regions: ["nyc3"], * }); * const example = new digitalocean.Droplet("example", { * image: flatcar.id, * name: "example-01", * region: digitalocean.Region.NYC3, * size: digitalocean.DropletSlug.DropletS1VCPU1GB, * sshKeys: ["12345"], * }); * ``` */ export declare class CustomImage extends pulumi.CustomResource { /** * Get an existing CustomImage 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?: CustomImageState, opts?: pulumi.CustomResourceOptions): CustomImage; /** * Returns true if the given object is an instance of CustomImage. 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 CustomImage; /** * A time value given in ISO8601 combined date and time format that represents when the image was created. */ readonly createdAt: pulumi.Output<string>; /** * An optional description for the image. */ readonly description: pulumi.Output<string | undefined>; /** * An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Images/operation/images_create_custom) */ readonly distribution: pulumi.Output<string | undefined>; /** * A unique number that can be used to identify and reference a specific image. */ readonly imageId: pulumi.Output<number>; /** * The minimum disk size in GB required for a Droplet to use this image. */ readonly minDiskSize: pulumi.Output<number>; /** * A name for the Custom Image. */ readonly name: pulumi.Output<string>; /** * Indicates whether the image in question is public or not. */ readonly public: pulumi.Output<boolean>; /** * A list of regions. (Currently only one is supported). */ readonly regions: pulumi.Output<string[]>; /** * The size of the image in gigabytes. */ readonly sizeGigabytes: pulumi.Output<number>; /** * A uniquely identifying string for each image. */ readonly slug: pulumi.Output<string>; /** * A status string indicating the state of a custom image. */ readonly status: pulumi.Output<string>; /** * A list of optional tags for the image. */ readonly tags: pulumi.Output<string[] | undefined>; /** * Describes the kind of image. */ readonly type: pulumi.Output<string>; /** * A URL from which the custom Linux virtual machine image may be retrieved. */ readonly url: pulumi.Output<string>; /** * Create a CustomImage 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: CustomImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomImage resources. */ export interface CustomImageState { /** * A time value given in ISO8601 combined date and time format that represents when the image was created. */ createdAt?: pulumi.Input<string>; /** * An optional description for the image. */ description?: pulumi.Input<string>; /** * An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Images/operation/images_create_custom) */ distribution?: pulumi.Input<string>; /** * A unique number that can be used to identify and reference a specific image. */ imageId?: pulumi.Input<number>; /** * The minimum disk size in GB required for a Droplet to use this image. */ minDiskSize?: pulumi.Input<number>; /** * A name for the Custom Image. */ name?: pulumi.Input<string>; /** * Indicates whether the image in question is public or not. */ public?: pulumi.Input<boolean>; /** * A list of regions. (Currently only one is supported). */ regions?: pulumi.Input<pulumi.Input<string>[]>; /** * The size of the image in gigabytes. */ sizeGigabytes?: pulumi.Input<number>; /** * A uniquely identifying string for each image. */ slug?: pulumi.Input<string>; /** * A status string indicating the state of a custom image. */ status?: pulumi.Input<string>; /** * A list of optional tags for the image. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Describes the kind of image. */ type?: pulumi.Input<string>; /** * A URL from which the custom Linux virtual machine image may be retrieved. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a CustomImage resource. */ export interface CustomImageArgs { /** * An optional description for the image. */ description?: pulumi.Input<string>; /** * An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Images/operation/images_create_custom) */ distribution?: pulumi.Input<string>; /** * A name for the Custom Image. */ name?: pulumi.Input<string>; /** * A list of regions. (Currently only one is supported). */ regions: pulumi.Input<pulumi.Input<string>[]>; /** * A list of optional tags for the image. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * A URL from which the custom Linux virtual machine image may be retrieved. */ url: pulumi.Input<string>; }