Package com.pulumi.openstack.images
Class Image
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.images.Image
-
public class Image extends com.pulumi.resources.CustomResourceManages a V2 Image resource within OpenStack Glance. > **Note:** All arguments including the source image URL password will be stored in the raw state as plain-text. Read more about sensitive data in state. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.images.Image; import com.pulumi.openstack.images.ImageArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var rancheros = new Image("rancheros", ImageArgs.builder() .containerFormat("bare") .diskFormat("qcow2") .imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img") .properties(Map.of("key", "value")) .build()); } } ``` ## 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` and `stores` properties are also automatically reconciled if the Image Service set it. ## Import Images can be imported using the `id`, e.g. ```sh $ pulumi import openstack:images/image:Image rancheros 89c60255-9bd6-460c-822a-e2b959ede9d2 ```
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>checksum()com.pulumi.core.Output<java.lang.String>containerFormat()com.pulumi.core.Output<java.lang.String>createdAt()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>decompress()com.pulumi.core.Output<java.lang.String>diskFormat()com.pulumi.core.Output<java.lang.String>file()static Imageget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ImageState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>hidden()com.pulumi.core.Output<java.util.Optional<java.lang.String>>imageCachePath()com.pulumi.core.Output<java.lang.String>imageId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>imageSourcePassword()com.pulumi.core.Output<java.util.Optional<java.lang.String>>imageSourceUrl()com.pulumi.core.Output<java.util.Optional<java.lang.String>>imageSourceUsername()com.pulumi.core.Output<java.util.Optional<java.lang.String>>localFilePath()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>metadata()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>minDiskGb()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>minRamMb()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>owner()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>properties()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>protected_()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>schema()com.pulumi.core.Output<java.lang.Integer>sizeBytes()com.pulumi.core.Output<java.lang.String>status()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>tags()com.pulumi.core.Output<java.lang.String>updateAt()com.pulumi.core.Output<java.lang.String>updatedAt()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>verifyChecksum()com.pulumi.core.Output<java.util.Optional<java.lang.String>>visibility()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>webDownload()
-
-
-
Constructor Detail
-
Image
public Image(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Image
public Image(java.lang.String name, ImageArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Image
public Image(java.lang.String name, ImageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
checksum
public com.pulumi.core.Output<java.lang.String> checksum()
- Returns:
- The checksum of the data associated with the image.
-
containerFormat
public com.pulumi.core.Output<java.lang.String> containerFormat()
- Returns:
- The container format. Must be one of "ami", "ari", "aki", "bare", "ovf".
-
createdAt
public com.pulumi.core.Output<java.lang.String> createdAt()
- Returns:
- The date the image was created.
-
decompress
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> decompress()
- Returns:
- If true, this provider will decompress downloaded image before uploading it to OpenStack. Decompression algorithm is chosen by checking "Content-Type" header, supported algorithm are: gzip, bzip2 and xz. Defaults to false. Changing this creates a new Image.
-
diskFormat
public com.pulumi.core.Output<java.lang.String> diskFormat()
- Returns:
- The disk format. Must be one of "ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vdi", "iso".
-
file
public com.pulumi.core.Output<java.lang.String> file()
- Returns:
- the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
-
hidden
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> hidden()
- Returns:
- If true, image will be hidden from public list. Defaults to false.
-
imageCachePath
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageCachePath()
-
imageId
public com.pulumi.core.Output<java.lang.String> imageId()
- Returns:
- Unique ID (valid UUID) of image to create. Changing this creates a new image.
-
imageSourcePassword
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageSourcePassword()
- Returns:
- The password of basic auth to download `image_source_url`.
-
imageSourceUrl
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageSourceUrl()
- Returns:
- 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`.
-
imageSourceUsername
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageSourceUsername()
- Returns:
- The username of basic auth to download `image_source_url`.
-
localFilePath
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> localFilePath()
- Returns:
- This is the filepath of the raw image file that will be uploaded to Glance. Conflicts with `image_source_url` and `web_download`.
-
metadata
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> metadata()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> minDiskGb()
- Returns:
- Amount of disk space (in GB) required to boot image. Defaults to 0.
-
minRamMb
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> minRamMb()
- Returns:
- Amount of ram (in MB) required to boot image. Defauts to 0.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the image.
-
owner
public com.pulumi.core.Output<java.lang.String> owner()
- Returns:
- The id of the openstack user who owns the image.
-
properties
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> properties()
- Returns:
- A map of key/value pairs to set freeform information about an image. See the "Notes" section for further information about properties.
-
protected_
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> protected_()
- Returns:
- If true, image will not be deletable. Defaults to false.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- 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.
-
schema
public com.pulumi.core.Output<java.lang.String> schema()
- Returns:
- The path to the JSON-schema that represent the image or image
-
sizeBytes
public com.pulumi.core.Output<java.lang.Integer> sizeBytes()
- Returns:
- The size in bytes of the data associated with the image.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the image. It can be "queued", "active" or "saving".
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()
- Returns:
- 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.
-
updateAt
public com.pulumi.core.Output<java.lang.String> updateAt()
- Returns:
- (**Deprecated** - use `updated_at` instead)
-
updatedAt
public com.pulumi.core.Output<java.lang.String> updatedAt()
- Returns:
- The date the image was last updated.
-
verifyChecksum
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> verifyChecksum()
- Returns:
- 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`.
-
visibility
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> visibility()
- Returns:
- 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.
-
webDownload
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> webDownload()
- Returns:
- 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.
-
get
public static Image get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ImageState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-