@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
265 lines • 9.5 kB
TypeScript
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 [API documentation](https://www.scaleway.com/en/developers/api/instance/#path-images-list-instance-images).
*
* ## Example Usage
*
* ### From a volume
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const volume = new scaleway.instance.Volume("volume", {
* type: "b_ssd",
* sizeInGb: 20,
* });
* const volumeSnapshot = new scaleway.instance.Snapshot("volume_snapshot", {volumeId: volume.id});
* const volumeImage = new scaleway.instance.Image("volume_image", {
* name: "image_from_volume",
* rootVolumeId: volumeSnapshot.id,
* });
* ```
*
* ### From a server
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const server = new scaleway.instance.Server("server", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* });
* const serverSnapshot = new scaleway.instance.Snapshot("server_snapshot", {volumeId: main.rootVolume[0].volumeId});
* const serverImage = new scaleway.instance.Image("server_image", {
* name: "image_from_server",
* rootVolumeId: serverSnapshot.id,
* });
* ```
*
* ### With additional volumes
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const server = new scaleway.instance.Server("server", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* });
* const volume = new scaleway.instance.Volume("volume", {
* type: "b_ssd",
* sizeInGb: 20,
* });
* const volumeSnapshot = new scaleway.instance.Snapshot("volume_snapshot", {volumeId: volume.id});
* const serverSnapshot = new scaleway.instance.Snapshot("server_snapshot", {volumeId: main.rootVolume[0].volumeId});
* const image = new scaleway.instance.Image("image", {
* name: "image_with_extra_volumes",
* rootVolumeId: serverSnapshot.id,
* additionalVolumeIds: [volumeSnapshot.id],
* });
* ```
*
* ## Import
*
* Images can be imported using the `{zone}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:index/instanceImage:InstanceImage main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/instanceimage.InstanceImage has been deprecated in favor of scaleway.instance/image.Image
*/
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.
*/
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 image 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 image 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>;
/**
* The description of the root volume attached to the image.
*/
readonly rootVolumes: pulumi.Output<outputs.InstanceImageRootVolume[]>;
/**
* State of the image. Possible values are: `available`, `creating` or `error`.
*/
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 | undefined>;
/**
* 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.
*/
/** @deprecated scaleway.index/instanceimage.InstanceImage has been deprecated in favor of scaleway.instance/image.Image */
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.
*/
additionalVolumeIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The description of the extra volumes attached to the image.
*/
additionalVolumes?: pulumi.Input<pulumi.Input<inputs.InstanceImageAdditionalVolume>[] | undefined>;
/**
* The architecture the image is compatible with. Possible values are: `x8664` or `arm`.
*/
architecture?: pulumi.Input<string | undefined>;
/**
* Date of the image creation.
*/
creationDate?: pulumi.Input<string | undefined>;
/**
* ID of the server the image is based on (in case it is a backup).
*/
fromServerId?: pulumi.Input<string | undefined>;
/**
* Date of image latest update.
*/
modificationDate?: pulumi.Input<string | undefined>;
/**
* The name of the image. If not provided it will be randomly generated.
*/
name?: pulumi.Input<string | undefined>;
/**
* The organization ID the image is associated with.
*/
organizationId?: pulumi.Input<string | undefined>;
/**
* The ID of the project the image is associated with.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* Set to `true` if the image is public.
*/
public?: pulumi.Input<boolean | undefined>;
/**
* The ID of the snapshot of the volume to be used as root in the image.
*/
rootVolumeId?: pulumi.Input<string | undefined>;
/**
* The description of the root volume attached to the image.
*/
rootVolumes?: pulumi.Input<pulumi.Input<inputs.InstanceImageRootVolume>[] | undefined>;
/**
* State of the image. Possible values are: `available`, `creating` or `error`.
*/
state?: pulumi.Input<string | undefined>;
/**
* A list of tags to apply to the image.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The zone in which the image should be created.
*/
zone?: pulumi.Input<string | undefined>;
}
/**
* 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.
*/
additionalVolumeIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The architecture the image is compatible with. Possible values are: `x8664` or `arm`.
*/
architecture?: pulumi.Input<string | undefined>;
/**
* The name of the image. If not provided it will be randomly generated.
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project the image is associated with.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* Set to `true` if the image is public.
*/
public?: pulumi.Input<boolean | undefined>;
/**
* 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>[] | undefined>;
/**
* The zone in which the image should be created.
*/
zone?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=instanceImage.d.ts.map