Module images
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-openstackrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-openstackrepo.
Resources
Functions
Others
- GetImageArgs
- GetImageResult
- ImageAccessAcceptArgs
- ImageAccessAcceptState
- ImageAccessArgs
- ImageAccessState
- ImageArgs
- ImageState
Resources
Resource Image
class Image extends CustomResourceManages a V2 Image resource within OpenStack Glance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = new openstack.images.Image("rancheros", {
containerFormat: "bare",
diskFormat: "qcow2",
imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
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 property is also automatically reconciled if the
Image Service set it.
constructor
new Image(name: string, args: ImageArgs, opts?: pulumi.CustomResourceOptions)Create a Image resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ImageState, opts?: pulumi.CustomResourceOptions): ImageGet an existing Image resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ImageReturns 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.
property checksum
public checksum: pulumi.Output<string>;The checksum of the data associated with the image.
property containerFormat
public containerFormat: pulumi.Output<string>;The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
property createdAt
public createdAt: pulumi.Output<string>;The date the image was created.
property diskFormat
public diskFormat: pulumi.Output<string>;The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
property file
public file: pulumi.Output<string>;the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property imageCachePath
public imageCachePath: pulumi.Output<string | undefined>;property imageSourceUrl
public imageSourceUrl: 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.
property localFilePath
public localFilePath: pulumi.Output<string | undefined>;This is the filepath of the raw image file
that will be uploaded to Glance. Conflicts with imageSourceUrl and
webDownload.
property metadata
public metadata: pulumi.Output<{[key: string]: any}>;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.
property minDiskGb
public minDiskGb: pulumi.Output<number | undefined>;Amount of disk space (in GB) required to boot image. Defaults to 0.
property minRamMb
public minRamMb: pulumi.Output<number | undefined>;Amount of ram (in MB) required to boot image. Defauts to 0.
property name
public name: pulumi.Output<string>;The name of the image.
property owner
public owner: pulumi.Output<string>;The id of the openstack user who owns the image.
property properties
public properties: pulumi.Output<{[key: string]: any}>;A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
property protected
public protected: pulumi.Output<boolean | undefined>;If true, image will not be deletable. Defaults to false.
property region
public region: pulumi.Output<string>;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.
property schema
public schema: pulumi.Output<string>;The path to the JSON-schema that represent the image or image
property sizeBytes
public sizeBytes: pulumi.Output<number>;The size in bytes of the data associated with the image.
property status
public status: pulumi.Output<string>;The status of the image. It can be “queued”, “active” or “saving”.
property tags
public tags: pulumi.Output<string[] | undefined>;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.
property updateAt
public updateAt: pulumi.Output<string>;(Deprecated - use updatedAt instead)
property updatedAt
public updatedAt: pulumi.Output<string>;The date the image was last updated.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property verifyChecksum
public verifyChecksum: pulumi.Output<boolean | undefined>;If false, the checksum will not be verified
once the image is finished uploading. Conflicts with webDownload.
Defaults to true when not using webDownload.
property visibility
public visibility: pulumi.Output<string | 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.
property webDownload
public webDownload: pulumi.Output<boolean | 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.
Resource ImageAccess
class ImageAccess extends CustomResourceManages members for the shared OpenStack Glance V2 Image within the source project, which owns the Image.
Example Usage
Unprivileged user
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = new openstack.images.Image("rancheros", {
containerFormat: "bare",
diskFormat: "qcow2",
imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
properties: {
key: "value",
},
visibility: "shared",
});
const rancherosMember = new openstack.images.ImageAccess("rancherosMember", {
imageId: rancheros.id,
memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
});Privileged user
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = new openstack.images.Image("rancheros", {
containerFormat: "bare",
diskFormat: "qcow2",
imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
properties: {
key: "value",
},
visibility: "shared",
});
const rancherosMember = new openstack.images.ImageAccess("rancherosMember", {
imageId: rancheros.id,
memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
status: "accepted",
});constructor
new ImageAccess(name: string, args: ImageAccessArgs, opts?: pulumi.CustomResourceOptions)Create a ImageAccess resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ImageAccessState, opts?: pulumi.CustomResourceOptions): ImageAccessGet an existing ImageAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ImageAccessReturns true if the given object is an instance of ImageAccess. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property createdAt
public createdAt: pulumi.Output<string>;The date the image access was created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property imageId
public imageId: pulumi.Output<string>;The image ID.
property memberId
public memberId: pulumi.Output<string>;The member ID, e.g. the target project ID.
property region
public region: pulumi.Output<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the region
argument of the provider is used. Changing this creates a new resource.
property schema
public schema: pulumi.Output<string>;The member schema.
property status
public status: pulumi.Output<string>;The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be accepted, rejected or
pending. Defaults to pending. Foridden for non-admin users.
property updatedAt
public updatedAt: pulumi.Output<string>;The date the image access was last updated.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ImageAccessAccept
class ImageAccessAccept extends CustomResourceManages memberships status for the shared OpenStack Glance V2 Image within the destination project, which has a member proposal.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = pulumi.output(openstack.images.getImage({
memberStatus: "all",
name: "RancherOS",
visibility: "shared",
}, { async: true }));
const rancherosMember = new openstack.images.ImageAccessAccept("rancherosMember", {
imageId: rancheros.id,
status: "accepted",
});constructor
new ImageAccessAccept(name: string, args: ImageAccessAcceptArgs, opts?: pulumi.CustomResourceOptions)Create a ImageAccessAccept resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ImageAccessAcceptState, opts?: pulumi.CustomResourceOptions): ImageAccessAcceptGet an existing ImageAccessAccept resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ImageAccessAcceptReturns true if the given object is an instance of ImageAccessAccept. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property createdAt
public createdAt: pulumi.Output<string>;The date the image membership was created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property imageId
public imageId: pulumi.Output<string>;The proposed image ID.
property memberId
public memberId: pulumi.Output<string>;The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
property region
public region: pulumi.Output<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image memberships. If omitted, the
region argument of the provider is used. Changing this creates a new
membership.
property schema
public schema: pulumi.Output<string>;The membership schema.
property status
public status: pulumi.Output<string>;The membership proposal status. Can either be
accepted, rejected or pending.
property updatedAt
public updatedAt: pulumi.Output<string>;The date the image membership was last updated.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getImage
getImage(args?: GetImageArgs, opts?: pulumi.InvokeOptions): Promise<GetImageResult>Use this data source to get the ID of an available OpenStack image.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const ubuntu = pulumi.output(openstack.images.getImage({
mostRecent: true,
name: "Ubuntu 16.04",
properties: {
key: "value",
},
}, { async: true }));Others
interface GetImageArgs
interface GetImageArgsA collection of arguments for invoking getImage.
property memberStatus
memberStatus?: undefined | string;The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
property mostRecent
mostRecent?: undefined | false | true;If more than one result is returned, use the most recent image.
property name
name?: undefined | string;The name of the image.
property owner
owner?: undefined | string;The owner (UUID) of the image.
property properties
properties?: undefined | {[key: string]: any};a map of key/value pairs to match an image with. All specified properties must be matched.
property region
region?: undefined | string;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.
property sizeMax
sizeMax?: undefined | number;The maximum size (in bytes) of the image to return.
property sizeMin
sizeMin?: undefined | number;The minimum size (in bytes) of the image to return.
property sortDirection
sortDirection?: undefined | string;Order the results in either asc or desc.
property sortKey
sortKey?: undefined | string;Sort images based on a certain key. Defaults to name.
property tag
tag?: undefined | string;Search for images with a specific tag.
property visibility
visibility?: undefined | string;The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.
interface GetImageResult
interface GetImageResultA collection of values returned by getImage.
property checksum
checksum: string;The checksum of the data associated with the image.
property containerFormat
containerFormat: string;property createdAt
createdAt: string;The date the image was created.
* containerFormat: The format of the image’s container.
* diskFormat: The format of the image’s disk.
property diskFormat
diskFormat: string;property file
file: string;the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
property id
id: string;The provider-assigned unique ID for this managed resource.
property memberStatus
memberStatus?: undefined | string;property metadata
metadata: {[key: string]: any};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.
property minDiskGb
minDiskGb: number;The minimum amount of disk space required to use the image.
property minRamMb
minRamMb: number;The minimum amount of ram required to use the image.
property mostRecent
mostRecent?: undefined | false | true;property name
name?: undefined | string;property owner
owner?: undefined | string;property properties
properties?: undefined | {[key: string]: any};Freeform information about the image.
property protected
protected: boolean;Whether or not the image is protected.
property region
region: string;property schema
schema: string;The path to the JSON-schema that represent the image or image
property sizeBytes
sizeBytes: number;The size of the image (in bytes).
property sizeMax
sizeMax?: undefined | number;property sizeMin
sizeMin?: undefined | number;property sortDirection
sortDirection?: undefined | string;property sortKey
sortKey?: undefined | string;property tag
tag?: undefined | string;property tags
tags: string[];The tags list of the image.
property updatedAt
updatedAt: string;The date the image was last updated.
property visibility
visibility?: undefined | string;interface ImageAccessAcceptArgs
interface ImageAccessAcceptArgsThe set of arguments for constructing a ImageAccessAccept resource.
property imageId
imageId: pulumi.Input<string>;The proposed image ID.
property memberId
memberId?: pulumi.Input<string>;The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
property region
region?: pulumi.Input<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image memberships. If omitted, the
region argument of the provider is used. Changing this creates a new
membership.
property status
status: pulumi.Input<string>;The membership proposal status. Can either be
accepted, rejected or pending.
interface ImageAccessAcceptState
interface ImageAccessAcceptStateInput properties used for looking up and filtering ImageAccessAccept resources.
property createdAt
createdAt?: pulumi.Input<string>;The date the image membership was created.
property imageId
imageId?: pulumi.Input<string>;The proposed image ID.
property memberId
memberId?: pulumi.Input<string>;The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
property region
region?: pulumi.Input<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image memberships. If omitted, the
region argument of the provider is used. Changing this creates a new
membership.
property schema
schema?: pulumi.Input<string>;The membership schema.
property status
status?: pulumi.Input<string>;The membership proposal status. Can either be
accepted, rejected or pending.
property updatedAt
updatedAt?: pulumi.Input<string>;The date the image membership was last updated.
interface ImageAccessArgs
interface ImageAccessArgsThe set of arguments for constructing a ImageAccess resource.
property imageId
imageId: pulumi.Input<string>;The image ID.
property memberId
memberId: pulumi.Input<string>;The member ID, e.g. the target project ID.
property region
region?: pulumi.Input<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the region
argument of the provider is used. Changing this creates a new resource.
property status
status?: pulumi.Input<string>;The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be accepted, rejected or
pending. Defaults to pending. Foridden for non-admin users.
interface ImageAccessState
interface ImageAccessStateInput properties used for looking up and filtering ImageAccess resources.
property createdAt
createdAt?: pulumi.Input<string>;The date the image access was created.
property imageId
imageId?: pulumi.Input<string>;The image ID.
property memberId
memberId?: pulumi.Input<string>;The member ID, e.g. the target project ID.
property region
region?: pulumi.Input<string>;The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the region
argument of the provider is used. Changing this creates a new resource.
property schema
schema?: pulumi.Input<string>;The member schema.
property status
status?: pulumi.Input<string>;The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be accepted, rejected or
pending. Defaults to pending. Foridden for non-admin users.
property updatedAt
updatedAt?: pulumi.Input<string>;The date the image access was last updated.
interface ImageArgs
interface ImageArgsThe set of arguments for constructing a Image resource.
property containerFormat
containerFormat: pulumi.Input<string>;The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
property diskFormat
diskFormat: pulumi.Input<string>;The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
property imageCachePath
imageCachePath?: pulumi.Input<string>;property imageSourceUrl
imageSourceUrl?: 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.
property localFilePath
localFilePath?: pulumi.Input<string>;This is the filepath of the raw image file
that will be uploaded to Glance. Conflicts with imageSourceUrl and
webDownload.
property minDiskGb
minDiskGb?: pulumi.Input<number>;Amount of disk space (in GB) required to boot image. Defaults to 0.
property minRamMb
minRamMb?: pulumi.Input<number>;Amount of ram (in MB) required to boot image. Defauts to 0.
property name
name?: pulumi.Input<string>;The name of the image.
property properties
properties?: pulumi.Input<{[key: string]: any}>;A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
property protected
protected?: pulumi.Input<boolean>;If true, image will not be deletable. Defaults to false.
property region
region?: pulumi.Input<string>;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.
property tags
tags?: pulumi.Input<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.
property verifyChecksum
verifyChecksum?: pulumi.Input<boolean>;If false, the checksum will not be verified
once the image is finished uploading. Conflicts with webDownload.
Defaults to true when not using webDownload.
property visibility
visibility?: pulumi.Input<string>;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.
property webDownload
webDownload?: pulumi.Input<boolean>;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.
interface ImageState
interface ImageStateInput properties used for looking up and filtering Image resources.
property checksum
checksum?: pulumi.Input<string>;The checksum of the data associated with the image.
property containerFormat
containerFormat?: pulumi.Input<string>;The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
property createdAt
createdAt?: pulumi.Input<string>;The date the image was created.
property diskFormat
diskFormat?: pulumi.Input<string>;The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
property file
file?: pulumi.Input<string>;the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
property imageCachePath
imageCachePath?: pulumi.Input<string>;property imageSourceUrl
imageSourceUrl?: 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.
property localFilePath
localFilePath?: pulumi.Input<string>;This is the filepath of the raw image file
that will be uploaded to Glance. Conflicts with imageSourceUrl and
webDownload.
property metadata
metadata?: pulumi.Input<{[key: string]: any}>;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.
property minDiskGb
minDiskGb?: pulumi.Input<number>;Amount of disk space (in GB) required to boot image. Defaults to 0.
property minRamMb
minRamMb?: pulumi.Input<number>;Amount of ram (in MB) required to boot image. Defauts to 0.
property name
name?: pulumi.Input<string>;The name of the image.
property owner
owner?: pulumi.Input<string>;The id of the openstack user who owns the image.
property properties
properties?: pulumi.Input<{[key: string]: any}>;A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
property protected
protected?: pulumi.Input<boolean>;If true, image will not be deletable. Defaults to false.
property region
region?: pulumi.Input<string>;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.
property schema
schema?: pulumi.Input<string>;The path to the JSON-schema that represent the image or image
property sizeBytes
sizeBytes?: pulumi.Input<number>;The size in bytes of the data associated with the image.
property status
status?: pulumi.Input<string>;The status of the image. It can be “queued”, “active” or “saving”.
property tags
tags?: pulumi.Input<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.
property updateAt
updateAt?: pulumi.Input<string>;(Deprecated - use updatedAt instead)
property updatedAt
updatedAt?: pulumi.Input<string>;The date the image was last updated.
property verifyChecksum
verifyChecksum?: pulumi.Input<boolean>;If false, the checksum will not be verified
once the image is finished uploading. Conflicts with webDownload.
Defaults to true when not using webDownload.
property visibility
visibility?: pulumi.Input<string>;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.
property webDownload
webDownload?: pulumi.Input<boolean>;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.