UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

368 lines (367 loc) 14.8 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an IMS ISO image resource created from external image file in the OBS bucket within HuaweiCloud. * * ## Example Usage * ### Creating an IMS ISO image from an external image file in the OBS bucket * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const name = config.requireObject("name"); * const imageUrl = config.requireObject("imageUrl"); * const minDisk = config.requireObject("minDisk"); * const osVersion = config.requireObject("osVersion"); * const test = new huaweicloud.ims.ObsIsoImage("test", { * imageUrl: imageUrl, * minDisk: minDisk, * osVersion: osVersion, * }); * ``` * * ## Import * * The IMS OBS ISO image resource can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Ims/obsIsoImage:ObsIsoImage test <id> * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`is_config`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the resource, or the resource definition should be updated to align with the image. Also, you can ignore changes as below. resource "huaweicloud_ims_obs_iso_image" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * is_config, * * ] * * } } */ export declare class ObsIsoImage extends pulumi.CustomResource { /** * Get an existing ObsIsoImage 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?: ObsIsoImageState, opts?: pulumi.CustomResourceOptions): ObsIsoImage; /** * Returns true if the given object is an instance of ObsIsoImage. 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 ObsIsoImage; /** * The time when the image status changes to active, in RFC3339 format. */ readonly activeAt: pulumi.Output<string>; /** * Specifies the schema type of the image. The value can be **x86** or * **arm**. Defaults to **x86**. Changing this parameter will create a new resource. */ readonly architecture: pulumi.Output<string>; /** * Specifies the custom key for creating encrypted image. * Changing this parameter will create a new resource. */ readonly cmkId: pulumi.Output<string>; /** * The creation time of the image, in RFC3339 format. */ readonly createdAt: pulumi.Output<string>; /** * The image source. The format is **file,image_url**. */ readonly dataOrigin: pulumi.Output<string>; /** * Specifies the description of the image. */ readonly description: pulumi.Output<string | undefined>; /** * The image format. The valid value is **iso**. */ readonly diskFormat: pulumi.Output<string>; /** * Specifies the enterprise project ID to which the IMS image belongs. * For enterprise users, if omitted, default enterprise project will be used. */ readonly enterpriseProjectId: pulumi.Output<string>; /** * The size of the image file, in bytes unit. */ readonly imageSize: pulumi.Output<string>; /** * Specifies the URL of the external image file in the OBS bucket, the format * is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard * storage, and the image file must be ISO format. Changing this parameter will create a new resource. */ readonly imageUrl: pulumi.Output<string>; /** * Specifies whether to automatically configure. The value can be **true** or * **false**. Defaults to **false**. Changing this parameter will create a new resource. * About the content of automatic backend configuration, please refer to * [API docs](https://support.huaweicloud.com/intl/en-us/ims_faq/ims_faq_0020.html). */ readonly isConfig: pulumi.Output<boolean | undefined>; /** * Specifies the maximum memory of the image, in MB unit. */ readonly maxRam: pulumi.Output<number>; /** * Specifies the minimum size of the system disk, in GB unit. * Changing this parameter will create a new resource. * + When the operating system is Linux, the value ranges from `10` to `1,024`. * + When the operating system is Windows, the value ranges from `20` to `1,024`. */ readonly minDisk: pulumi.Output<number>; /** * Specifies the minimum memory of the image, in MB unit. */ readonly minRam: pulumi.Output<number>; /** * Specifies the name of the image. * The valid length is limited from `1` to `128` characters. * The first and last letters of the name cannot be spaces. * The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._). */ readonly name: pulumi.Output<string>; /** * The operating system type of the image. The value can be **Windows** or **Linux**. */ readonly osType: pulumi.Output<string>; /** * Specifies the operating system version of the image. * Changing this parameter will create a new resource. * For its values, see [API docs](https://support.huaweicloud.com/intl/en-us/api-ims/ims_03_0910.html). */ readonly osVersion: pulumi.Output<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ readonly region: pulumi.Output<string>; /** * The status of the image. The value can be **active**, **queued**, **saving**, **deleted**, or **killed*, * only image with a status of **active** can be used. */ readonly status: pulumi.Output<string>; /** * Specifies the key/value pairs to associate with the image. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The last update time of the image, in RFC3339 format. */ readonly updatedAt: pulumi.Output<string>; /** * Whether the image is visible to other tenants. */ readonly visibility: pulumi.Output<string>; /** * Create a ObsIsoImage 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: ObsIsoImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ObsIsoImage resources. */ export interface ObsIsoImageState { /** * The time when the image status changes to active, in RFC3339 format. */ activeAt?: pulumi.Input<string>; /** * Specifies the schema type of the image. The value can be **x86** or * **arm**. Defaults to **x86**. Changing this parameter will create a new resource. */ architecture?: pulumi.Input<string>; /** * Specifies the custom key for creating encrypted image. * Changing this parameter will create a new resource. */ cmkId?: pulumi.Input<string>; /** * The creation time of the image, in RFC3339 format. */ createdAt?: pulumi.Input<string>; /** * The image source. The format is **file,image_url**. */ dataOrigin?: pulumi.Input<string>; /** * Specifies the description of the image. */ description?: pulumi.Input<string>; /** * The image format. The valid value is **iso**. */ diskFormat?: pulumi.Input<string>; /** * Specifies the enterprise project ID to which the IMS image belongs. * For enterprise users, if omitted, default enterprise project will be used. */ enterpriseProjectId?: pulumi.Input<string>; /** * The size of the image file, in bytes unit. */ imageSize?: pulumi.Input<string>; /** * Specifies the URL of the external image file in the OBS bucket, the format * is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard * storage, and the image file must be ISO format. Changing this parameter will create a new resource. */ imageUrl?: pulumi.Input<string>; /** * Specifies whether to automatically configure. The value can be **true** or * **false**. Defaults to **false**. Changing this parameter will create a new resource. * About the content of automatic backend configuration, please refer to * [API docs](https://support.huaweicloud.com/intl/en-us/ims_faq/ims_faq_0020.html). */ isConfig?: pulumi.Input<boolean>; /** * Specifies the maximum memory of the image, in MB unit. */ maxRam?: pulumi.Input<number>; /** * Specifies the minimum size of the system disk, in GB unit. * Changing this parameter will create a new resource. * + When the operating system is Linux, the value ranges from `10` to `1,024`. * + When the operating system is Windows, the value ranges from `20` to `1,024`. */ minDisk?: pulumi.Input<number>; /** * Specifies the minimum memory of the image, in MB unit. */ minRam?: pulumi.Input<number>; /** * Specifies the name of the image. * The valid length is limited from `1` to `128` characters. * The first and last letters of the name cannot be spaces. * The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._). */ name?: pulumi.Input<string>; /** * The operating system type of the image. The value can be **Windows** or **Linux**. */ osType?: pulumi.Input<string>; /** * Specifies the operating system version of the image. * Changing this parameter will create a new resource. * For its values, see [API docs](https://support.huaweicloud.com/intl/en-us/api-ims/ims_03_0910.html). */ osVersion?: pulumi.Input<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * The status of the image. The value can be **active**, **queued**, **saving**, **deleted**, or **killed*, * only image with a status of **active** can be used. */ status?: pulumi.Input<string>; /** * Specifies the key/value pairs to associate with the image. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The last update time of the image, in RFC3339 format. */ updatedAt?: pulumi.Input<string>; /** * Whether the image is visible to other tenants. */ visibility?: pulumi.Input<string>; } /** * The set of arguments for constructing a ObsIsoImage resource. */ export interface ObsIsoImageArgs { /** * Specifies the schema type of the image. The value can be **x86** or * **arm**. Defaults to **x86**. Changing this parameter will create a new resource. */ architecture?: pulumi.Input<string>; /** * Specifies the custom key for creating encrypted image. * Changing this parameter will create a new resource. */ cmkId?: pulumi.Input<string>; /** * Specifies the description of the image. */ description?: pulumi.Input<string>; /** * Specifies the enterprise project ID to which the IMS image belongs. * For enterprise users, if omitted, default enterprise project will be used. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the URL of the external image file in the OBS bucket, the format * is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard * storage, and the image file must be ISO format. Changing this parameter will create a new resource. */ imageUrl: pulumi.Input<string>; /** * Specifies whether to automatically configure. The value can be **true** or * **false**. Defaults to **false**. Changing this parameter will create a new resource. * About the content of automatic backend configuration, please refer to * [API docs](https://support.huaweicloud.com/intl/en-us/ims_faq/ims_faq_0020.html). */ isConfig?: pulumi.Input<boolean>; /** * Specifies the maximum memory of the image, in MB unit. */ maxRam?: pulumi.Input<number>; /** * Specifies the minimum size of the system disk, in GB unit. * Changing this parameter will create a new resource. * + When the operating system is Linux, the value ranges from `10` to `1,024`. * + When the operating system is Windows, the value ranges from `20` to `1,024`. */ minDisk: pulumi.Input<number>; /** * Specifies the minimum memory of the image, in MB unit. */ minRam?: pulumi.Input<number>; /** * Specifies the name of the image. * The valid length is limited from `1` to `128` characters. * The first and last letters of the name cannot be spaces. * The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._). */ name?: pulumi.Input<string>; /** * Specifies the operating system version of the image. * Changing this parameter will create a new resource. * For its values, see [API docs](https://support.huaweicloud.com/intl/en-us/api-ims/ims_03_0910.html). */ osVersion: pulumi.Input<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the key/value pairs to associate with the image. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }