Image
Manages a V2 Image resource within OpenStack Glance.
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 direct_url property is also automatically reconciled if the
Image Service set it.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var rancheros = new OpenStack.Images.Image("rancheros", new OpenStack.Images.ImageArgs
{
ContainerFormat = "bare",
DiskFormat = "qcow2",
ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
Properties =
{
{ "key", "value" },
},
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
rancheros = openstack.images.Image("rancheros",
container_format="bare",
disk_format="qcow2",
image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
properties={
"key": "value",
})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",
},
});Create a Image Resource
new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);def Image(resource_name, opts=None, container_format=None, disk_format=None, image_cache_path=None, image_source_url=None, local_file_path=None, min_disk_gb=None, min_ram_mb=None, name=None, properties=None, protected=None, region=None, tags=None, verify_checksum=None, visibility=None, web_download=None, __props__=None);public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Image resource accepts the following input properties:
- Container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- Disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- Image
Cache stringPath - Image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- Local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- Min
Disk intGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- Min
Ram intMb Amount of ram (in MB) required to boot image. Defauts to 0.
- Name string
The name of the image.
- Properties Dictionary<string, object>
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- Protected bool
If true, image will not be deletable. Defaults to false.
- Region 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
regionargument of the provider is used. Changing this creates a new Image.- List<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.
- Verify
Checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- Visibility 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.
- Web
Download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- Container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- Disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- Image
Cache stringPath - Image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- Local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- Min
Disk intGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- Min
Ram intMb Amount of ram (in MB) required to boot image. Defauts to 0.
- Name string
The name of the image.
- Properties map[string]interface{}
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- Protected bool
If true, image will not be deletable. Defaults to false.
- Region 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
regionargument of the provider is used. Changing this creates a new Image.- []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.
- Verify
Checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- Visibility 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.
- Web
Download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- image
Cache stringPath - image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- min
Disk numberGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- min
Ram numberMb Amount of ram (in MB) required to boot image. Defauts to 0.
- name string
The name of the image.
- properties {[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.
- protected boolean
If true, image will not be deletable. Defaults to false.
- region 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
regionargument of the provider is used. Changing this creates a new Image.- 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.
- verify
Checksum boolean If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- visibility 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.
- web
Download boolean If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- container_
format str The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- disk_
format str The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- image_
cache_ strpath - image_
source_ strurl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- local_
file_ strpath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- min_
disk_ floatgb Amount of disk space (in GB) required to boot image. Defaults to 0.
- min_
ram_ floatmb Amount of ram (in MB) required to boot image. Defauts to 0.
- name str
The name of the image.
- properties Dict[str, Any]
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- protected bool
If true, image will not be deletable. Defaults to false.
- region str
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
regionargument of the provider is used. Changing this creates a new Image.- List[str]
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.
- verify_
checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- visibility str
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.
- web_
download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- Checksum string
The checksum of the data associated with the image.
- Created
At string The date the image was created.
- File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, object>
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.
- Owner string
The id of the openstack user who owns the image.
- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size in bytes of the data associated with the image.
- Status string
The status of the image. It can be “queued”, “active” or “saving”.
- Update
At string (Deprecated - use
updated_atinstead)- Updated
At string The date the image was last updated.
- Checksum string
The checksum of the data associated with the image.
- Created
At string The date the image was created.
- File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]interface{}
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.
- Owner string
The id of the openstack user who owns the image.
- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size in bytes of the data associated with the image.
- Status string
The status of the image. It can be “queued”, “active” or “saving”.
- Update
At string (Deprecated - use
updated_atinstead)- Updated
At string The date the image was last updated.
- checksum string
The checksum of the data associated with the image.
- created
At string The date the image was created.
- file string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- id string
- The provider-assigned unique ID for this managed resource.
- 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.
- owner string
The id of the openstack user who owns the image.
- schema string
The path to the JSON-schema that represent the image or image
- size
Bytes number The size in bytes of the data associated with the image.
- status string
The status of the image. It can be “queued”, “active” or “saving”.
- update
At string (Deprecated - use
updated_atinstead)- updated
At string The date the image was last updated.
- checksum str
The checksum of the data associated with the image.
- created_
at str The date the image was created.
- file str
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Dict[str, 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.
- owner str
The id of the openstack user who owns the image.
- schema str
The path to the JSON-schema that represent the image or image
- size_
bytes float The size in bytes of the data associated with the image.
- status str
The status of the image. It can be “queued”, “active” or “saving”.
- update_
at str (Deprecated - use
updated_atinstead)- updated_
at str The date the image was last updated.
Look up an Existing Image Resource
Get an existing Image resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ImageState, opts?: CustomResourceOptions): Imagestatic get(resource_name, id, opts=None, checksum=None, container_format=None, created_at=None, disk_format=None, file=None, image_cache_path=None, image_source_url=None, local_file_path=None, metadata=None, min_disk_gb=None, min_ram_mb=None, name=None, owner=None, properties=None, protected=None, region=None, schema=None, size_bytes=None, status=None, tags=None, update_at=None, updated_at=None, verify_checksum=None, visibility=None, web_download=None, __props__=None);func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Checksum string
The checksum of the data associated with the image.
- Container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- Created
At string The date the image was created.
- Disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Image
Cache stringPath - Image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- Local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- Metadata Dictionary<string, object>
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.
- Min
Disk intGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- Min
Ram intMb Amount of ram (in MB) required to boot image. Defauts to 0.
- Name string
The name of the image.
- Owner string
The id of the openstack user who owns the image.
- Properties Dictionary<string, object>
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- Protected bool
If true, image will not be deletable. Defaults to false.
- Region 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
regionargument of the provider is used. Changing this creates a new Image.- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size in bytes of the data associated with the image.
- Status string
The status of the image. It can be “queued”, “active” or “saving”.
- List<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.
- Update
At string (Deprecated - use
updated_atinstead)- Updated
At string The date the image was last updated.
- Verify
Checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- Visibility 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.
- Web
Download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- Checksum string
The checksum of the data associated with the image.
- Container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- Created
At string The date the image was created.
- Disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Image
Cache stringPath - Image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- Local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- Metadata map[string]interface{}
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.
- Min
Disk intGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- Min
Ram intMb Amount of ram (in MB) required to boot image. Defauts to 0.
- Name string
The name of the image.
- Owner string
The id of the openstack user who owns the image.
- Properties map[string]interface{}
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- Protected bool
If true, image will not be deletable. Defaults to false.
- Region 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
regionargument of the provider is used. Changing this creates a new Image.- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size in bytes of the data associated with the image.
- Status string
The status of the image. It can be “queued”, “active” or “saving”.
- []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.
- Update
At string (Deprecated - use
updated_atinstead)- Updated
At string The date the image was last updated.
- Verify
Checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- Visibility 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.
- Web
Download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- checksum string
The checksum of the data associated with the image.
- container
Format string The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- created
At string The date the image was created.
- disk
Format string The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- file string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- image
Cache stringPath - image
Source stringUrl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- local
File stringPath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- 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.
- min
Disk numberGb Amount of disk space (in GB) required to boot image. Defaults to 0.
- min
Ram numberMb Amount of ram (in MB) required to boot image. Defauts to 0.
- name string
The name of the image.
- owner string
The id of the openstack user who owns the image.
- properties {[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.
- protected boolean
If true, image will not be deletable. Defaults to false.
- region 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
regionargument of the provider is used. Changing this creates a new Image.- schema string
The path to the JSON-schema that represent the image or image
- size
Bytes number The size in bytes of the data associated with the image.
- status string
The status of the image. It can be “queued”, “active” or “saving”.
- 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.
- update
At string (Deprecated - use
updated_atinstead)- updated
At string The date the image was last updated.
- verify
Checksum boolean If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- visibility 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.
- web
Download boolean If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
- checksum str
The checksum of the data associated with the image.
- container_
format str The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
- created_
at str The date the image was created.
- disk_
format str The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
- file str
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- image_
cache_ strpath - image_
source_ strurl This is the url of the raw image. If
web_downloadis not used, then the image will be downloaded in theimage_cache_pathbefore being uploaded to Glance. Conflicts withlocal_file_path.- local_
file_ strpath This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.- metadata Dict[str, 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.
- min_
disk_ floatgb Amount of disk space (in GB) required to boot image. Defaults to 0.
- min_
ram_ floatmb Amount of ram (in MB) required to boot image. Defauts to 0.
- name str
The name of the image.
- owner str
The id of the openstack user who owns the image.
- properties Dict[str, Any]
A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
- protected bool
If true, image will not be deletable. Defaults to false.
- region str
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
regionargument of the provider is used. Changing this creates a new Image.- schema str
The path to the JSON-schema that represent the image or image
- size_
bytes float The size in bytes of the data associated with the image.
- status str
The status of the image. It can be “queued”, “active” or “saving”.
- List[str]
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.
- update_
at str (Deprecated - use
updated_atinstead)- updated_
at str The date the image was last updated.
- verify_
checksum bool If false, the checksum will not be verified once the image is finished uploading. Conflicts with
web_download. Defaults to true when not usingweb_download.- visibility str
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.
- web_
download bool If true, the “web-download” import method will be used to let Openstack download the image directly from the remote source. Conflicts with
local_file_path. Defaults to false.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.