@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
500 lines (499 loc) • 17.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a V2 Image resource within OpenStack Glance.
*
* > **Note:** All arguments including the source image URL password will be
* stored in the raw state as plain-text. Read more about sensitive data in
* state.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const rancheros = new openstack.images.Image("rancheros", {
* name: "RancherOS",
* imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
* containerFormat: "bare",
* diskFormat: "qcow2",
* properties: {
* key: "value",
* },
* });
* ```
*
* ## Notes
*
* ### Properties
*
* This resource supports the ability to add properties to a resource during
* creation as well as add, update, and delete properties during an update of this
* resource.
*
* Newer versions of OpenStack are adding some read-only properties to each image.
* These properties start with the prefix `os_`. If these properties are detected,
* this resource will automatically reconcile these with the user-provided
* properties.
*
* In addition, the `directUrl` and `stores` properties are also automatically reconciled if the
* Image Service set it.
*
* ## Import
*
* Images can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:images/image:Image rancheros 89c60255-9bd6-460c-822a-e2b959ede9d2
* ```
*/
export declare class Image extends pulumi.CustomResource {
/**
* Get an existing Image 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?: ImageState, opts?: pulumi.CustomResourceOptions): Image;
/**
* Returns true if the given object is an instance of Image. 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 Image;
/**
* The checksum of the data associated with the image.
*/
readonly checksum: pulumi.Output<string>;
/**
* The container format. Must be one of "bare",
* "ovf", "aki", "ari", "ami", "ova", "docker", "compressed".
*/
readonly containerFormat: pulumi.Output<string>;
/**
* The date the image was created.
*/
readonly createdAt: pulumi.Output<string>;
/**
* If true, this provider will decompress downloaded
* image before uploading it to OpenStack. Decompression algorithm is chosen by
* checking "Content-Type" or `Content-Disposition` header to detect the
* filename extension. Supported algorithms are: gzip, bzip2, xz and zst.
* Defaults to false. Changing this creates a new Image.
*/
readonly decompress: pulumi.Output<boolean | undefined>;
/**
* The disk format. Must be one of "raw", "vhd",
* "vhdx", "vmdk", "vdi", "iso", "ploop", "qcow2", "aki", "ari", "ami"
*/
readonly diskFormat: pulumi.Output<string>;
/**
* the trailing path after the glance
* endpoint that represent the location of the image
* or the path to retrieve it.
*/
readonly file: pulumi.Output<string>;
/**
* If true, image will be hidden from public list.
* Defaults to false.
*/
readonly hidden: pulumi.Output<boolean | undefined>;
readonly imageCachePath: pulumi.Output<string | undefined>;
/**
* Unique ID (valid UUID) of image to create. Changing
* this creates a new image.
*/
readonly imageId: pulumi.Output<string>;
/**
* The password of basic auth to download
* `imageSourceUrl`.
*/
readonly imageSourcePassword: pulumi.Output<string | undefined>;
/**
* This is the url of the raw image. If
* `webDownload` is not used, then the image will be downloaded in the
* `imageCachePath` before being uploaded to Glance. Conflicts with
* `localFilePath`.
*/
readonly imageSourceUrl: pulumi.Output<string | undefined>;
/**
* The username of basic auth to download
* `imageSourceUrl`.
*/
readonly imageSourceUsername: pulumi.Output<string | undefined>;
/**
* This is the filepath of the raw image file
* that will be uploaded to Glance. Conflicts with `imageSourceUrl` and
* `webDownload`.
*/
readonly localFilePath: pulumi.Output<string | undefined>;
/**
* The metadata associated with the image.
* Image metadata allow for meaningfully define the image properties
* and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
*/
readonly metadata: pulumi.Output<{
[key: string]: string;
}>;
/**
* Amount of disk space (in GB) required to boot
* image. Defaults to 0.
*/
readonly minDiskGb: pulumi.Output<number | undefined>;
/**
* Amount of ram (in MB) required to boot image.
* Defauts to 0.
*/
readonly minRamMb: pulumi.Output<number | undefined>;
/**
* The name of the image.
*/
readonly name: pulumi.Output<string>;
/**
* The id of the openstack user who owns the image.
*/
readonly owner: pulumi.Output<string>;
/**
* A map of key/value pairs to set freeform
* information about an image. See the "Notes" section for further information
* about properties.
*/
readonly properties: pulumi.Output<{
[key: string]: string;
}>;
/**
* If true, image will not be deletable. Defaults to
* false.
*/
readonly protected: pulumi.Output<boolean | undefined>;
/**
* The region in which to obtain the V2 Glance client. A
* Glance client is needed to create an Image that can be used with a compute
* instance. If omitted, the `region` argument of the provider is used. Changing
* this creates a new Image.
*/
readonly region: pulumi.Output<string>;
/**
* The path to the JSON-schema that represent
* the image or image
*/
readonly schema: pulumi.Output<string>;
/**
* The size in bytes of the data associated with the image.
*/
readonly sizeBytes: pulumi.Output<number>;
/**
* The status of the image. It can be "queued", "active"
* or "saving".
*/
readonly status: pulumi.Output<string>;
/**
* The tags of the image. It must be a list of strings. At
* this time, it is not possible to delete all tags of an image.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The date the image was last updated.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* If false, the checksum will not be verified
* once the image is finished uploading. Conflicts with `webDownload`. Defaults
* to true when not using `webDownload`.
*/
readonly verifyChecksum: pulumi.Output<boolean | undefined>;
/**
* The visibility of the image. Must be one of
* "public", "private", "community", or "shared". The ability to set the
* visibility depends upon the configuration of the OpenStack cloud.
*/
readonly visibility: pulumi.Output<string | undefined>;
/**
* If true, the "web-download" import method will be
* used to let Openstack download the image directly from the remote source.
* Conflicts with `localFilePath`. Defaults to false.
*/
readonly webDownload: pulumi.Output<boolean | undefined>;
/**
* Create a Image 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: ImageArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Image resources.
*/
export interface ImageState {
/**
* The checksum of the data associated with the image.
*/
checksum?: pulumi.Input<string>;
/**
* The container format. Must be one of "bare",
* "ovf", "aki", "ari", "ami", "ova", "docker", "compressed".
*/
containerFormat?: pulumi.Input<string>;
/**
* The date the image was created.
*/
createdAt?: pulumi.Input<string>;
/**
* If true, this provider will decompress downloaded
* image before uploading it to OpenStack. Decompression algorithm is chosen by
* checking "Content-Type" or `Content-Disposition` header to detect the
* filename extension. Supported algorithms are: gzip, bzip2, xz and zst.
* Defaults to false. Changing this creates a new Image.
*/
decompress?: pulumi.Input<boolean>;
/**
* The disk format. Must be one of "raw", "vhd",
* "vhdx", "vmdk", "vdi", "iso", "ploop", "qcow2", "aki", "ari", "ami"
*/
diskFormat?: pulumi.Input<string>;
/**
* the trailing path after the glance
* endpoint that represent the location of the image
* or the path to retrieve it.
*/
file?: pulumi.Input<string>;
/**
* If true, image will be hidden from public list.
* Defaults to false.
*/
hidden?: pulumi.Input<boolean>;
imageCachePath?: pulumi.Input<string>;
/**
* Unique ID (valid UUID) of image to create. Changing
* this creates a new image.
*/
imageId?: pulumi.Input<string>;
/**
* The password of basic auth to download
* `imageSourceUrl`.
*/
imageSourcePassword?: pulumi.Input<string>;
/**
* This is the url of the raw image. If
* `webDownload` is not used, then the image will be downloaded in the
* `imageCachePath` before being uploaded to Glance. Conflicts with
* `localFilePath`.
*/
imageSourceUrl?: pulumi.Input<string>;
/**
* The username of basic auth to download
* `imageSourceUrl`.
*/
imageSourceUsername?: pulumi.Input<string>;
/**
* This is the filepath of the raw image file
* that will be uploaded to Glance. Conflicts with `imageSourceUrl` and
* `webDownload`.
*/
localFilePath?: pulumi.Input<string>;
/**
* The metadata associated with the image.
* Image metadata allow for meaningfully define the image properties
* and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
*/
metadata?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Amount of disk space (in GB) required to boot
* image. Defaults to 0.
*/
minDiskGb?: pulumi.Input<number>;
/**
* Amount of ram (in MB) required to boot image.
* Defauts to 0.
*/
minRamMb?: pulumi.Input<number>;
/**
* The name of the image.
*/
name?: pulumi.Input<string>;
/**
* The id of the openstack user who owns the image.
*/
owner?: pulumi.Input<string>;
/**
* A map of key/value pairs to set freeform
* information about an image. See the "Notes" section for further information
* about properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* If true, image will not be deletable. Defaults to
* false.
*/
protected?: pulumi.Input<boolean>;
/**
* The region in which to obtain the V2 Glance client. A
* Glance client is needed to create an Image that can be used with a compute
* instance. If omitted, the `region` argument of the provider is used. Changing
* this creates a new Image.
*/
region?: pulumi.Input<string>;
/**
* The path to the JSON-schema that represent
* the image or image
*/
schema?: pulumi.Input<string>;
/**
* The size in bytes of the data associated with the image.
*/
sizeBytes?: pulumi.Input<number>;
/**
* The status of the image. It can be "queued", "active"
* or "saving".
*/
status?: pulumi.Input<string>;
/**
* The tags of the image. It must be a list of strings. At
* this time, it is not possible to delete all tags of an image.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The date the image was last updated.
*/
updatedAt?: pulumi.Input<string>;
/**
* If false, the checksum will not be verified
* once the image is finished uploading. Conflicts with `webDownload`. Defaults
* to true when not using `webDownload`.
*/
verifyChecksum?: pulumi.Input<boolean>;
/**
* The visibility of the image. Must be one of
* "public", "private", "community", or "shared". The ability to set the
* visibility depends upon the configuration of the OpenStack cloud.
*/
visibility?: pulumi.Input<string>;
/**
* If true, the "web-download" import method will be
* used to let Openstack download the image directly from the remote source.
* Conflicts with `localFilePath`. Defaults to false.
*/
webDownload?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Image resource.
*/
export interface ImageArgs {
/**
* The container format. Must be one of "bare",
* "ovf", "aki", "ari", "ami", "ova", "docker", "compressed".
*/
containerFormat: pulumi.Input<string>;
/**
* If true, this provider will decompress downloaded
* image before uploading it to OpenStack. Decompression algorithm is chosen by
* checking "Content-Type" or `Content-Disposition` header to detect the
* filename extension. Supported algorithms are: gzip, bzip2, xz and zst.
* Defaults to false. Changing this creates a new Image.
*/
decompress?: pulumi.Input<boolean>;
/**
* The disk format. Must be one of "raw", "vhd",
* "vhdx", "vmdk", "vdi", "iso", "ploop", "qcow2", "aki", "ari", "ami"
*/
diskFormat: pulumi.Input<string>;
/**
* If true, image will be hidden from public list.
* Defaults to false.
*/
hidden?: pulumi.Input<boolean>;
imageCachePath?: pulumi.Input<string>;
/**
* Unique ID (valid UUID) of image to create. Changing
* this creates a new image.
*/
imageId?: pulumi.Input<string>;
/**
* The password of basic auth to download
* `imageSourceUrl`.
*/
imageSourcePassword?: pulumi.Input<string>;
/**
* This is the url of the raw image. If
* `webDownload` is not used, then the image will be downloaded in the
* `imageCachePath` before being uploaded to Glance. Conflicts with
* `localFilePath`.
*/
imageSourceUrl?: pulumi.Input<string>;
/**
* The username of basic auth to download
* `imageSourceUrl`.
*/
imageSourceUsername?: pulumi.Input<string>;
/**
* This is the filepath of the raw image file
* that will be uploaded to Glance. Conflicts with `imageSourceUrl` and
* `webDownload`.
*/
localFilePath?: pulumi.Input<string>;
/**
* Amount of disk space (in GB) required to boot
* image. Defaults to 0.
*/
minDiskGb?: pulumi.Input<number>;
/**
* Amount of ram (in MB) required to boot image.
* Defauts to 0.
*/
minRamMb?: pulumi.Input<number>;
/**
* The name of the image.
*/
name?: pulumi.Input<string>;
/**
* A map of key/value pairs to set freeform
* information about an image. See the "Notes" section for further information
* about properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* If true, image will not be deletable. Defaults to
* false.
*/
protected?: pulumi.Input<boolean>;
/**
* The region in which to obtain the V2 Glance client. A
* Glance client is needed to create an Image that can be used with a compute
* instance. If omitted, the `region` argument of the provider is used. Changing
* this creates a new Image.
*/
region?: pulumi.Input<string>;
/**
* The tags of the image. It must be a list of strings. At
* this time, it is not possible to delete all tags of an image.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* If false, the checksum will not be verified
* once the image is finished uploading. Conflicts with `webDownload`. Defaults
* to true when not using `webDownload`.
*/
verifyChecksum?: pulumi.Input<boolean>;
/**
* The visibility of the image. Must be one of
* "public", "private", "community", or "shared". The ability to set the
* visibility depends upon the configuration of the OpenStack cloud.
*/
visibility?: pulumi.Input<string>;
/**
* If true, the "web-download" import method will be
* used to let Openstack download the image directly from the remote source.
* Conflicts with `localFilePath`. Defaults to false.
*/
webDownload?: pulumi.Input<boolean>;
}