github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/openstack/d/images_image_v2.html.markdown (about) 1 --- 2 layout: "openstack" 3 page_title: "OpenStack: openstack_images_image_v2" 4 sidebar_current: "docs-openstack-datasource-images-image-v2" 5 description: |- 6 Get information on an OpenStack Image. 7 --- 8 9 # openstack\_images\_image\_v2 10 11 Use this data source to get the ID of an available OpenStack image. 12 13 ## Example Usage 14 15 ``` 16 data "openstack_images_image_v2" "ubuntu" { 17 name = "Ubuntu 16.04" 18 most_recent = true 19 } 20 ``` 21 22 ## Argument Reference 23 24 * `region` - (Required) The region in which to obtain the V2 Glance client. 25 A Glance client is needed to create an Image that can be used with 26 a compute instance. If omitted, the `OS_REGION_NAME` environment variable 27 is used. 28 29 * `most_recent` - (Optional) If more than one result is returned, use the most 30 recent image. 31 32 * `name` - (Optional) The name of the image. 33 34 * `owner` - (Optional) The owner (UUID) of the image. 35 36 * `size_min` - (Optional) The minimum size (in bytes) of the image to return. 37 38 * `size_max` - (Optional) The maximum size (in bytes) of the image to return. 39 40 * `sort_direction` - (Optional) Order the results in either `asc` or `desc`. 41 42 * `sort_key` - (Optional) Sort images based on a certain key. Defaults to `name`. 43 44 * `tag` - (Optional) Search for images with a specific tag. 45 46 * `visibility` - (Optional) The visibility of the image. Must be one of 47 "public", "private", "community", or "shared". Defaults to "private". 48 49 50 ## Attributes Reference 51 52 `id` is set to the ID of the found image. In addition, the following attributes 53 are exported: 54 55 * `checksum` - The checksum of the data associated with the image. 56 * `created_at` - The date the image was created. 57 * `container_format`: The format of the image's container. 58 * `disk_format`: The format of the image's disk. 59 * `file` - the trailing path after the glance endpoint that represent the 60 location of the image or the path to retrieve it. 61 * `metadata` - The metadata associated with the image. 62 Image metadata allow for meaningfully define the image properties 63 and tags. See http://docs.openstack.org/developer/glance/metadefs-concepts.html. 64 * `min_disk_gb`: The minimum amount of disk space required to use the image. 65 * `min_ram_mb`: The minimum amount of ram required to use the image. 66 * `protected` - Whether or not the image is protected. 67 * `schema` - The path to the JSON-schema that represent 68 the image or image 69 * `size_bytes` - The size of the image (in bytes). 70 * `tags` - See Argument Reference above. 71 * `update_at` - The date the image was last updated.