HashiCorp Nomad

v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

Volume

Create a Volume Resource

new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
@overload
def Volume(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           access_mode: Optional[str] = None,
           attachment_mode: Optional[str] = None,
           capabilities: Optional[Sequence[VolumeCapabilityArgs]] = None,
           context: Optional[Mapping[str, str]] = None,
           deregister_on_destroy: Optional[bool] = None,
           external_id: Optional[str] = None,
           mount_options: Optional[VolumeMountOptionsArgs] = None,
           name: Optional[str] = None,
           namespace: Optional[str] = None,
           parameters: Optional[Mapping[str, str]] = None,
           plugin_id: Optional[str] = None,
           secrets: Optional[Mapping[str, str]] = None,
           type: Optional[str] = None,
           volume_id: Optional[str] = None)
@overload
def Volume(resource_name: str,
           args: VolumeArgs,
           opts: Optional[ResourceOptions] = None)
func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VolumeArgs
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 VolumeArgs
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 VolumeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Volume Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Volume resource accepts the following input properties:

ExternalId string
The ID of the physical volume from the storage provider.
PluginId string
The ID of the CSI plugin that manages this volume.
VolumeId string
The unique ID of the volume, how jobs will refer to the volume.
AccessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

AttachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

Capabilities List<VolumeCapabilityArgs>
Capabilities intended to be used in a job. At least one capability must be provided.
Context Dictionary<string, string>
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
DeregisterOnDestroy bool
If true, the volume will be deregistered on destroy.
MountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
Name string
The display name of the volume.
Namespace string
The namespace in which to create the volume.
Parameters Dictionary<string, string>
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
Secrets Dictionary<string, string>
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
Type string
The type of the volume. Currently, only ‘csi’ is supported.
ExternalId string
The ID of the physical volume from the storage provider.
PluginId string
The ID of the CSI plugin that manages this volume.
VolumeId string
The unique ID of the volume, how jobs will refer to the volume.
AccessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

AttachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

Capabilities []VolumeCapabilityArgs
Capabilities intended to be used in a job. At least one capability must be provided.
Context map[string]string
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
DeregisterOnDestroy bool
If true, the volume will be deregistered on destroy.
MountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
Name string
The display name of the volume.
Namespace string
The namespace in which to create the volume.
Parameters map[string]string
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
Secrets map[string]string
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
Type string
The type of the volume. Currently, only ‘csi’ is supported.
externalId string
The ID of the physical volume from the storage provider.
pluginId string
The ID of the CSI plugin that manages this volume.
volumeId string
The unique ID of the volume, how jobs will refer to the volume.
accessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

attachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

capabilities VolumeCapabilityArgs[]
Capabilities intended to be used in a job. At least one capability must be provided.
context {[key: string]: string}
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
deregisterOnDestroy boolean
If true, the volume will be deregistered on destroy.
mountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
name string
The display name of the volume.
namespace string
The namespace in which to create the volume.
parameters {[key: string]: string}
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
secrets {[key: string]: string}
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
type string
The type of the volume. Currently, only ‘csi’ is supported.
external_id str
The ID of the physical volume from the storage provider.
plugin_id str
The ID of the CSI plugin that manages this volume.
volume_id str
The unique ID of the volume, how jobs will refer to the volume.
access_mode str
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

attachment_mode str
The storage API that will be used by the volume.

Deprecated: use capability instead

capabilities Sequence[VolumeCapabilityArgs]
Capabilities intended to be used in a job. At least one capability must be provided.
context Mapping[str, str]
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
deregister_on_destroy bool
If true, the volume will be deregistered on destroy.
mount_options VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
name str
The display name of the volume.
namespace str
The namespace in which to create the volume.
parameters Mapping[str, str]
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
secrets Mapping[str, str]
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
type str
The type of the volume. Currently, only ‘csi’ is supported.

Outputs

All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:

ControllerRequired bool
ControllersExpected int
ControllersHealthy int
Id string
The provider-assigned unique ID for this managed resource.
NodesExpected int
NodesHealthy int
PluginProvider string
PluginProviderVersion string
Schedulable bool
ControllerRequired bool
ControllersExpected int
ControllersHealthy int
Id string
The provider-assigned unique ID for this managed resource.
NodesExpected int
NodesHealthy int
PluginProvider string
PluginProviderVersion string
Schedulable bool
controllerRequired boolean
controllersExpected number
controllersHealthy number
id string
The provider-assigned unique ID for this managed resource.
nodesExpected number
nodesHealthy number
pluginProvider string
pluginProviderVersion string
schedulable boolean
controller_required bool
controllers_expected int
controllers_healthy int
id str
The provider-assigned unique ID for this managed resource.
nodes_expected int
nodes_healthy int
plugin_provider str
plugin_provider_version str
schedulable bool

