This page documents the language specification for the openstack package. If you're looking for help working with the inputs, outputs, or functions of openstack resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-openstack repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-openstack repo.
- class
pulumi_openstack.images.AwaitableGetImageResult(checksum=None, container_format=None, created_at=None, disk_format=None, file=None, id=None, member_status=None, metadata=None, min_disk_gb=None, min_ram_mb=None, most_recent=None, name=None, owner=None, properties=None, protected=None, region=None, schema=None, size_bytes=None, size_max=None, size_min=None, sort_direction=None, sort_key=None, tag=None, tags=None, updated_at=None, visibility=None)¶
- class
pulumi_openstack.images.GetImageResult(checksum=None, container_format=None, created_at=None, disk_format=None, file=None, id=None, member_status=None, metadata=None, min_disk_gb=None, min_ram_mb=None, most_recent=None, name=None, owner=None, properties=None, protected=None, region=None, schema=None, size_bytes=None, size_max=None, size_min=None, sort_direction=None, sort_key=None, tag=None, tags=None, updated_at=None, visibility=None)¶ A collection of values returned by getImage.
checksum= None¶The checksum of the data associated with the image.
created_at= None¶The date the image was created.
container_format: The format of the image’s container.disk_format: The format of the image’s disk.
file= None¶the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
id= None¶The provider-assigned unique ID for this managed resource.
metadata= None¶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_gb= None¶The minimum amount of disk space required to use the image.
min_ram_mb= None¶The minimum amount of ram required to use the image.
properties= None¶Freeform information about the image.
protected= None¶Whether or not the image is protected.
schema= None¶The path to the JSON-schema that represent the image or image
size_bytes= None¶The size of the image (in bytes).
The tags list of the image.
updated_at= None¶The date the image was last updated.
- class
pulumi_openstack.images.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, __name__=None, __opts__=None)¶ Manages a V2 Image resource within OpenStack Glance.
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", })
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_urlproperty is also automatically reconciled if the Image Service set it.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
container_format (pulumi.Input[str]) – The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
disk_format (pulumi.Input[str]) – The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
image_source_url (pulumi.Input[str]) – 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_path (pulumi.Input[str]) – This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.min_disk_gb (pulumi.Input[float]) – Amount of disk space (in GB) required to boot image. Defaults to 0.
min_ram_mb (pulumi.Input[float]) – Amount of ram (in MB) required to boot image. Defauts to 0.
name (pulumi.Input[str]) – The name of the image.
properties (pulumi.Input[dict]) – A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
protected (pulumi.Input[bool]) – If true, image will not be deletable. Defaults to false.
region (pulumi.Input[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.tags (pulumi.Input[list]) – 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 (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[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: pulumi.Output[str] = None¶The checksum of the data associated with the image.
container_format: pulumi.Output[str] = None¶The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
created_at: pulumi.Output[str] = None¶The date the image was created.
disk_format: pulumi.Output[str] = None¶The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
file: pulumi.Output[str] = None¶the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
image_source_url: pulumi.Output[str] = None¶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_path: pulumi.Output[str] = None¶This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.
metadata: pulumi.Output[dict] = None¶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_gb: pulumi.Output[float] = None¶Amount of disk space (in GB) required to boot image. Defaults to 0.
min_ram_mb: pulumi.Output[float] = None¶Amount of ram (in MB) required to boot image. Defauts to 0.
name: pulumi.Output[str] = None¶The name of the image.
owner: pulumi.Output[str] = None¶The id of the openstack user who owns the image.
properties: pulumi.Output[dict] = None¶A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
protected: pulumi.Output[bool] = None¶If true, image will not be deletable. Defaults to false.
region: pulumi.Output[str] = None¶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: pulumi.Output[str] = None¶The path to the JSON-schema that represent the image or image
size_bytes: pulumi.Output[float] = None¶The size in bytes of the data associated with the image.
status: pulumi.Output[str] = None¶The status of the image. It can be “queued”, “active” or “saving”.
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: pulumi.Output[str] = None¶(Deprecated - use
updated_atinstead)
updated_at: pulumi.Output[str] = None¶The date the image was last updated.
verify_checksum: pulumi.Output[bool] = None¶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: pulumi.Output[str] = None¶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: pulumi.Output[bool] = None¶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.
- static
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)¶ Get an existing Image resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
checksum (pulumi.Input[str]) – The checksum of the data associated with the image.
container_format (pulumi.Input[str]) – The container format. Must be one of “ami”, “ari”, “aki”, “bare”, “ovf”.
created_at (pulumi.Input[str]) – The date the image was created.
disk_format (pulumi.Input[str]) – The disk format. Must be one of “ami”, “ari”, “aki”, “vhd”, “vmdk”, “raw”, “qcow2”, “vdi”, “iso”.
file (pulumi.Input[str]) – the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
image_source_url (pulumi.Input[str]) – 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_path (pulumi.Input[str]) – This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with
image_source_urlandweb_download.metadata (pulumi.Input[dict]) – 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_gb (pulumi.Input[float]) – Amount of disk space (in GB) required to boot image. Defaults to 0.
min_ram_mb (pulumi.Input[float]) – Amount of ram (in MB) required to boot image. Defauts to 0.
name (pulumi.Input[str]) – The name of the image.
owner (pulumi.Input[str]) – The id of the openstack user who owns the image.
properties (pulumi.Input[dict]) – A map of key/value pairs to set freeform information about an image. See the “Notes” section for further information about properties.
protected (pulumi.Input[bool]) – If true, image will not be deletable. Defaults to false.
region (pulumi.Input[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 (pulumi.Input[str]) – The path to the JSON-schema that represent the image or image
size_bytes (pulumi.Input[float]) – The size in bytes of the data associated with the image.
status (pulumi.Input[str]) – The status of the image. It can be “queued”, “active” or “saving”.
tags (pulumi.Input[list]) – 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 (pulumi.Input[str]) – (Deprecated - use
updated_atinstead)updated_at (pulumi.Input[str]) – The date the image was last updated.
verify_checksum (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[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.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_openstack.images.ImageAccess(resource_name, opts=None, image_id=None, member_id=None, region=None, status=None, __props__=None, __name__=None, __opts__=None)¶ Manages members for the shared OpenStack Glance V2 Image within the source project, which owns the Image.
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", }, visibility="shared") rancheros_member = openstack.images.ImageAccess("rancherosMember", image_id=rancheros.id, member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4")
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", }, visibility="shared") rancheros_member = openstack.images.ImageAccess("rancherosMember", image_id=rancheros.id, member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4", status="accepted")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
image_id (pulumi.Input[str]) – The image ID.
member_id (pulumi.Input[str]) – The member ID, e.g. the target project ID.
region (pulumi.Input[str]) – The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the
regionargument of the provider is used. Changing this creates a new resource.status (pulumi.Input[str]) – The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be
accepted,rejectedorpending. Defaults topending. Foridden for non-admin users.
created_at: pulumi.Output[str] = None¶The date the image access was created.
image_id: pulumi.Output[str] = None¶The image ID.
member_id: pulumi.Output[str] = None¶The member ID, e.g. the target project ID.
region: pulumi.Output[str] = None¶The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the
regionargument of the provider is used. Changing this creates a new resource.
schema: pulumi.Output[str] = None¶The member schema.
status: pulumi.Output[str] = None¶The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be
accepted,rejectedorpending. Defaults topending. Foridden for non-admin users.
updated_at: pulumi.Output[str] = None¶The date the image access was last updated.
- static
get(resource_name, id, opts=None, created_at=None, image_id=None, member_id=None, region=None, schema=None, status=None, updated_at=None)¶ Get an existing ImageAccess resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
created_at (pulumi.Input[str]) – The date the image access was created.
image_id (pulumi.Input[str]) – The image ID.
member_id (pulumi.Input[str]) – The member ID, e.g. the target project ID.
region (pulumi.Input[str]) – The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the
regionargument of the provider is used. Changing this creates a new resource.schema (pulumi.Input[str]) – The member schema.
status (pulumi.Input[str]) – The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be
accepted,rejectedorpending. Defaults topending. Foridden for non-admin users.updated_at (pulumi.Input[str]) – The date the image access was last updated.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_openstack.images.ImageAccessAccept(resource_name, opts=None, image_id=None, member_id=None, region=None, status=None, __props__=None, __name__=None, __opts__=None)¶ Manages memberships status for the shared OpenStack Glance V2 Image within the destination project, which has a member proposal.
import pulumi import pulumi_openstack as openstack rancheros = openstack.images.get_image(member_status="all", name="RancherOS", visibility="shared") rancheros_member = openstack.images.ImageAccessAccept("rancherosMember", image_id=rancheros.id, status="accepted")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
image_id (pulumi.Input[str]) – The proposed image ID.
member_id (pulumi.Input[str]) – The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
region (pulumi.Input[str]) – The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the
regionargument of the provider is used. Changing this creates a new membership.status (pulumi.Input[str]) – The membership proposal status. Can either be
accepted,rejectedorpending.
created_at: pulumi.Output[str] = None¶The date the image membership was created.
image_id: pulumi.Output[str] = None¶The proposed image ID.
member_id: pulumi.Output[str] = None¶The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
region: pulumi.Output[str] = None¶The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the
regionargument of the provider is used. Changing this creates a new membership.
schema: pulumi.Output[str] = None¶The membership schema.
status: pulumi.Output[str] = None¶The membership proposal status. Can either be
accepted,rejectedorpending.
updated_at: pulumi.Output[str] = None¶The date the image membership was last updated.
- static
get(resource_name, id, opts=None, created_at=None, image_id=None, member_id=None, region=None, schema=None, status=None, updated_at=None)¶ Get an existing ImageAccessAccept resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
created_at (pulumi.Input[str]) – The date the image membership was created.
image_id (pulumi.Input[str]) – The proposed image ID.
member_id (pulumi.Input[str]) – The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
region (pulumi.Input[str]) – The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the
regionargument of the provider is used. Changing this creates a new membership.schema (pulumi.Input[str]) – The membership schema.
status (pulumi.Input[str]) – The membership proposal status. Can either be
accepted,rejectedorpending.updated_at (pulumi.Input[str]) – The date the image membership was last updated.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_openstack.images.get_image(member_status=None, most_recent=None, name=None, owner=None, properties=None, region=None, size_max=None, size_min=None, sort_direction=None, sort_key=None, tag=None, visibility=None, opts=None)¶Use this data source to get the ID of an available OpenStack image.
import pulumi import pulumi_openstack as openstack ubuntu = openstack.images.get_image(most_recent=True, name="Ubuntu 16.04", properties={ "key": "value", })
- Parameters
member_status (str) – The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
most_recent (bool) – If more than one result is returned, use the most recent image.
name (str) – The name of the image.
owner (str) – The owner (UUID) of the image.
properties (dict) – a map of key/value pairs to match an image with. All specified properties must be matched.
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.size_max (float) – The maximum size (in bytes) of the image to return.
size_min (float) – The minimum size (in bytes) of the image to return.
sort_direction (str) – Order the results in either
ascordesc.sort_key (str) – Sort images based on a certain key. Defaults to
name.tag (str) – Search for images with a specific tag.
visibility (str) – The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.