openstack_images_image_image_ids_v2
These instructions are a copy of the official OpenStack Terraform provider documentation in the Terraform Registry.
Use this data source to get a list of Openstack Image IDs matching the specified criteria.
Example Usage
data "openstack_images_image_ids_v2" "images" {
name_regex = "^Ubuntu 16\\.04.*-amd64"
sort = "updated_at"
properties = {
key = "value"
}
}
Argument Reference
-
region
— (Optional) The region in which to obtain the V2 Glance client.A Glance client is needed to create an Image that can be used witha compute instance. If omitted, theregion
argument of the provideris used. -
member_status
— (Optional) The status of the image. Must be one of "accepted", "pending", "rejected", or "all". -
name
— (Optional) The name of the image. Cannot be used simultaneouslywithname_regex
. -
name_regex
— (Optional) The regular expressian of the name of the image.Cannot be used simultaneously withname
. Unlike filtering byname
thename_regex
filtering does by client on the result of OpenStack searchquery. -
owner
— (Optional) The owner (UUID) of the image. -
properties
— (Optional) a map of key/value pairs to match an image with.All specified properties must be matched. Unlike other filtering options
byproperties
does by client on the result of OpenStack search query. -
size_min
— (Optional) The minimum size (in bytes) of the image to return. -
size_max
— (Optional) The maximum size (in bytes) of the image to return. -
sort
— (Optional) Sorts the response by one or more attribute and sortdirection combinations. You can also set multiple sort keys and directions.Default direction isdesc
. Use the comma (,) character to separatemultiple values. For example expressionsort = "name:asc,status"
sorts ascending by name and descending by status.sort
cannot be usedsimultaneously withsort_key
. If both are present in a configurationthen onlysort
will be used. -
sort_direction
— (Optional) Order the results in eitherasc
ordesc
.Can be applied only withsort_key
. Defaults toasc
-
sort_key
— (Optional) Sort images based on a certain key. Defaults toname
.sort_key
cannot be used simultaneously withsort
. If bothare present in a configuration then onlysort
will be used. -
tag
— (Optional) Search for images with a specific tag. -
tags
— (Optional) A list of tags required to be set on the image (all specified tags must be in the images tag list for it to be matched). -
visibility
— (Optional) The visibility of the image. Must be one of "public", "private", "community", or "shared". Defaults to "private".
Attributes Reference
ids
is set to the list of Openstack Image IDs.