GetImage

Use this data source to get the ID of an available OpenStack image.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var ubuntu = Output.Create(OpenStack.Images.GetImage.InvokeAsync(new OpenStack.Images.GetImageArgs
        {
            MostRecent = true,
            Name = "Ubuntu 16.04",
            Properties = 
            {
                { "key", "value" },
            },
        }));
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

ubuntu = openstack.images.get_image(most_recent=True,
    name="Ubuntu 16.04",
    properties={
        "key": "value",
    })
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 }));

Using GetImage

function getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
function  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)
func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)

Note: This function is named LookupImage in the Go SDK.

public static class GetImage {
    public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

MemberStatus string

The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.

MostRecent bool

If more than one result is returned, use the most recent image.

Name string

The name of the image.

Owner string

The owner (UUID) of the image.

Properties Dictionary<string, object>

a map of key/value pairs to match an image with. All specified properties must be matched.

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 region argument of the provider is used.

SizeMax int

The maximum size (in bytes) of the image to return.

SizeMin int

The minimum size (in bytes) of the image to return.

SortDirection string

Order the results in either asc or desc.

SortKey string

Sort images based on a certain key. Defaults to name.

Tag string

Search for images with a specific tag.

Visibility string

The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.

MemberStatus string

The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.

MostRecent bool

If more than one result is returned, use the most recent image.

Name string

The name of the image.

Owner string

The owner (UUID) of the image.

Properties map[string]interface{}

a map of key/value pairs to match an image with. All specified properties must be matched.

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 region argument of the provider is used.

SizeMax int

The maximum size (in bytes) of the image to return.

SizeMin int

The minimum size (in bytes) of the image to return.

SortDirection string

Order the results in either asc or desc.

SortKey string

Sort images based on a certain key. Defaults to name.

Tag string

Search for images with a specific tag.

Visibility string

The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.

memberStatus string

The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.

mostRecent boolean

If more than one result is returned, use the most recent image.

name string

The name of the image.

owner string

The owner (UUID) of the image.

properties {[key: string]: any}

a map of key/value pairs to match an image with. All specified properties must be matched.

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 region argument of the provider is used.

sizeMax number

The maximum size (in bytes) of the image to return.

sizeMin number

The minimum size (in bytes) of the image to return.

sortDirection string

Order the results in either asc or desc.

sortKey string

Sort images based on a certain key. Defaults to name.

tag string

Search for images with a specific tag.

visibility string

The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.

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[str, Any]

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 region argument 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 asc or desc.

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”.

GetImage Result

The following output properties are available:

Checksum string

The checksum of the data associated with the image.

ContainerFormat string
CreatedAt string

The date the image was created. * container_format: The format of the image’s container. * disk_format: The format of the image’s disk.

DiskFormat string
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.

MinDiskGb int

The minimum amount of disk space required to use the image.

MinRamMb int

The minimum amount of ram required to use the image.

Protected bool

Whether or not the image is protected.

Region string
Schema string

The path to the JSON-schema that represent the image or image

SizeBytes int

The size of the image (in bytes).

Tags List<string>

The tags list of the image.

UpdatedAt string

The date the image was last updated.

MemberStatus string
MostRecent bool
Name string
Owner string
Properties Dictionary<string, object>

Freeform information about the image.

SizeMax int
SizeMin int
SortDirection string
SortKey string
Tag string
Visibility string
Checksum string

The checksum of the data associated with the image.

ContainerFormat string
CreatedAt string

The date the image was created. * container_format: The format of the image’s container. * disk_format: The format of the image’s disk.

DiskFormat string
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.

MinDiskGb int

The minimum amount of disk space required to use the image.

MinRamMb int

The minimum amount of ram required to use the image.

Protected bool

Whether or not the image is protected.

Region string
Schema string

The path to the JSON-schema that represent the image or image

SizeBytes int

The size of the image (in bytes).

Tags []string

The tags list of the image.

UpdatedAt string

The date the image was last updated.

MemberStatus string
MostRecent bool
Name string
Owner string
Properties map[string]interface{}

Freeform information about the image.

SizeMax int
SizeMin int
SortDirection string
SortKey string
Tag string
Visibility string
checksum string

The checksum of the data associated with the image.

containerFormat string
createdAt string

The date the image was created. * container_format: The format of the image’s container. * disk_format: The format of the image’s disk.

diskFormat string
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.

minDiskGb number

The minimum amount of disk space required to use the image.

minRamMb number

The minimum amount of ram required to use the image.

protected boolean

Whether or not the image is protected.

region string
schema string

The path to the JSON-schema that represent the image or image

sizeBytes number

The size of the image (in bytes).

tags string[]

The tags list of the image.

updatedAt string

The date the image was last updated.

memberStatus string
mostRecent boolean
name string
owner string
properties {[key: string]: any}

Freeform information about the image.

sizeMax number
sizeMin number
sortDirection string
sortKey string
tag string
visibility string
checksum str

The checksum of the data associated with the image.

container_format str
created_at str

The date the image was created. * container_format: The format of the image’s container. * disk_format: The format of the image’s disk.

disk_format str
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.

min_disk_gb float

The minimum amount of disk space required to use the image.

min_ram_mb float

The minimum amount of ram required to use the image.

protected bool

Whether or not the image is protected.

region str
schema str

The path to the JSON-schema that represent the image or image

size_bytes float

The size of the image (in bytes).

tags List[str]

The tags list of the image.

updated_at str

The date the image was last updated.

member_status str
most_recent bool
name str
owner str
properties Dict[str, Any]

Freeform information about the image.

size_max float
size_min float
sort_direction str
sort_key str
tag str
visibility str

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.