UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

231 lines (230 loc) 7.84 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Creates and manages Scaleway Compute Images. * For more information, see [the documentation](https://developers.scaleway.com/en/products/instance/api/#images-41389b). * * ## Example * * ### From a volume * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const volume = new scaleway.InstanceVolume("volume", { * type: "b_ssd", * sizeInGb: 20, * }); * const volumeSnapshot = new scaleway.InstanceSnapshot("volumeSnapshot", {volumeId: volume.id}); * const volumeImage = new scaleway.InstanceImage("volumeImage", {rootVolumeId: volumeSnapshot.id}); * ``` * * ### From a server * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const server = new scaleway.InstanceServer("server", { * image: "ubuntu_jammy", * type: "DEV1-S", * }); * const serverSnapshot = new scaleway.InstanceSnapshot("serverSnapshot", {volumeId: scaleway_instance_server.main.root_volume[0].volume_id}); * const serverImage = new scaleway.InstanceImage("serverImage", {rootVolumeId: serverSnapshot.id}); * ``` * * ## Import * * Images can be imported using the `{zone}/{id}`, e.g. bash * * ```sh * $ pulumi import scaleway:index/instanceImage:InstanceImage main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ export declare class InstanceImage extends pulumi.CustomResource { /** * Get an existing InstanceImage 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?: InstanceImageState, opts?: pulumi.CustomResourceOptions): InstanceImage; /** * Returns true if the given object is an instance of InstanceImage. 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 InstanceImage; /** * List of IDs of the snapshots of the additional volumes to be attached to the image. * * > **Important:** For now it is only possible to have 1 additional_volume. */ readonly additionalVolumeIds: pulumi.Output<string | undefined>; /** * The description of the extra volumes attached to the image. */ readonly additionalVolumes: pulumi.Output<outputs.InstanceImageAdditionalVolume[]>; /** * The architecture the image is compatible with. Possible values are: `x8664` or `arm`. */ readonly architecture: pulumi.Output<string | undefined>; /** * Date of the volume creation. */ readonly creationDate: pulumi.Output<string>; /** * ID of the server the image is based on (in case it is a backup). */ readonly fromServerId: pulumi.Output<string>; /** * Date of volume latest update. */ readonly modificationDate: pulumi.Output<string>; /** * The name of the image. If not provided it will be randomly generated. */ readonly name: pulumi.Output<string>; /** * The organization ID the image is associated with. */ readonly organizationId: pulumi.Output<string>; /** * The ID of the project the image is associated with. */ readonly projectId: pulumi.Output<string>; /** * Set to `true` if the image is public. */ readonly public: pulumi.Output<boolean | undefined>; /** * The ID of the snapshot of the volume to be used as root in the image. */ readonly rootVolumeId: pulumi.Output<string>; /** * State of the volume. */ readonly state: pulumi.Output<string>; /** * A list of tags to apply to the image. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The zone in which the image should be created. */ readonly zone: pulumi.Output<string>; /** * Create a InstanceImage 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: InstanceImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering InstanceImage resources. */ export interface InstanceImageState { /** * List of IDs of the snapshots of the additional volumes to be attached to the image. * * > **Important:** For now it is only possible to have 1 additional_volume. */ additionalVolumeIds?: pulumi.Input<string>; /** * The description of the extra volumes attached to the image. */ additionalVolumes?: pulumi.Input<pulumi.Input<inputs.InstanceImageAdditionalVolume>[]>; /** * The architecture the image is compatible with. Possible values are: `x8664` or `arm`. */ architecture?: pulumi.Input<string>; /** * Date of the volume creation. */ creationDate?: pulumi.Input<string>; /** * ID of the server the image is based on (in case it is a backup). */ fromServerId?: pulumi.Input<string>; /** * Date of volume latest update. */ modificationDate?: pulumi.Input<string>; /** * The name of the image. If not provided it will be randomly generated. */ name?: pulumi.Input<string>; /** * The organization ID the image is associated with. */ organizationId?: pulumi.Input<string>; /** * The ID of the project the image is associated with. */ projectId?: pulumi.Input<string>; /** * Set to `true` if the image is public. */ public?: pulumi.Input<boolean>; /** * The ID of the snapshot of the volume to be used as root in the image. */ rootVolumeId?: pulumi.Input<string>; /** * State of the volume. */ state?: pulumi.Input<string>; /** * A list of tags to apply to the image. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The zone in which the image should be created. */ zone?: pulumi.Input<string>; } /** * The set of arguments for constructing a InstanceImage resource. */ export interface InstanceImageArgs { /** * List of IDs of the snapshots of the additional volumes to be attached to the image. * * > **Important:** For now it is only possible to have 1 additional_volume. */ additionalVolumeIds?: pulumi.Input<string>; /** * The architecture the image is compatible with. Possible values are: `x8664` or `arm`. */ architecture?: pulumi.Input<string>; /** * The name of the image. If not provided it will be randomly generated. */ name?: pulumi.Input<string>; /** * The ID of the project the image is associated with. */ projectId?: pulumi.Input<string>; /** * Set to `true` if the image is public. */ public?: pulumi.Input<boolean>; /** * The ID of the snapshot of the volume to be used as root in the image. */ rootVolumeId: pulumi.Input<string>; /** * A list of tags to apply to the image. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The zone in which the image should be created. */ zone?: pulumi.Input<string>; }