CustomImageArgs

data class CustomImageArgs(val description: Output<String>? = null, val distribution: Output<String>? = null, val name: Output<String>? = null, val regions: Output<List<String>>? = null, val tags: Output<List<String>>? = null, val url: Output<String>? = null) : ConvertibleToJava<CustomImageArgs>

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());
}
}

Constructors

Link copied to clipboard
fun CustomImageArgs(description: Output<String>? = null, distribution: Output<String>? = null, name: Output<String>? = null, regions: Output<List<String>>? = null, tags: Output<List<String>>? = null, url: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): CustomImageArgs

Properties

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

An optional description for the image.

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

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

Link copied to clipboard
val name: Output<String>? = null

A name for the Custom Image.

Link copied to clipboard
val regions: Output<List<String>>? = null

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

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

A list of optional tags for the image.

Link copied to clipboard
val url: Output<String>? = null

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