Class Image
Manages a V2 Image resource within OpenStack Glance.
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" },
},
});
}
}
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.
Inherited Members
Namespace: Pulumi.OpenStack.Images
Assembly: Pulumi.OpenStack.dll
Syntax
public class Image : CustomResource
Constructors
View SourceImage(String, ImageArgs, CustomResourceOptions)
Create a Image resource with the given unique name, arguments, and options.
Declaration
public Image(string name, ImageArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ImageArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceChecksum
The checksum of the data associated with the image.
Declaration
public Output<string> Checksum { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ContainerFormat
The container format. Must be one of "ami", "ari", "aki", "bare", "ovf".
Declaration
public Output<string> ContainerFormat { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreatedAt
The date the image was created.
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DiskFormat
The disk format. Must be one of "ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vdi", "iso".
Declaration
public Output<string> DiskFormat { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
File
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
Declaration
public Output<string> File { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ImageCachePath
Declaration
public Output<string> ImageCachePath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ImageSourceUrl
This is the url of the raw image. If web_download
is not used, then the image will be downloaded in the image_cache_path before
being uploaded to Glance.
Conflicts with local_file_path.
Declaration
public Output<string> ImageSourceUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LocalFilePath
This is the filepath of the raw image file
that will be uploaded to Glance. Conflicts with image_source_url and
web_download.
Declaration
public Output<string> LocalFilePath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Metadata
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.
Declaration
public Output<ImmutableDictionary<string, object>> Metadata { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
MinDiskGb
Amount of disk space (in GB) required to boot image. Defaults to 0.
Declaration
public Output<int?> MinDiskGb { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
MinRamMb
Amount of ram (in MB) required to boot image. Defauts to 0.
Declaration
public Output<int?> MinRamMb { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Name
The name of the image.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Owner
The id of the openstack user who owns the image.
Declaration
public Output<string> Owner { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Properties
A map of key/value pairs to set freeform information about an image. See the "Notes" section for further information about properties.
Declaration
public Output<ImmutableDictionary<string, object>> Properties { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Protected
If true, image will not be deletable. Defaults to false.
Declaration
public Output<bool?> Protected { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Region
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. Changing this creates a new Image.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Schema
The path to the JSON-schema that represent the image or image
Declaration
public Output<string> Schema { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SizeBytes
The size in bytes of the data associated with the image.
Declaration
public Output<int> SizeBytes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Status
The status of the image. It can be "queued", "active" or "saving".
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
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.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
UpdateAt
(Deprecated - use updated_at instead)
Declaration
public Output<string> UpdateAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UpdatedAt
The date the image was last updated.
Declaration
public Output<string> UpdatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VerifyChecksum
If false, the checksum will not be verified
once the image is finished uploading. Conflicts with web_download.
Defaults to true when not using web_download.
Declaration
public Output<bool?> VerifyChecksum { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Visibility
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.
Declaration
public Output<string> Visibility { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
WebDownload
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.
Declaration
public Output<bool?> WebDownload { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, ImageState, CustomResourceOptions)
Get an existing Image resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Image Get(string name, Input<string> id, ImageState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ImageState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Image |