Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Get information on a dynamic host volume from Nomad.
Example Usage
Check for the existing of a host volume:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getDynamicHostVolume({
namespace: "prod",
id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
import pulumi
import pulumi_nomad as nomad
example = nomad.get_dynamic_host_volume(namespace="prod",
id="d688ff7a-d299-11ef-ae3c-6f2400953c18")
package main
import (
"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nomad.LookupDynamicHostVolume(ctx, &nomad.LookupDynamicHostVolumeArgs{
Namespace: pulumi.StringRef("prod"),
Id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var example = Nomad.GetDynamicHostVolume.Invoke(new()
{
Namespace = "prod",
Id = "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
});
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.GetDynamicHostVolumeArgs;
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 example = NomadFunctions.getDynamicHostVolume(GetDynamicHostVolumeArgs.builder()
.namespace("prod")
.id("d688ff7a-d299-11ef-ae3c-6f2400953c18")
.build());
}
}
variables:
example:
fn::invoke:
function: nomad:getDynamicHostVolume
arguments:
namespace: prod
id: d688ff7a-d299-11ef-ae3c-6f2400953c18
This will check for a dynamic host volume with the ID
d688ff7a-d299-11ef-ae3c-6f2400953c18.
Using getDynamicHostVolume
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDynamicHostVolume(args: GetDynamicHostVolumeArgs, opts?: InvokeOptions): Promise<GetDynamicHostVolumeResult>
function getDynamicHostVolumeOutput(args: GetDynamicHostVolumeOutputArgs, opts?: InvokeOptions): Output<GetDynamicHostVolumeResult>def get_dynamic_host_volume(id: Optional[str] = None,
namespace: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDynamicHostVolumeResult
def get_dynamic_host_volume_output(id: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDynamicHostVolumeResult]func LookupDynamicHostVolume(ctx *Context, args *LookupDynamicHostVolumeArgs, opts ...InvokeOption) (*LookupDynamicHostVolumeResult, error)
func LookupDynamicHostVolumeOutput(ctx *Context, args *LookupDynamicHostVolumeOutputArgs, opts ...InvokeOption) LookupDynamicHostVolumeResultOutput> Note: This function is named LookupDynamicHostVolume in the Go SDK.
public static class GetDynamicHostVolume
{
public static Task<GetDynamicHostVolumeResult> InvokeAsync(GetDynamicHostVolumeArgs args, InvokeOptions? opts = null)
public static Output<GetDynamicHostVolumeResult> Invoke(GetDynamicHostVolumeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDynamicHostVolumeResult> getDynamicHostVolume(GetDynamicHostVolumeArgs args, InvokeOptions options)
public static Output<GetDynamicHostVolumeResult> getDynamicHostVolume(GetDynamicHostVolumeArgs args, InvokeOptions options)
fn::invoke:
function: nomad:index/getDynamicHostVolume:getDynamicHostVolume
arguments:
# arguments dictionaryThe following arguments are supported:
getDynamicHostVolume Result
The following output properties are available:
- Capabilities
List<Get
Dynamic Host Volume Capability> (block)- Option for validating the capability of a volume. Each capability block has the following attributes:- Capacity string
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- Capacity
Bytes int (int)- The size of the volume, in bytes.- Capacity
Max string (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- Capacity
Max intBytes (string)- The requested maximum capacity of the volume, in bytes.- Capacity
Min string (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- Capacity
Min intBytes (string)- The requested minimum capacity of the volume, in bytes.- Constraints
List<Get
Dynamic Host Volume Constraint> (block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- Host
Path string (string)- The path on disk where the volume exists.- Id string
- Name string
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- Node
Id string (string)- A specific node where the volume is mounted.- Node
Pool string (string: <optional>)- The node pool of the node where the volume is mounted.- Parameters Dictionary<string, string>
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- Plugin
Id string (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- State string
- Namespace string
(string)- The namespace of the volume.
- Capabilities
[]Get
Dynamic Host Volume Capability (block)- Option for validating the capability of a volume. Each capability block has the following attributes:- Capacity string
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- Capacity
Bytes int (int)- The size of the volume, in bytes.- Capacity
Max string (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- Capacity
Max intBytes (string)- The requested maximum capacity of the volume, in bytes.- Capacity
Min string (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- Capacity
Min intBytes (string)- The requested minimum capacity of the volume, in bytes.- Constraints
[]Get
Dynamic Host Volume Constraint (block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- Host
Path string (string)- The path on disk where the volume exists.- Id string
- Name string
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- Node
Id string (string)- A specific node where the volume is mounted.- Node
Pool string (string: <optional>)- The node pool of the node where the volume is mounted.- Parameters map[string]string
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- Plugin
Id string (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- State string
- Namespace string
(string)- The namespace of the volume.
- capabilities
List<Get
Dynamic Host Volume Capability> (block)- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity String
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- capacity
Bytes Integer (int)- The size of the volume, in bytes.- capacity
Max String (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Max IntegerBytes (string)- The requested maximum capacity of the volume, in bytes.- capacity
Min String (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Min IntegerBytes (string)- The requested minimum capacity of the volume, in bytes.- constraints
List<Get
Dynamic Host Volume Constraint> (block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- host
Path String (string)- The path on disk where the volume exists.- id String
- name String
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- node
Id String (string)- A specific node where the volume is mounted.- node
Pool String (string: <optional>)- The node pool of the node where the volume is mounted.- parameters Map<String,String>
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- plugin
Id String (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- state String
- namespace String
(string)- The namespace of the volume.
- capabilities
Get
Dynamic Host Volume Capability[] (block)- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity string
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- capacity
Bytes number (int)- The size of the volume, in bytes.- capacity
Max string (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Max numberBytes (string)- The requested maximum capacity of the volume, in bytes.- capacity
Min string (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Min numberBytes (string)- The requested minimum capacity of the volume, in bytes.- constraints
Get
Dynamic Host Volume Constraint[] (block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- host
Path string (string)- The path on disk where the volume exists.- id string
- name string
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- node
Id string (string)- A specific node where the volume is mounted.- node
Pool string (string: <optional>)- The node pool of the node where the volume is mounted.- parameters {[key: string]: string}
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- plugin
Id string (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- state string
- namespace string
(string)- The namespace of the volume.
- capabilities
Sequence[Get
Dynamic Host Volume Capability] (block)- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity str
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- capacity_
bytes int (int)- The size of the volume, in bytes.- capacity_
max str (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity_
max_ intbytes (string)- The requested maximum capacity of the volume, in bytes.- capacity_
min str (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity_
min_ intbytes (string)- The requested minimum capacity of the volume, in bytes.- constraints
Sequence[Get
Dynamic Host Volume Constraint] (block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- host_
path str (string)- The path on disk where the volume exists.- id str
- name str
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- node_
id str (string)- A specific node where the volume is mounted.- node_
pool str (string: <optional>)- The node pool of the node where the volume is mounted.- parameters Mapping[str, str]
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- plugin_
id str (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- state str
- namespace str
(string)- The namespace of the volume.
- capabilities List<Property Map>
(block)- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity String
(string)- The size of the volume, in human-friendly format (ex. 10 GiB)- capacity
Bytes Number (int)- The size of the volume, in bytes.- capacity
Max String (string)- The requested maximum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Max NumberBytes (string)- The requested maximum capacity of the volume, in bytes.- capacity
Min String (string)- The requested minimum capacity of the volume, in human-friendly format (ex. 10 GiB).- capacity
Min NumberBytes (string)- The requested minimum capacity of the volume, in bytes.- constraints List<Property Map>
(block)- The restrictions used to place the volume on a node, similar to the [constraint][] block on a Nomad job specification. A volume may have multipleconstraintblocks. Each constraint block has the following attributes.- host
Path String (string)- The path on disk where the volume exists.- id String
- name String
(string)- The name of the volume, which is used as the [volume.source][volume_source] field in job specifications that claim this volume. Host volume names are be unique per node. Names are visible to any user withnode:readACL, even across namespaces, so they should not be treated as sensitive values.- node
Id String (string)- A specific node where the volume is mounted.- node
Pool String (string: <optional>)- The node pool of the node where the volume is mounted.- parameters Map<String>
(map<string|string>)- A key-value map of strings passed directly to the plugin to configure the volume. The details of these parameters are specific to the plugin.- plugin
Id String (string: <required>)- The ID of the [dynamic host volume plugin][dhv_plugin] that manages this volume.- state String
- namespace String
(string)- The namespace of the volume.
Supporting Types
GetDynamicHostVolumeCapability
- Access
Mode string (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- Attachment
Mode string (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
- Access
Mode string (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- Attachment
Mode string (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
- access
Mode String (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- attachment
Mode String (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
- access
Mode string (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- attachment
Mode string (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
- access_
mode str (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- attachment_
mode str (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
- access
Mode String (string)- How the volume can be mounted by allocations. Refer to the [access_mode][] documentation for details.- attachment
Mode String (string)- The storage API that will be used by the volume. Refer to the [attachment_mode][] documentation.
GetDynamicHostVolumeConstraint
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomadTerraform Provider.
Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