Look up an Existing Volume Resource

Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_mode: Optional[str] = None,
        attachment_mode: Optional[str] = None,
        capabilities: Optional[Sequence[VolumeCapabilityArgs]] = None,
        context: Optional[Mapping[str, str]] = None,
        controller_required: Optional[bool] = None,
        controllers_expected: Optional[int] = None,
        controllers_healthy: Optional[int] = None,
        deregister_on_destroy: Optional[bool] = None,
        external_id: Optional[str] = None,
        mount_options: Optional[VolumeMountOptionsArgs] = None,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        nodes_expected: Optional[int] = None,
        nodes_healthy: Optional[int] = None,
        parameters: Optional[Mapping[str, str]] = None,
        plugin_id: Optional[str] = None,
        plugin_provider: Optional[str] = None,
        plugin_provider_version: Optional[str] = None,
        schedulable: Optional[bool] = None,
        secrets: Optional[Mapping[str, str]] = None,
        type: Optional[str] = None,
        volume_id: Optional[str] = None) -> Volume
func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

AttachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

Capabilities List<VolumeCapabilityArgs>
Capabilities intended to be used in a job. At least one capability must be provided.
Context Dictionary<string, string>
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
ControllerRequired bool
ControllersExpected int
ControllersHealthy int
DeregisterOnDestroy bool
If true, the volume will be deregistered on destroy.
ExternalId string
The ID of the physical volume from the storage provider.
MountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
Name string
The display name of the volume.
Namespace string
The namespace in which to create the volume.
NodesExpected int
NodesHealthy int
Parameters Dictionary<string, string>
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
PluginId string
The ID of the CSI plugin that manages this volume.
PluginProvider string
PluginProviderVersion string
Schedulable bool
Secrets Dictionary<string, string>
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
Type string
The type of the volume. Currently, only ‘csi’ is supported.
VolumeId string
The unique ID of the volume, how jobs will refer to the volume.
AccessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

AttachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

Capabilities []VolumeCapabilityArgs
Capabilities intended to be used in a job. At least one capability must be provided.
Context map[string]string
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
ControllerRequired bool
ControllersExpected int
ControllersHealthy int
DeregisterOnDestroy bool
If true, the volume will be deregistered on destroy.
ExternalId string
The ID of the physical volume from the storage provider.
MountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
Name string
The display name of the volume.
Namespace string
The namespace in which to create the volume.
NodesExpected int
NodesHealthy int
Parameters map[string]string
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
PluginId string
The ID of the CSI plugin that manages this volume.
PluginProvider string
PluginProviderVersion string
Schedulable bool
Secrets map[string]string
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
Type string
The type of the volume. Currently, only ‘csi’ is supported.
VolumeId string
The unique ID of the volume, how jobs will refer to the volume.
accessMode string
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

attachmentMode string
The storage API that will be used by the volume.

Deprecated: use capability instead

capabilities VolumeCapabilityArgs[]
Capabilities intended to be used in a job. At least one capability must be provided.
context {[key: string]: string}
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
controllerRequired boolean
controllersExpected number
controllersHealthy number
deregisterOnDestroy boolean
If true, the volume will be deregistered on destroy.
externalId string
The ID of the physical volume from the storage provider.
mountOptions VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
name string
The display name of the volume.
namespace string
The namespace in which to create the volume.
nodesExpected number
nodesHealthy number
parameters {[key: string]: string}
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
pluginId string
The ID of the CSI plugin that manages this volume.
pluginProvider string
pluginProviderVersion string
schedulable boolean
secrets {[key: string]: string}
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
type string
The type of the volume. Currently, only ‘csi’ is supported.
volumeId string
The unique ID of the volume, how jobs will refer to the volume.
access_mode str
Defines whether a volume should be available concurrently.

Deprecated: use capability instead

attachment_mode str
The storage API that will be used by the volume.

Deprecated: use capability instead

capabilities Sequence[VolumeCapabilityArgs]
Capabilities intended to be used in a job. At least one capability must be provided.
context Mapping[str, str]
An optional key-value map of strings passed directly to the CSI plugin to validate the volume.
controller_required bool
controllers_expected int
controllers_healthy int
deregister_on_destroy bool
If true, the volume will be deregistered on destroy.
external_id str
The ID of the physical volume from the storage provider.
mount_options VolumeMountOptionsArgs
Options for mounting ‘block-device’ volumes without a pre-formatted file system.
name str
The display name of the volume.
namespace str
The namespace in which to create the volume.
nodes_expected int
nodes_healthy int
parameters Mapping[str, str]
An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
plugin_id str
The ID of the CSI plugin that manages this volume.
plugin_provider str
plugin_provider_version str
schedulable bool
secrets Mapping[str, str]
An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
type str
The type of the volume. Currently, only ‘csi’ is supported.
volume_id str
The unique ID of the volume, how jobs will refer to the volume.

Supporting Types

VolumeCapability

AccessMode string
AttachmentMode string
AccessMode string
AttachmentMode string
accessMode string
attachmentMode string

VolumeMountOptions

FsType string
MountFlags List<string>
FsType string
MountFlags []string
fsType string
mountFlags string[]
fs_type str
mount_flags Sequence[str]

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.