Volume

class Volume : KotlinCustomResource

Example Usage

Registering 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.Volume;
import com.pulumi.nomad.VolumeArgs;
import com.pulumi.nomad.inputs.VolumeCapabilityArgs;
import com.pulumi.nomad.inputs.VolumeMountOptionsArgs;
import com.pulumi.nomad.inputs.VolumeTopologyRequestArgs;
import com.pulumi.nomad.inputs.VolumeTopologyRequestRequiredArgs;
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 Volume("mysqlVolume", VolumeArgs.builder()
.type("csi")
.pluginId("aws-ebs0")
.volumeId("mysql_volume")
.externalId(module.hashistack().ebs_test_volume_id())
.capabilities(VolumeCapabilityArgs.builder()
.accessMode("single-node-writer")
.attachmentMode("file-system")
.build())
.mountOptions(VolumeMountOptionsArgs.builder()
.fsType("ext4")
.build())
.topologyRequest(VolumeTopologyRequestArgs.builder()
.required(VolumeTopologyRequestRequiredArgs.builder()
.topologies(
VolumeTopologyRequestRequiredTopologyArgs.builder()
.segments(Map.ofEntries(
Map.entry("rack", "R1"),
Map.entry("zone", "us-east-1a")
))
.build(),
VolumeTopologyRequestRequiredTopologyArgs.builder()
.segments(Map.of("rack", "R2"))
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(ebs.applyValue(getPluginResult -> getPluginResult))
.build());
}
}

Properties

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

(string: <optional>) - Deprecated. Use capability block instead. Defines whether a volume should be available concurrently. Possible values are:

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

(string: <otional>) - Deprecated. Use capability block instead. The storage API that will be used by the volume.

Link copied to clipboard

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

Link copied to clipboard
val context: Output<Map<String, String>>?

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

Link copied to clipboard

(boolean)

Link copied to clipboard

(integer)

Link copied to clipboard
val controllersHealthy: Output<Int>

(integer)

Link copied to clipboard

(boolean: false) - If true, the volume will be deregistered on destroy.

Link copied to clipboard
val externalId: Output<String>

(string: <required>) - The ID of the physical volume from the storage provider.

Link copied to clipboard
val id: Output<String>
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>

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

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

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

Link copied to clipboard
val nodesExpected: Output<Int>

(integer)

Link copied to clipboard
val nodesHealthy: Output<Int>

(integer)

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

(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>

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

Link copied to clipboard
val pluginProvider: Output<String>

(string)

Link copied to clipboard

(string)

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val schedulable: Output<Boolean>

(boolean)

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

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

Link copied to clipboard

(List of topologies)

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>?

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

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val volumeId: Output<String>

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