ExternalVolumeArgs

data class ExternalVolumeArgs(val capabilities: Output<List<ExternalVolumeCapabilityArgs>>? = null, val capacityMax: Output<String>? = null, val capacityMin: Output<String>? = null, val cloneId: Output<String>? = null, val mountOptions: Output<ExternalVolumeMountOptionsArgs>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val parameters: Output<Map<String, String>>? = null, val pluginId: Output<String>? = null, val secrets: Output<Map<String, String>>? = null, val snapshotId: Output<String>? = null, val topologyRequest: Output<ExternalVolumeTopologyRequestArgs>? = null, val type: Output<String>? = null, val volumeId: Output<String>? = null) : ConvertibleToJava<ExternalVolumeArgs>

Example Usage

Creating a volume:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
import com.pulumi.nomad.inputs.GetPluginArgs;
import com.pulumi.nomad.ExternalVolume;
import com.pulumi.nomad.ExternalVolumeArgs;
import com.pulumi.nomad.inputs.ExternalVolumeCapabilityArgs;
import com.pulumi.nomad.inputs.ExternalVolumeMountOptionsArgs;
import com.pulumi.nomad.inputs.ExternalVolumeTopologyRequestArgs;
import com.pulumi.nomad.inputs.ExternalVolumeTopologyRequestRequiredArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
final var ebs = NomadFunctions.getPlugin(GetPluginArgs.builder()
.pluginId("aws-ebs0")
.waitForHealthy(true)
.build());
var mysqlVolume = new ExternalVolume("mysqlVolume", ExternalVolumeArgs.builder()
.type("csi")
.pluginId("aws-ebs0")
.volumeId("mysql_volume")
.capacityMin("10GiB")
.capacityMax("20GiB")
.capabilities(ExternalVolumeCapabilityArgs.builder()
.accessMode("single-node-writer")
.attachmentMode("file-system")
.build())
.mountOptions(ExternalVolumeMountOptionsArgs.builder()
.fsType("ext4")
.build())
.topologyRequest(ExternalVolumeTopologyRequestArgs.builder()
.required(ExternalVolumeTopologyRequestRequiredArgs.builder()
.topologies(
ExternalVolumeTopologyRequestRequiredTopologyArgs.builder()
.segments(Map.ofEntries(
Map.entry("rack", "R1"),
Map.entry("zone", "us-east-1a")
))
.build(),
ExternalVolumeTopologyRequestRequiredTopologyArgs.builder()
.segments(Map.of("rack", "R2"))
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(ebs.applyValue(getPluginResult -> getPluginResult))
.build());
}
}

Constructors

Link copied to clipboard
constructor(capabilities: Output<List<ExternalVolumeCapabilityArgs>>? = null, capacityMax: Output<String>? = null, capacityMin: Output<String>? = null, cloneId: Output<String>? = null, mountOptions: Output<ExternalVolumeMountOptionsArgs>? = null, name: Output<String>? = null, namespace: Output<String>? = null, parameters: Output<Map<String, String>>? = null, pluginId: Output<String>? = null, secrets: Output<Map<String, String>>? = null, snapshotId: Output<String>? = null, topologyRequest: Output<ExternalVolumeTopologyRequestArgs>? = null, type: Output<String>? = null, volumeId: Output<String>? = null)

Properties

Link copied to clipboard

(``Capability``: <required>) - Options for validating the capability of a volume.

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

(string: <optional>) - Option to signal a maximum volume size. This may not be supported by all storage providers.

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

(string: <optional>) - Option to signal a minimum volume size. This may not be supported by all storage providers.

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

(string: <optional>) - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with snapshot_id.

Link copied to clipboard

(block: optional) Options for mounting block-device volumes without a pre-formatted file system.

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

(string: <required>) - The display name for the volume.

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

(string: "default") - The namespace in which to register the volume.

Link copied to clipboard
val parameters: Output<Map<String, String>>? = null

(map[string]string: optional) An optional key-value map of strings passed directly to the CSI plugin to configure the volume.

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

(string: <required>) - The ID of the Nomad plugin for registering this volume.

Link copied to clipboard
val secrets: Output<Map<String, String>>? = null

(map[string]string: optional) An optional key-value map of strings used as credentials for publishing and unpublishing volumes.

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

(string: <optional>) - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with clone_id.

Link copied to clipboard

(``TopologyRequest``: <optional>) - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.

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

(string: <required>) - The type of the volume. Currently, only csi is supported.

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

(string: <required>) - The unique ID of the volume.

Functions

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