CustomImage

class CustomImage : KotlinCustomResource

Provides a resource which can be used to create a custom image from a URL. The URL must point to an image in one of the following file formats:

  • Raw (.img) with an MBR or GPT partition table

  • qcow2

  • VHDX

  • VDI

  • VMDK The image may be compressed using gzip or bzip2. See the DigitalOcean Custom Image documentation for additional requirements.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.CustomImage;
import com.pulumi.digitalocean.CustomImageArgs;
import com.pulumi.digitalocean.Droplet;
import com.pulumi.digitalocean.DropletArgs;
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 flatcar = new CustomImage("flatcar", CustomImageArgs.builder()
.url("https://stable.release.flatcar-linux.net/amd64-usr/2605.7.0/flatcar_production_digitalocean_image.bin.bz2")
.regions("nyc3")
.build());
var example = new Droplet("example", DropletArgs.builder()
.image(flatcar.id())
.region("nyc3")
.size("s-1vcpu-1gb")
.sshKeys(12345)
.build());
}
}

Properties

Link copied to clipboard
val createdAt: Output<String>

A time value given in ISO8601 combined date and time format that represents when the image was created.

Link copied to clipboard
val description: Output<String>?

An optional description for the image.

Link copied to clipboard
val distribution: Output<String>?

An optional distribution name for the image. Valid values are documented here

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val imageId: Output<Int>

A unique number that can be used to identify and reference a specific image.

Link copied to clipboard
val minDiskSize: Output<Int>

The minimum disk size in GB required for a Droplet to use this image.

Link copied to clipboard
val name: Output<String>

A name for the Custom Image.

Link copied to clipboard
val public: Output<Boolean>

Indicates whether the image in question is public or not.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val regions: Output<List<String>>

A list of regions. (Currently only one is supported).

Link copied to clipboard
val sizeGigabytes: Output<Double>

The size of the image in gigabytes.

Link copied to clipboard
val slug: Output<String>

A uniquely identifying string for each image.

Link copied to clipboard
val status: Output<String>

A status string indicating the state of a custom image.

Link copied to clipboard
val tags: Output<List<String>>?

A list of optional tags for the image.

Link copied to clipboard
val type: Output<String>

Describes the kind of image.

Link copied to clipboard
val url: Output<String>

A URL from which the custom Linux virtual machine image may be retrieved.

Link copied to clipboard
val urn: Output<String>