nomad.DynamicHostVolume
Explore with Pulumi AI
layout: “nomad” page_title: “Nomad: nomad.DynamicHostVolume” sidebar_current: “docs-nomad-resource-dynamic-host-volume” description: |- Manages the lifecycle of creating and deleting dynamic host volumes.
Creates and registers a dynamic host volume in Nomad. Note that Nomad supports two workflows for dynamic host volumes: create and register. Both resources result in the same data source with the same outputs.
Warning: Destroying this resource will result in data loss. Use the [
prevent_destroy
][tf_docs_prevent_destroy] directive to avoid accidental deletions.
Example Usage
Creating a dynamic host volume:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = new nomad.DynamicHostVolume("example", {
name: "example",
namespace: "prod",
pluginId: "mkdir",
capacityMax: "12 GiB",
capacityMin: "1.0 GiB",
capabilities: [{
accessMode: "single-node-writer",
attachmentMode: "file-system",
}],
constraints: [{
attribute: `${attr.kernel.name}`,
value: "linux",
}],
parameters: {
some_key: "some_value",
},
});
import pulumi
import pulumi_nomad as nomad
example = nomad.DynamicHostVolume("example",
name="example",
namespace="prod",
plugin_id="mkdir",
capacity_max="12 GiB",
capacity_min="1.0 GiB",
capabilities=[{
"access_mode": "single-node-writer",
"attachment_mode": "file-system",
}],
constraints=[{
"attribute": "${attr.kernel.name}",
"value": "linux",
}],
parameters={
"some_key": "some_value",
})
package main
import (
"fmt"
"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.NewDynamicHostVolume(ctx, "example", &nomad.DynamicHostVolumeArgs{
Name: pulumi.String("example"),
Namespace: pulumi.String("prod"),
PluginId: pulumi.String("mkdir"),
CapacityMax: pulumi.String("12 GiB"),
CapacityMin: pulumi.String("1.0 GiB"),
Capabilities: nomad.DynamicHostVolumeCapabilityArray{
&nomad.DynamicHostVolumeCapabilityArgs{
AccessMode: pulumi.String("single-node-writer"),
AttachmentMode: pulumi.String("file-system"),
},
},
Constraints: nomad.DynamicHostVolumeConstraintArray{
&nomad.DynamicHostVolumeConstraintArgs{
Attribute: pulumi.Sprintf("${attr.kernel.name}"),
Value: pulumi.String("linux"),
},
},
Parameters: pulumi.StringMap{
"some_key": pulumi.String("some_value"),
},
})
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 = new Nomad.DynamicHostVolume("example", new()
{
Name = "example",
Namespace = "prod",
PluginId = "mkdir",
CapacityMax = "12 GiB",
CapacityMin = "1.0 GiB",
Capabilities = new[]
{
new Nomad.Inputs.DynamicHostVolumeCapabilityArgs
{
AccessMode = "single-node-writer",
AttachmentMode = "file-system",
},
},
Constraints = new[]
{
new Nomad.Inputs.DynamicHostVolumeConstraintArgs
{
Attribute = "${attr.kernel.name}",
Value = "linux",
},
},
Parameters =
{
{ "some_key", "some_value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.DynamicHostVolume;
import com.pulumi.nomad.DynamicHostVolumeArgs;
import com.pulumi.nomad.inputs.DynamicHostVolumeCapabilityArgs;
import com.pulumi.nomad.inputs.DynamicHostVolumeConstraintArgs;
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 example = new DynamicHostVolume("example", DynamicHostVolumeArgs.builder()
.name("example")
.namespace("prod")
.pluginId("mkdir")
.capacityMax("12 GiB")
.capacityMin("1.0 GiB")
.capabilities(DynamicHostVolumeCapabilityArgs.builder()
.accessMode("single-node-writer")
.attachmentMode("file-system")
.build())
.constraints(DynamicHostVolumeConstraintArgs.builder()
.attribute("${attr.kernel.name}")
.value("linux")
.build())
.parameters(Map.of("some_key", "some_value"))
.build());
}
}
resources:
example:
type: nomad:DynamicHostVolume
properties:
name: example
namespace: prod
pluginId: mkdir
capacityMax: 12 GiB
capacityMin: 1.0 GiB
capabilities:
- accessMode: single-node-writer
attachmentMode: file-system
constraints:
- attribute: $${attr.kernel.name}
value: linux
parameters:
some_key: some_value
Create DynamicHostVolume Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DynamicHostVolume(name: string, args: DynamicHostVolumeArgs, opts?: CustomResourceOptions);
@overload
def DynamicHostVolume(resource_name: str,
args: DynamicHostVolumeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DynamicHostVolume(resource_name: str,
opts: Optional[ResourceOptions] = None,
capabilities: Optional[Sequence[DynamicHostVolumeCapabilityArgs]] = None,
plugin_id: Optional[str] = None,
capacity_max: Optional[str] = None,
capacity_min: Optional[str] = None,
constraints: Optional[Sequence[DynamicHostVolumeConstraintArgs]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
node_id: Optional[str] = None,
node_pool: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None)
func NewDynamicHostVolume(ctx *Context, name string, args DynamicHostVolumeArgs, opts ...ResourceOption) (*DynamicHostVolume, error)
public DynamicHostVolume(string name, DynamicHostVolumeArgs args, CustomResourceOptions? opts = null)
public DynamicHostVolume(String name, DynamicHostVolumeArgs args)
public DynamicHostVolume(String name, DynamicHostVolumeArgs args, CustomResourceOptions options)
type: nomad:DynamicHostVolume
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DynamicHostVolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DynamicHostVolumeArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DynamicHostVolumeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DynamicHostVolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DynamicHostVolumeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dynamicHostVolumeResource = new Nomad.DynamicHostVolume("dynamicHostVolumeResource", new()
{
Capabilities = new[]
{
new Nomad.Inputs.DynamicHostVolumeCapabilityArgs
{
AccessMode = "string",
AttachmentMode = "string",
},
},
PluginId = "string",
CapacityMax = "string",
CapacityMin = "string",
Constraints = new[]
{
new Nomad.Inputs.DynamicHostVolumeConstraintArgs
{
Attribute = "string",
Operator = "string",
Value = "string",
},
},
Name = "string",
Namespace = "string",
NodeId = "string",
NodePool = "string",
Parameters =
{
{ "string", "string" },
},
});
example, err := nomad.NewDynamicHostVolume(ctx, "dynamicHostVolumeResource", &nomad.DynamicHostVolumeArgs{
Capabilities: nomad.DynamicHostVolumeCapabilityArray{
&nomad.DynamicHostVolumeCapabilityArgs{
AccessMode: pulumi.String("string"),
AttachmentMode: pulumi.String("string"),
},
},
PluginId: pulumi.String("string"),
CapacityMax: pulumi.String("string"),
CapacityMin: pulumi.String("string"),
Constraints: nomad.DynamicHostVolumeConstraintArray{
&nomad.DynamicHostVolumeConstraintArgs{
Attribute: pulumi.String("string"),
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
NodeId: pulumi.String("string"),
NodePool: pulumi.String("string"),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var dynamicHostVolumeResource = new DynamicHostVolume("dynamicHostVolumeResource", DynamicHostVolumeArgs.builder()
.capabilities(DynamicHostVolumeCapabilityArgs.builder()
.accessMode("string")
.attachmentMode("string")
.build())
.pluginId("string")
.capacityMax("string")
.capacityMin("string")
.constraints(DynamicHostVolumeConstraintArgs.builder()
.attribute("string")
.operator("string")
.value("string")
.build())
.name("string")
.namespace("string")
.nodeId("string")
.nodePool("string")
.parameters(Map.of("string", "string"))
.build());
dynamic_host_volume_resource = nomad.DynamicHostVolume("dynamicHostVolumeResource",
capabilities=[{
"access_mode": "string",
"attachment_mode": "string",
}],
plugin_id="string",
capacity_max="string",
capacity_min="string",
constraints=[{
"attribute": "string",
"operator": "string",
"value": "string",
}],
name="string",
namespace="string",
node_id="string",
node_pool="string",
parameters={
"string": "string",
})
const dynamicHostVolumeResource = new nomad.DynamicHostVolume("dynamicHostVolumeResource", {
capabilities: [{
accessMode: "string",
attachmentMode: "string",
}],
pluginId: "string",
capacityMax: "string",
capacityMin: "string",
constraints: [{
attribute: "string",
operator: "string",
value: "string",
}],
name: "string",
namespace: "string",
nodeId: "string",
nodePool: "string",
parameters: {
string: "string",
},
});
type: nomad:DynamicHostVolume
properties:
capabilities:
- accessMode: string
attachmentMode: string
capacityMax: string
capacityMin: string
constraints:
- attribute: string
operator: string
value: string
name: string
namespace: string
nodeId: string
nodePool: string
parameters:
string: string
pluginId: string
DynamicHostVolume Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DynamicHostVolume resource accepts the following input properties:
- Capabilities
List<Dynamic
Host Volume Capability> (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- Plugin
Id string - Plugin ID
- Capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Constraints
List<Dynamic
Host Volume Constraint> (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- Name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- Namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- Node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- Node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- Parameters Dictionary<string, string>
(map<string|string>: <optional>)
- 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.
- Capabilities
[]Dynamic
Host Volume Capability Args (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- Plugin
Id string - Plugin ID
- Capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Constraints
[]Dynamic
Host Volume Constraint Args (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- Name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- Namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- Node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- Node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- Parameters map[string]string
(map<string|string>: <optional>)
- 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.
- capabilities
List<Dynamic
Host Volume Capability> (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- plugin
Id String - Plugin ID
- capacity
Max String (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min String (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- constraints
List<Dynamic
Host Volume Constraint> (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- name String
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace String
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id String (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool String (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Map<String,String>
(map<string|string>: <optional>)
- 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.
- capabilities
Dynamic
Host Volume Capability[] (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- plugin
Id string - Plugin ID
- capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- constraints
Dynamic
Host Volume Constraint[] (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters {[key: string]: string}
(map<string|string>: <optional>)
- 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.
- capabilities
Sequence[Dynamic
Host Volume Capability Args] (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- plugin_
id str - Plugin ID
- capacity_
max str (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity_
min str (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- constraints
Sequence[Dynamic
Host Volume Constraint Args] (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- name str
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace str
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node_
id str (string: <optional>)
- A specific node where you would like the volume to be created.- node_
pool str (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Mapping[str, str]
(map<string|string>: <optional>)
- 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.
- capabilities List<Property Map>
(block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- plugin
Id String - Plugin ID
- capacity
Max String (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min String (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- constraints List<Property Map>
(block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- name String
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace String
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id String (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool String (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Map<String>
(map<string|string>: <optional>)
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the DynamicHostVolume resource produces the following output properties:
- Capacity string
- Provisioned capacity
- Capacity
Bytes int - Capacity
Max intBytes - Capacity
Min intBytes - Host
Path string - Host path
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- State
- Capacity string
- Provisioned capacity
- Capacity
Bytes int - Capacity
Max intBytes - Capacity
Min intBytes - Host
Path string - Host path
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- State
- capacity String
- Provisioned capacity
- capacity
Bytes Integer - capacity
Max IntegerBytes - capacity
Min IntegerBytes - host
Path String - Host path
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- State
- capacity string
- Provisioned capacity
- capacity
Bytes number - capacity
Max numberBytes - capacity
Min numberBytes - host
Path string - Host path
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- State
- capacity str
- Provisioned capacity
- capacity_
bytes int - capacity_
max_ intbytes - capacity_
min_ intbytes - host_
path str - Host path
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- State
- capacity String
- Provisioned capacity
- capacity
Bytes Number - capacity
Max NumberBytes - capacity
Min NumberBytes - host
Path String - Host path
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- State
Look up Existing DynamicHostVolume Resource
Get an existing DynamicHostVolume resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DynamicHostVolumeState, opts?: CustomResourceOptions): DynamicHostVolume
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
capabilities: Optional[Sequence[DynamicHostVolumeCapabilityArgs]] = None,
capacity: Optional[str] = None,
capacity_bytes: Optional[int] = None,
capacity_max: Optional[str] = None,
capacity_max_bytes: Optional[int] = None,
capacity_min: Optional[str] = None,
capacity_min_bytes: Optional[int] = None,
constraints: Optional[Sequence[DynamicHostVolumeConstraintArgs]] = None,
host_path: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
node_id: Optional[str] = None,
node_pool: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None,
plugin_id: Optional[str] = None,
state: Optional[str] = None) -> DynamicHostVolume
func GetDynamicHostVolume(ctx *Context, name string, id IDInput, state *DynamicHostVolumeState, opts ...ResourceOption) (*DynamicHostVolume, error)
public static DynamicHostVolume Get(string name, Input<string> id, DynamicHostVolumeState? state, CustomResourceOptions? opts = null)
public static DynamicHostVolume get(String name, Output<String> id, DynamicHostVolumeState state, CustomResourceOptions options)
resources: _: type: nomad:DynamicHostVolume get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Capabilities
List<Dynamic
Host Volume Capability> (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- Capacity string
- Provisioned capacity
- Capacity
Bytes int - Capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Max intBytes - Capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Min intBytes - Constraints
List<Dynamic
Host Volume Constraint> (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- Host
Path string - Host path
- Name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- Namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- Node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- Node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- Parameters Dictionary<string, string>
(map<string|string>: <optional>)
- 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 - Plugin ID
- State string
- State
- Capabilities
[]Dynamic
Host Volume Capability Args (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- Capacity string
- Provisioned capacity
- Capacity
Bytes int - Capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Max intBytes - Capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- Capacity
Min intBytes - Constraints
[]Dynamic
Host Volume Constraint Args (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- Host
Path string - Host path
- Name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- Namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- Node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- Node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- Parameters map[string]string
(map<string|string>: <optional>)
- 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 - Plugin ID
- State string
- State
- capabilities
List<Dynamic
Host Volume Capability> (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity String
- Provisioned capacity
- capacity
Bytes Integer - capacity
Max String (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Max IntegerBytes - capacity
Min String (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min IntegerBytes - constraints
List<Dynamic
Host Volume Constraint> (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- host
Path String - Host path
- name String
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace String
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id String (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool String (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Map<String,String>
(map<string|string>: <optional>)
- 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 - Plugin ID
- state String
- State
- capabilities
Dynamic
Host Volume Capability[] (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity string
- Provisioned capacity
- capacity
Bytes number - capacity
Max string (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Max numberBytes - capacity
Min string (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min numberBytes - constraints
Dynamic
Host Volume Constraint[] (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- host
Path string - Host path
- name string
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace string
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id string (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool string (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters {[key: string]: string}
(map<string|string>: <optional>)
- 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 - Plugin ID
- state string
- State
- capabilities
Sequence[Dynamic
Host Volume Capability Args] (block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity str
- Provisioned capacity
- capacity_
bytes int - capacity_
max str (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity_
max_ intbytes - capacity_
min str (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity_
min_ intbytes - constraints
Sequence[Dynamic
Host Volume Constraint Args] (block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- host_
path str - Host path
- name str
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace str
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node_
id str (string: <optional>)
- A specific node where you would like the volume to be created.- node_
pool str (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Mapping[str, str]
(map<string|string>: <optional>)
- 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 - Plugin ID
- state str
- State
- capabilities List<Property Map>
(block: <optional>)
- Option for validating the capability of a volume. Each capability block has the following attributes:- capacity String
- Provisioned capacity
- capacity
Bytes Number - capacity
Max String (string: <optional>)
- Option for requesting a maximum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Max NumberBytes - capacity
Min String (string: <optional>)
- Option for requesting a minimum capacity, in bytes. The capacity of a volume may be the physical size of a disk, or a quota, depending on the plugin. The specific size of the resulting volume is somewhere betweencapacity_min
andcapacity_max
; the exact behavior is up to the plugin. If you want to specify an exact size, setcapacity_min
andcapacity_max
to the same value. Accepts human-friendly suffixes such as"100GiB"
. Plugins that cannot restrict the size of volumes may ignore this field.- capacity
Min NumberBytes - constraints List<Property Map>
(block: <optional>)
- A restriction on the eligible nodes where a volume can be created, similar to the [constraint
][] block on a Nomad job specification.. You can provide multipleconstraint
blocks to add more constraints. Each constraint block has the following attributes.- host
Path String - Host path
- name String
(string: <required>)
- 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 must be unique per node. Names are visible to any user withnode:read
ACL, even across namespaces, so they should not be treated as sensitive values.- namespace String
(string: <optional>)
- The namespace of the volume. This field overrides the namespace provided by the-namespace
flag orNOMAD_NAMESPACE
environment variable. Defaults to"default"
if unset.- node
Id String (string: <optional>)
- A specific node where you would like the volume to be created.- node
Pool String (string: <optional>)
- A specific node pool where you would like the volume to be created. If you also providenode_id
, the node must be in the providednode_pool
.- parameters Map<String>
(map<string|string>: <optional>)
- 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 - Plugin ID
- state String
- State
Supporting Types
DynamicHostVolumeCapability, DynamicHostVolumeCapabilityArgs
- 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.
DynamicHostVolumeConstraint, DynamicHostVolumeConstraintArgs
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomad
Terraform Provider.