pulumi-nomad 2.5.0a1744783739__py3-none-any.whl → 2.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. pulumi_nomad/__init__.py +21 -2
  2. pulumi_nomad/_inputs.py +1151 -475
  3. pulumi_nomad/_utilities.py +1 -1
  4. pulumi_nomad/acl_auth_method.py +108 -108
  5. pulumi_nomad/acl_binding_rule.py +88 -88
  6. pulumi_nomad/acl_policy.py +71 -64
  7. pulumi_nomad/acl_role.py +40 -40
  8. pulumi_nomad/acl_token.py +127 -127
  9. pulumi_nomad/config/__init__.py +2 -2
  10. pulumi_nomad/config/__init__.pyi +2 -13
  11. pulumi_nomad/config/outputs.py +10 -11
  12. pulumi_nomad/config/vars.py +15 -30
  13. pulumi_nomad/csi_volume.py +298 -270
  14. pulumi_nomad/csi_volume_registration.py +278 -278
  15. pulumi_nomad/dynamic_host_volume.py +1005 -0
  16. pulumi_nomad/dynamic_host_volume_registration.py +740 -0
  17. pulumi_nomad/external_volume.py +257 -257
  18. pulumi_nomad/get_acl_policies.py +11 -12
  19. pulumi_nomad/get_acl_policy.py +14 -15
  20. pulumi_nomad/get_acl_role.py +13 -14
  21. pulumi_nomad/get_acl_roles.py +11 -12
  22. pulumi_nomad/get_acl_token.py +27 -28
  23. pulumi_nomad/get_acl_tokens.py +11 -12
  24. pulumi_nomad/get_allocations.py +23 -24
  25. pulumi_nomad/get_datacenters.py +18 -19
  26. pulumi_nomad/get_deployments.py +6 -7
  27. pulumi_nomad/get_dynamic_host_volume.py +352 -0
  28. pulumi_nomad/get_job.py +51 -52
  29. pulumi_nomad/get_job_parser.py +18 -19
  30. pulumi_nomad/get_jwks.py +7 -8
  31. pulumi_nomad/get_namespace.py +18 -19
  32. pulumi_nomad/get_namespaces.py +22 -17
  33. pulumi_nomad/get_node_pool.py +15 -16
  34. pulumi_nomad/get_node_pools.py +17 -18
  35. pulumi_nomad/get_plugin.py +37 -38
  36. pulumi_nomad/get_plugins.py +10 -11
  37. pulumi_nomad/get_regions.py +16 -11
  38. pulumi_nomad/get_scaling_policies.py +17 -18
  39. pulumi_nomad/get_scaling_policy.py +20 -21
  40. pulumi_nomad/get_scheduler_policy.py +10 -11
  41. pulumi_nomad/get_variable.py +18 -19
  42. pulumi_nomad/get_volumes.py +30 -31
  43. pulumi_nomad/job.py +247 -357
  44. pulumi_nomad/namespace.py +77 -77
  45. pulumi_nomad/node_pool.py +57 -57
  46. pulumi_nomad/outputs.py +1212 -635
  47. pulumi_nomad/provider.py +141 -180
  48. pulumi_nomad/pulumi-plugin.json +1 -1
  49. pulumi_nomad/quote_specification.py +40 -40
  50. pulumi_nomad/scheduler_config.py +54 -54
  51. pulumi_nomad/sentinel_policy.py +88 -88
  52. pulumi_nomad/variable.py +54 -54
  53. pulumi_nomad/volume.py +274 -274
  54. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/METADATA +3 -3
  55. pulumi_nomad-2.5.1.dist-info/RECORD +58 -0
  56. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/WHEEL +1 -1
  57. pulumi_nomad-2.5.0a1744783739.dist-info/RECORD +0 -55
  58. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1005 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['DynamicHostVolumeArgs', 'DynamicHostVolume']
20
+
21
+ @pulumi.input_type
22
+ class DynamicHostVolumeArgs:
23
+ def __init__(__self__, *,
24
+ capabilities: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]],
25
+ plugin_id: pulumi.Input[_builtins.str],
26
+ capacity_max: Optional[pulumi.Input[_builtins.str]] = None,
27
+ capacity_min: Optional[pulumi.Input[_builtins.str]] = None,
28
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]] = None,
29
+ name: Optional[pulumi.Input[_builtins.str]] = None,
30
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
31
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
32
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
33
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None):
34
+ """
35
+ The set of arguments for constructing a DynamicHostVolume resource.
36
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
37
+ volume. Each capability block has the following attributes:
38
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
39
+ :param pulumi.Input[_builtins.str] capacity_max: `(string: <optional>)` - Option for requesting a maximum
40
+ capacity, in bytes. The capacity of a volume may be the physical size of a
41
+ disk, or a quota, depending on the plugin. The specific size of the resulting
42
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
43
+ behavior is up to the plugin. If you want to specify an exact size, set
44
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
45
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
46
+ may ignore this field.
47
+ :param pulumi.Input[_builtins.str] capacity_min: `(string: <optional>)` - Option for requesting a minimum
48
+ capacity, in bytes. The capacity of a volume may be the physical size of a
49
+ disk, or a quota, depending on the plugin. The specific size of the resulting
50
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
51
+ behavior is up to the plugin. If you want to specify an exact size, set
52
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
53
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
54
+ may ignore this field.
55
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]] constraints: `(block: <optional>)` - A restriction on the eligible nodes where
56
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
57
+ specification.. You can provide multiple `constraint` blocks to add more
58
+ constraints. Each constraint block has the following attributes.
59
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
60
+ [`volume.source`][volume_source] field in job specifications that claim this
61
+ volume. Host volume names must be unique per node. Names are visible to any
62
+ user with `node:read` ACL, even across namespaces, so they should not be
63
+ treated as sensitive values.
64
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
65
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
66
+ environment variable. Defaults to `"default"` if unset.
67
+ :param pulumi.Input[_builtins.str] node_id: `(string: <optional>)` - A specific node where you would like the
68
+ volume to be created.
69
+ :param pulumi.Input[_builtins.str] node_pool: `(string: <optional>)` - A specific node pool where you would like
70
+ the volume to be created. If you also provide `node_id`, the node must be in the
71
+ provided `node_pool`.
72
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
73
+ passed directly to the plugin to configure the volume. The details of these
74
+ parameters are specific to the plugin.
75
+ """
76
+ pulumi.set(__self__, "capabilities", capabilities)
77
+ pulumi.set(__self__, "plugin_id", plugin_id)
78
+ if capacity_max is not None:
79
+ pulumi.set(__self__, "capacity_max", capacity_max)
80
+ if capacity_min is not None:
81
+ pulumi.set(__self__, "capacity_min", capacity_min)
82
+ if constraints is not None:
83
+ pulumi.set(__self__, "constraints", constraints)
84
+ if name is not None:
85
+ pulumi.set(__self__, "name", name)
86
+ if namespace is not None:
87
+ pulumi.set(__self__, "namespace", namespace)
88
+ if node_id is not None:
89
+ pulumi.set(__self__, "node_id", node_id)
90
+ if node_pool is not None:
91
+ pulumi.set(__self__, "node_pool", node_pool)
92
+ if parameters is not None:
93
+ pulumi.set(__self__, "parameters", parameters)
94
+
95
+ @_builtins.property
96
+ @pulumi.getter
97
+ def capabilities(self) -> pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]]:
98
+ """
99
+ `(block: <optional>)` - Option for validating the capability of a
100
+ volume. Each capability block has the following attributes:
101
+ """
102
+ return pulumi.get(self, "capabilities")
103
+
104
+ @capabilities.setter
105
+ def capabilities(self, value: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]]):
106
+ pulumi.set(self, "capabilities", value)
107
+
108
+ @_builtins.property
109
+ @pulumi.getter(name="pluginId")
110
+ def plugin_id(self) -> pulumi.Input[_builtins.str]:
111
+ """
112
+ Plugin ID
113
+ """
114
+ return pulumi.get(self, "plugin_id")
115
+
116
+ @plugin_id.setter
117
+ def plugin_id(self, value: pulumi.Input[_builtins.str]):
118
+ pulumi.set(self, "plugin_id", value)
119
+
120
+ @_builtins.property
121
+ @pulumi.getter(name="capacityMax")
122
+ def capacity_max(self) -> Optional[pulumi.Input[_builtins.str]]:
123
+ """
124
+ `(string: <optional>)` - Option for requesting a maximum
125
+ capacity, in bytes. The capacity of a volume may be the physical size of a
126
+ disk, or a quota, depending on the plugin. The specific size of the resulting
127
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
128
+ behavior is up to the plugin. If you want to specify an exact size, set
129
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
130
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
131
+ may ignore this field.
132
+ """
133
+ return pulumi.get(self, "capacity_max")
134
+
135
+ @capacity_max.setter
136
+ def capacity_max(self, value: Optional[pulumi.Input[_builtins.str]]):
137
+ pulumi.set(self, "capacity_max", value)
138
+
139
+ @_builtins.property
140
+ @pulumi.getter(name="capacityMin")
141
+ def capacity_min(self) -> Optional[pulumi.Input[_builtins.str]]:
142
+ """
143
+ `(string: <optional>)` - Option for requesting a minimum
144
+ capacity, in bytes. The capacity of a volume may be the physical size of a
145
+ disk, or a quota, depending on the plugin. The specific size of the resulting
146
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
147
+ behavior is up to the plugin. If you want to specify an exact size, set
148
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
149
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
150
+ may ignore this field.
151
+ """
152
+ return pulumi.get(self, "capacity_min")
153
+
154
+ @capacity_min.setter
155
+ def capacity_min(self, value: Optional[pulumi.Input[_builtins.str]]):
156
+ pulumi.set(self, "capacity_min", value)
157
+
158
+ @_builtins.property
159
+ @pulumi.getter
160
+ def constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]]:
161
+ """
162
+ `(block: <optional>)` - A restriction on the eligible nodes where
163
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
164
+ specification.. You can provide multiple `constraint` blocks to add more
165
+ constraints. Each constraint block has the following attributes.
166
+ """
167
+ return pulumi.get(self, "constraints")
168
+
169
+ @constraints.setter
170
+ def constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]]):
171
+ pulumi.set(self, "constraints", value)
172
+
173
+ @_builtins.property
174
+ @pulumi.getter
175
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
176
+ """
177
+ `(string: <required>)` - The name of the volume, which is used as the
178
+ [`volume.source`][volume_source] field in job specifications that claim this
179
+ volume. Host volume names must be unique per node. Names are visible to any
180
+ user with `node:read` ACL, even across namespaces, so they should not be
181
+ treated as sensitive values.
182
+ """
183
+ return pulumi.get(self, "name")
184
+
185
+ @name.setter
186
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
187
+ pulumi.set(self, "name", value)
188
+
189
+ @_builtins.property
190
+ @pulumi.getter
191
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
192
+ """
193
+ `(string: <optional>)` - The namespace of the volume. This field
194
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
195
+ environment variable. Defaults to `"default"` if unset.
196
+ """
197
+ return pulumi.get(self, "namespace")
198
+
199
+ @namespace.setter
200
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
201
+ pulumi.set(self, "namespace", value)
202
+
203
+ @_builtins.property
204
+ @pulumi.getter(name="nodeId")
205
+ def node_id(self) -> Optional[pulumi.Input[_builtins.str]]:
206
+ """
207
+ `(string: <optional>)` - A specific node where you would like the
208
+ volume to be created.
209
+ """
210
+ return pulumi.get(self, "node_id")
211
+
212
+ @node_id.setter
213
+ def node_id(self, value: Optional[pulumi.Input[_builtins.str]]):
214
+ pulumi.set(self, "node_id", value)
215
+
216
+ @_builtins.property
217
+ @pulumi.getter(name="nodePool")
218
+ def node_pool(self) -> Optional[pulumi.Input[_builtins.str]]:
219
+ """
220
+ `(string: <optional>)` - A specific node pool where you would like
221
+ the volume to be created. If you also provide `node_id`, the node must be in the
222
+ provided `node_pool`.
223
+ """
224
+ return pulumi.get(self, "node_pool")
225
+
226
+ @node_pool.setter
227
+ def node_pool(self, value: Optional[pulumi.Input[_builtins.str]]):
228
+ pulumi.set(self, "node_pool", value)
229
+
230
+ @_builtins.property
231
+ @pulumi.getter
232
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
233
+ """
234
+ `(map<string|string>: <optional>)` - A key-value map of strings
235
+ passed directly to the plugin to configure the volume. The details of these
236
+ parameters are specific to the plugin.
237
+ """
238
+ return pulumi.get(self, "parameters")
239
+
240
+ @parameters.setter
241
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
242
+ pulumi.set(self, "parameters", value)
243
+
244
+
245
+ @pulumi.input_type
246
+ class _DynamicHostVolumeState:
247
+ def __init__(__self__, *,
248
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]]] = None,
249
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
250
+ capacity_bytes: Optional[pulumi.Input[_builtins.int]] = None,
251
+ capacity_max: Optional[pulumi.Input[_builtins.str]] = None,
252
+ capacity_max_bytes: Optional[pulumi.Input[_builtins.int]] = None,
253
+ capacity_min: Optional[pulumi.Input[_builtins.str]] = None,
254
+ capacity_min_bytes: Optional[pulumi.Input[_builtins.int]] = None,
255
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]] = None,
256
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
257
+ name: Optional[pulumi.Input[_builtins.str]] = None,
258
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
259
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
260
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
261
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
262
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
263
+ state: Optional[pulumi.Input[_builtins.str]] = None):
264
+ """
265
+ Input properties used for looking up and filtering DynamicHostVolume resources.
266
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
267
+ volume. Each capability block has the following attributes:
268
+ :param pulumi.Input[_builtins.str] capacity: Provisioned capacity
269
+ :param pulumi.Input[_builtins.str] capacity_max: `(string: <optional>)` - Option for requesting a maximum
270
+ capacity, in bytes. The capacity of a volume may be the physical size of a
271
+ disk, or a quota, depending on the plugin. The specific size of the resulting
272
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
273
+ behavior is up to the plugin. If you want to specify an exact size, set
274
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
275
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
276
+ may ignore this field.
277
+ :param pulumi.Input[_builtins.str] capacity_min: `(string: <optional>)` - Option for requesting a minimum
278
+ capacity, in bytes. The capacity of a volume may be the physical size of a
279
+ disk, or a quota, depending on the plugin. The specific size of the resulting
280
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
281
+ behavior is up to the plugin. If you want to specify an exact size, set
282
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
283
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
284
+ may ignore this field.
285
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]] constraints: `(block: <optional>)` - A restriction on the eligible nodes where
286
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
287
+ specification.. You can provide multiple `constraint` blocks to add more
288
+ constraints. Each constraint block has the following attributes.
289
+ :param pulumi.Input[_builtins.str] host_path: Host path
290
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
291
+ [`volume.source`][volume_source] field in job specifications that claim this
292
+ volume. Host volume names must be unique per node. Names are visible to any
293
+ user with `node:read` ACL, even across namespaces, so they should not be
294
+ treated as sensitive values.
295
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
296
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
297
+ environment variable. Defaults to `"default"` if unset.
298
+ :param pulumi.Input[_builtins.str] node_id: `(string: <optional>)` - A specific node where you would like the
299
+ volume to be created.
300
+ :param pulumi.Input[_builtins.str] node_pool: `(string: <optional>)` - A specific node pool where you would like
301
+ the volume to be created. If you also provide `node_id`, the node must be in the
302
+ provided `node_pool`.
303
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
304
+ passed directly to the plugin to configure the volume. The details of these
305
+ parameters are specific to the plugin.
306
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
307
+ :param pulumi.Input[_builtins.str] state: State
308
+ """
309
+ if capabilities is not None:
310
+ pulumi.set(__self__, "capabilities", capabilities)
311
+ if capacity is not None:
312
+ pulumi.set(__self__, "capacity", capacity)
313
+ if capacity_bytes is not None:
314
+ pulumi.set(__self__, "capacity_bytes", capacity_bytes)
315
+ if capacity_max is not None:
316
+ pulumi.set(__self__, "capacity_max", capacity_max)
317
+ if capacity_max_bytes is not None:
318
+ pulumi.set(__self__, "capacity_max_bytes", capacity_max_bytes)
319
+ if capacity_min is not None:
320
+ pulumi.set(__self__, "capacity_min", capacity_min)
321
+ if capacity_min_bytes is not None:
322
+ pulumi.set(__self__, "capacity_min_bytes", capacity_min_bytes)
323
+ if constraints is not None:
324
+ pulumi.set(__self__, "constraints", constraints)
325
+ if host_path is not None:
326
+ pulumi.set(__self__, "host_path", host_path)
327
+ if name is not None:
328
+ pulumi.set(__self__, "name", name)
329
+ if namespace is not None:
330
+ pulumi.set(__self__, "namespace", namespace)
331
+ if node_id is not None:
332
+ pulumi.set(__self__, "node_id", node_id)
333
+ if node_pool is not None:
334
+ pulumi.set(__self__, "node_pool", node_pool)
335
+ if parameters is not None:
336
+ pulumi.set(__self__, "parameters", parameters)
337
+ if plugin_id is not None:
338
+ pulumi.set(__self__, "plugin_id", plugin_id)
339
+ if state is not None:
340
+ pulumi.set(__self__, "state", state)
341
+
342
+ @_builtins.property
343
+ @pulumi.getter
344
+ def capabilities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]]]:
345
+ """
346
+ `(block: <optional>)` - Option for validating the capability of a
347
+ volume. Each capability block has the following attributes:
348
+ """
349
+ return pulumi.get(self, "capabilities")
350
+
351
+ @capabilities.setter
352
+ def capabilities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeCapabilityArgs']]]]):
353
+ pulumi.set(self, "capabilities", value)
354
+
355
+ @_builtins.property
356
+ @pulumi.getter
357
+ def capacity(self) -> Optional[pulumi.Input[_builtins.str]]:
358
+ """
359
+ Provisioned capacity
360
+ """
361
+ return pulumi.get(self, "capacity")
362
+
363
+ @capacity.setter
364
+ def capacity(self, value: Optional[pulumi.Input[_builtins.str]]):
365
+ pulumi.set(self, "capacity", value)
366
+
367
+ @_builtins.property
368
+ @pulumi.getter(name="capacityBytes")
369
+ def capacity_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
370
+ return pulumi.get(self, "capacity_bytes")
371
+
372
+ @capacity_bytes.setter
373
+ def capacity_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
374
+ pulumi.set(self, "capacity_bytes", value)
375
+
376
+ @_builtins.property
377
+ @pulumi.getter(name="capacityMax")
378
+ def capacity_max(self) -> Optional[pulumi.Input[_builtins.str]]:
379
+ """
380
+ `(string: <optional>)` - Option for requesting a maximum
381
+ capacity, in bytes. The capacity of a volume may be the physical size of a
382
+ disk, or a quota, depending on the plugin. The specific size of the resulting
383
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
384
+ behavior is up to the plugin. If you want to specify an exact size, set
385
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
386
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
387
+ may ignore this field.
388
+ """
389
+ return pulumi.get(self, "capacity_max")
390
+
391
+ @capacity_max.setter
392
+ def capacity_max(self, value: Optional[pulumi.Input[_builtins.str]]):
393
+ pulumi.set(self, "capacity_max", value)
394
+
395
+ @_builtins.property
396
+ @pulumi.getter(name="capacityMaxBytes")
397
+ def capacity_max_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
398
+ return pulumi.get(self, "capacity_max_bytes")
399
+
400
+ @capacity_max_bytes.setter
401
+ def capacity_max_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
402
+ pulumi.set(self, "capacity_max_bytes", value)
403
+
404
+ @_builtins.property
405
+ @pulumi.getter(name="capacityMin")
406
+ def capacity_min(self) -> Optional[pulumi.Input[_builtins.str]]:
407
+ """
408
+ `(string: <optional>)` - Option for requesting a minimum
409
+ capacity, in bytes. The capacity of a volume may be the physical size of a
410
+ disk, or a quota, depending on the plugin. The specific size of the resulting
411
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
412
+ behavior is up to the plugin. If you want to specify an exact size, set
413
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
414
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
415
+ may ignore this field.
416
+ """
417
+ return pulumi.get(self, "capacity_min")
418
+
419
+ @capacity_min.setter
420
+ def capacity_min(self, value: Optional[pulumi.Input[_builtins.str]]):
421
+ pulumi.set(self, "capacity_min", value)
422
+
423
+ @_builtins.property
424
+ @pulumi.getter(name="capacityMinBytes")
425
+ def capacity_min_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
426
+ return pulumi.get(self, "capacity_min_bytes")
427
+
428
+ @capacity_min_bytes.setter
429
+ def capacity_min_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
430
+ pulumi.set(self, "capacity_min_bytes", value)
431
+
432
+ @_builtins.property
433
+ @pulumi.getter
434
+ def constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]]:
435
+ """
436
+ `(block: <optional>)` - A restriction on the eligible nodes where
437
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
438
+ specification.. You can provide multiple `constraint` blocks to add more
439
+ constraints. Each constraint block has the following attributes.
440
+ """
441
+ return pulumi.get(self, "constraints")
442
+
443
+ @constraints.setter
444
+ def constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeConstraintArgs']]]]):
445
+ pulumi.set(self, "constraints", value)
446
+
447
+ @_builtins.property
448
+ @pulumi.getter(name="hostPath")
449
+ def host_path(self) -> Optional[pulumi.Input[_builtins.str]]:
450
+ """
451
+ Host path
452
+ """
453
+ return pulumi.get(self, "host_path")
454
+
455
+ @host_path.setter
456
+ def host_path(self, value: Optional[pulumi.Input[_builtins.str]]):
457
+ pulumi.set(self, "host_path", value)
458
+
459
+ @_builtins.property
460
+ @pulumi.getter
461
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
462
+ """
463
+ `(string: <required>)` - The name of the volume, which is used as the
464
+ [`volume.source`][volume_source] field in job specifications that claim this
465
+ volume. Host volume names must be unique per node. Names are visible to any
466
+ user with `node:read` ACL, even across namespaces, so they should not be
467
+ treated as sensitive values.
468
+ """
469
+ return pulumi.get(self, "name")
470
+
471
+ @name.setter
472
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
473
+ pulumi.set(self, "name", value)
474
+
475
+ @_builtins.property
476
+ @pulumi.getter
477
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
478
+ """
479
+ `(string: <optional>)` - The namespace of the volume. This field
480
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
481
+ environment variable. Defaults to `"default"` if unset.
482
+ """
483
+ return pulumi.get(self, "namespace")
484
+
485
+ @namespace.setter
486
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
487
+ pulumi.set(self, "namespace", value)
488
+
489
+ @_builtins.property
490
+ @pulumi.getter(name="nodeId")
491
+ def node_id(self) -> Optional[pulumi.Input[_builtins.str]]:
492
+ """
493
+ `(string: <optional>)` - A specific node where you would like the
494
+ volume to be created.
495
+ """
496
+ return pulumi.get(self, "node_id")
497
+
498
+ @node_id.setter
499
+ def node_id(self, value: Optional[pulumi.Input[_builtins.str]]):
500
+ pulumi.set(self, "node_id", value)
501
+
502
+ @_builtins.property
503
+ @pulumi.getter(name="nodePool")
504
+ def node_pool(self) -> Optional[pulumi.Input[_builtins.str]]:
505
+ """
506
+ `(string: <optional>)` - A specific node pool where you would like
507
+ the volume to be created. If you also provide `node_id`, the node must be in the
508
+ provided `node_pool`.
509
+ """
510
+ return pulumi.get(self, "node_pool")
511
+
512
+ @node_pool.setter
513
+ def node_pool(self, value: Optional[pulumi.Input[_builtins.str]]):
514
+ pulumi.set(self, "node_pool", value)
515
+
516
+ @_builtins.property
517
+ @pulumi.getter
518
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
519
+ """
520
+ `(map<string|string>: <optional>)` - A key-value map of strings
521
+ passed directly to the plugin to configure the volume. The details of these
522
+ parameters are specific to the plugin.
523
+ """
524
+ return pulumi.get(self, "parameters")
525
+
526
+ @parameters.setter
527
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
528
+ pulumi.set(self, "parameters", value)
529
+
530
+ @_builtins.property
531
+ @pulumi.getter(name="pluginId")
532
+ def plugin_id(self) -> Optional[pulumi.Input[_builtins.str]]:
533
+ """
534
+ Plugin ID
535
+ """
536
+ return pulumi.get(self, "plugin_id")
537
+
538
+ @plugin_id.setter
539
+ def plugin_id(self, value: Optional[pulumi.Input[_builtins.str]]):
540
+ pulumi.set(self, "plugin_id", value)
541
+
542
+ @_builtins.property
543
+ @pulumi.getter
544
+ def state(self) -> Optional[pulumi.Input[_builtins.str]]:
545
+ """
546
+ State
547
+ """
548
+ return pulumi.get(self, "state")
549
+
550
+ @state.setter
551
+ def state(self, value: Optional[pulumi.Input[_builtins.str]]):
552
+ pulumi.set(self, "state", value)
553
+
554
+
555
+ @pulumi.type_token("nomad:index/dynamicHostVolume:DynamicHostVolume")
556
+ class DynamicHostVolume(pulumi.CustomResource):
557
+ @overload
558
+ def __init__(__self__,
559
+ resource_name: str,
560
+ opts: Optional[pulumi.ResourceOptions] = None,
561
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeCapabilityArgs', 'DynamicHostVolumeCapabilityArgsDict']]]]] = None,
562
+ capacity_max: Optional[pulumi.Input[_builtins.str]] = None,
563
+ capacity_min: Optional[pulumi.Input[_builtins.str]] = None,
564
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeConstraintArgs', 'DynamicHostVolumeConstraintArgsDict']]]]] = None,
565
+ name: Optional[pulumi.Input[_builtins.str]] = None,
566
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
567
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
568
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
569
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
570
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
571
+ __props__=None):
572
+ """
573
+ layout: "nomad"
574
+ page_title: "Nomad: DynamicHostVolume"
575
+ sidebar_current: "docs-nomad-resource-dynamic-host-volume"
576
+ description: |-
577
+ Manages the lifecycle of creating and deleting dynamic host volumes.
578
+ ---
579
+
580
+ Creates and registers a dynamic host volume in Nomad. Note that Nomad supports
581
+ two workflows for dynamic host volumes: create and register. Both resources
582
+ result in the same data source with the same outputs.
583
+
584
+ > **Warning:** Destroying this resource **will result in data loss**. Use the
585
+ [`prevent_destroy`][tf_docs_prevent_destroy] directive to avoid accidental
586
+ deletions.
587
+
588
+ ## Example Usage
589
+
590
+ Creating a dynamic host volume:
591
+
592
+ ```python
593
+ import pulumi
594
+ import pulumi_nomad as nomad
595
+
596
+ example = nomad.DynamicHostVolume("example",
597
+ name="example",
598
+ namespace="prod",
599
+ plugin_id="mkdir",
600
+ capacity_max="12 GiB",
601
+ capacity_min="1.0 GiB",
602
+ capabilities=[{
603
+ "access_mode": "single-node-writer",
604
+ "attachment_mode": "file-system",
605
+ }],
606
+ constraints=[{
607
+ "attribute": "${attr.kernel.name}",
608
+ "value": "linux",
609
+ }],
610
+ parameters={
611
+ "some_key": "some_value",
612
+ })
613
+ ```
614
+
615
+ :param str resource_name: The name of the resource.
616
+ :param pulumi.ResourceOptions opts: Options for the resource.
617
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeCapabilityArgs', 'DynamicHostVolumeCapabilityArgsDict']]]] capabilities: `(block: <optional>)` - Option for validating the capability of a
618
+ volume. Each capability block has the following attributes:
619
+ :param pulumi.Input[_builtins.str] capacity_max: `(string: <optional>)` - Option for requesting a maximum
620
+ capacity, in bytes. The capacity of a volume may be the physical size of a
621
+ disk, or a quota, depending on the plugin. The specific size of the resulting
622
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
623
+ behavior is up to the plugin. If you want to specify an exact size, set
624
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
625
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
626
+ may ignore this field.
627
+ :param pulumi.Input[_builtins.str] capacity_min: `(string: <optional>)` - Option for requesting a minimum
628
+ capacity, in bytes. The capacity of a volume may be the physical size of a
629
+ disk, or a quota, depending on the plugin. The specific size of the resulting
630
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
631
+ behavior is up to the plugin. If you want to specify an exact size, set
632
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
633
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
634
+ may ignore this field.
635
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeConstraintArgs', 'DynamicHostVolumeConstraintArgsDict']]]] constraints: `(block: <optional>)` - A restriction on the eligible nodes where
636
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
637
+ specification.. You can provide multiple `constraint` blocks to add more
638
+ constraints. Each constraint block has the following attributes.
639
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
640
+ [`volume.source`][volume_source] field in job specifications that claim this
641
+ volume. Host volume names must be unique per node. Names are visible to any
642
+ user with `node:read` ACL, even across namespaces, so they should not be
643
+ treated as sensitive values.
644
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
645
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
646
+ environment variable. Defaults to `"default"` if unset.
647
+ :param pulumi.Input[_builtins.str] node_id: `(string: <optional>)` - A specific node where you would like the
648
+ volume to be created.
649
+ :param pulumi.Input[_builtins.str] node_pool: `(string: <optional>)` - A specific node pool where you would like
650
+ the volume to be created. If you also provide `node_id`, the node must be in the
651
+ provided `node_pool`.
652
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
653
+ passed directly to the plugin to configure the volume. The details of these
654
+ parameters are specific to the plugin.
655
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
656
+ """
657
+ ...
658
+ @overload
659
+ def __init__(__self__,
660
+ resource_name: str,
661
+ args: DynamicHostVolumeArgs,
662
+ opts: Optional[pulumi.ResourceOptions] = None):
663
+ """
664
+ layout: "nomad"
665
+ page_title: "Nomad: DynamicHostVolume"
666
+ sidebar_current: "docs-nomad-resource-dynamic-host-volume"
667
+ description: |-
668
+ Manages the lifecycle of creating and deleting dynamic host volumes.
669
+ ---
670
+
671
+ Creates and registers a dynamic host volume in Nomad. Note that Nomad supports
672
+ two workflows for dynamic host volumes: create and register. Both resources
673
+ result in the same data source with the same outputs.
674
+
675
+ > **Warning:** Destroying this resource **will result in data loss**. Use the
676
+ [`prevent_destroy`][tf_docs_prevent_destroy] directive to avoid accidental
677
+ deletions.
678
+
679
+ ## Example Usage
680
+
681
+ Creating a dynamic host volume:
682
+
683
+ ```python
684
+ import pulumi
685
+ import pulumi_nomad as nomad
686
+
687
+ example = nomad.DynamicHostVolume("example",
688
+ name="example",
689
+ namespace="prod",
690
+ plugin_id="mkdir",
691
+ capacity_max="12 GiB",
692
+ capacity_min="1.0 GiB",
693
+ capabilities=[{
694
+ "access_mode": "single-node-writer",
695
+ "attachment_mode": "file-system",
696
+ }],
697
+ constraints=[{
698
+ "attribute": "${attr.kernel.name}",
699
+ "value": "linux",
700
+ }],
701
+ parameters={
702
+ "some_key": "some_value",
703
+ })
704
+ ```
705
+
706
+ :param str resource_name: The name of the resource.
707
+ :param DynamicHostVolumeArgs args: The arguments to use to populate this resource's properties.
708
+ :param pulumi.ResourceOptions opts: Options for the resource.
709
+ """
710
+ ...
711
+ def __init__(__self__, resource_name: str, *args, **kwargs):
712
+ resource_args, opts = _utilities.get_resource_args_opts(DynamicHostVolumeArgs, pulumi.ResourceOptions, *args, **kwargs)
713
+ if resource_args is not None:
714
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
715
+ else:
716
+ __self__._internal_init(resource_name, *args, **kwargs)
717
+
718
+ def _internal_init(__self__,
719
+ resource_name: str,
720
+ opts: Optional[pulumi.ResourceOptions] = None,
721
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeCapabilityArgs', 'DynamicHostVolumeCapabilityArgsDict']]]]] = None,
722
+ capacity_max: Optional[pulumi.Input[_builtins.str]] = None,
723
+ capacity_min: Optional[pulumi.Input[_builtins.str]] = None,
724
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeConstraintArgs', 'DynamicHostVolumeConstraintArgsDict']]]]] = None,
725
+ name: Optional[pulumi.Input[_builtins.str]] = None,
726
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
727
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
728
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
729
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
730
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
731
+ __props__=None):
732
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
733
+ if not isinstance(opts, pulumi.ResourceOptions):
734
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
735
+ if opts.id is None:
736
+ if __props__ is not None:
737
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
738
+ __props__ = DynamicHostVolumeArgs.__new__(DynamicHostVolumeArgs)
739
+
740
+ if capabilities is None and not opts.urn:
741
+ raise TypeError("Missing required property 'capabilities'")
742
+ __props__.__dict__["capabilities"] = capabilities
743
+ __props__.__dict__["capacity_max"] = capacity_max
744
+ __props__.__dict__["capacity_min"] = capacity_min
745
+ __props__.__dict__["constraints"] = constraints
746
+ __props__.__dict__["name"] = name
747
+ __props__.__dict__["namespace"] = namespace
748
+ __props__.__dict__["node_id"] = node_id
749
+ __props__.__dict__["node_pool"] = node_pool
750
+ __props__.__dict__["parameters"] = parameters
751
+ if plugin_id is None and not opts.urn:
752
+ raise TypeError("Missing required property 'plugin_id'")
753
+ __props__.__dict__["plugin_id"] = plugin_id
754
+ __props__.__dict__["capacity"] = None
755
+ __props__.__dict__["capacity_bytes"] = None
756
+ __props__.__dict__["capacity_max_bytes"] = None
757
+ __props__.__dict__["capacity_min_bytes"] = None
758
+ __props__.__dict__["host_path"] = None
759
+ __props__.__dict__["state"] = None
760
+ super(DynamicHostVolume, __self__).__init__(
761
+ 'nomad:index/dynamicHostVolume:DynamicHostVolume',
762
+ resource_name,
763
+ __props__,
764
+ opts)
765
+
766
+ @staticmethod
767
+ def get(resource_name: str,
768
+ id: pulumi.Input[str],
769
+ opts: Optional[pulumi.ResourceOptions] = None,
770
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeCapabilityArgs', 'DynamicHostVolumeCapabilityArgsDict']]]]] = None,
771
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
772
+ capacity_bytes: Optional[pulumi.Input[_builtins.int]] = None,
773
+ capacity_max: Optional[pulumi.Input[_builtins.str]] = None,
774
+ capacity_max_bytes: Optional[pulumi.Input[_builtins.int]] = None,
775
+ capacity_min: Optional[pulumi.Input[_builtins.str]] = None,
776
+ capacity_min_bytes: Optional[pulumi.Input[_builtins.int]] = None,
777
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeConstraintArgs', 'DynamicHostVolumeConstraintArgsDict']]]]] = None,
778
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
779
+ name: Optional[pulumi.Input[_builtins.str]] = None,
780
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
781
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
782
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
783
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
784
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
785
+ state: Optional[pulumi.Input[_builtins.str]] = None) -> 'DynamicHostVolume':
786
+ """
787
+ Get an existing DynamicHostVolume resource's state with the given name, id, and optional extra
788
+ properties used to qualify the lookup.
789
+
790
+ :param str resource_name: The unique name of the resulting resource.
791
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
792
+ :param pulumi.ResourceOptions opts: Options for the resource.
793
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeCapabilityArgs', 'DynamicHostVolumeCapabilityArgsDict']]]] capabilities: `(block: <optional>)` - Option for validating the capability of a
794
+ volume. Each capability block has the following attributes:
795
+ :param pulumi.Input[_builtins.str] capacity: Provisioned capacity
796
+ :param pulumi.Input[_builtins.str] capacity_max: `(string: <optional>)` - Option for requesting a maximum
797
+ capacity, in bytes. The capacity of a volume may be the physical size of a
798
+ disk, or a quota, depending on the plugin. The specific size of the resulting
799
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
800
+ behavior is up to the plugin. If you want to specify an exact size, set
801
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
802
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
803
+ may ignore this field.
804
+ :param pulumi.Input[_builtins.str] capacity_min: `(string: <optional>)` - Option for requesting a minimum
805
+ capacity, in bytes. The capacity of a volume may be the physical size of a
806
+ disk, or a quota, depending on the plugin. The specific size of the resulting
807
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
808
+ behavior is up to the plugin. If you want to specify an exact size, set
809
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
810
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
811
+ may ignore this field.
812
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeConstraintArgs', 'DynamicHostVolumeConstraintArgsDict']]]] constraints: `(block: <optional>)` - A restriction on the eligible nodes where
813
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
814
+ specification.. You can provide multiple `constraint` blocks to add more
815
+ constraints. Each constraint block has the following attributes.
816
+ :param pulumi.Input[_builtins.str] host_path: Host path
817
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
818
+ [`volume.source`][volume_source] field in job specifications that claim this
819
+ volume. Host volume names must be unique per node. Names are visible to any
820
+ user with `node:read` ACL, even across namespaces, so they should not be
821
+ treated as sensitive values.
822
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
823
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
824
+ environment variable. Defaults to `"default"` if unset.
825
+ :param pulumi.Input[_builtins.str] node_id: `(string: <optional>)` - A specific node where you would like the
826
+ volume to be created.
827
+ :param pulumi.Input[_builtins.str] node_pool: `(string: <optional>)` - A specific node pool where you would like
828
+ the volume to be created. If you also provide `node_id`, the node must be in the
829
+ provided `node_pool`.
830
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
831
+ passed directly to the plugin to configure the volume. The details of these
832
+ parameters are specific to the plugin.
833
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
834
+ :param pulumi.Input[_builtins.str] state: State
835
+ """
836
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
837
+
838
+ __props__ = _DynamicHostVolumeState.__new__(_DynamicHostVolumeState)
839
+
840
+ __props__.__dict__["capabilities"] = capabilities
841
+ __props__.__dict__["capacity"] = capacity
842
+ __props__.__dict__["capacity_bytes"] = capacity_bytes
843
+ __props__.__dict__["capacity_max"] = capacity_max
844
+ __props__.__dict__["capacity_max_bytes"] = capacity_max_bytes
845
+ __props__.__dict__["capacity_min"] = capacity_min
846
+ __props__.__dict__["capacity_min_bytes"] = capacity_min_bytes
847
+ __props__.__dict__["constraints"] = constraints
848
+ __props__.__dict__["host_path"] = host_path
849
+ __props__.__dict__["name"] = name
850
+ __props__.__dict__["namespace"] = namespace
851
+ __props__.__dict__["node_id"] = node_id
852
+ __props__.__dict__["node_pool"] = node_pool
853
+ __props__.__dict__["parameters"] = parameters
854
+ __props__.__dict__["plugin_id"] = plugin_id
855
+ __props__.__dict__["state"] = state
856
+ return DynamicHostVolume(resource_name, opts=opts, __props__=__props__)
857
+
858
+ @_builtins.property
859
+ @pulumi.getter
860
+ def capabilities(self) -> pulumi.Output[Sequence['outputs.DynamicHostVolumeCapability']]:
861
+ """
862
+ `(block: <optional>)` - Option for validating the capability of a
863
+ volume. Each capability block has the following attributes:
864
+ """
865
+ return pulumi.get(self, "capabilities")
866
+
867
+ @_builtins.property
868
+ @pulumi.getter
869
+ def capacity(self) -> pulumi.Output[_builtins.str]:
870
+ """
871
+ Provisioned capacity
872
+ """
873
+ return pulumi.get(self, "capacity")
874
+
875
+ @_builtins.property
876
+ @pulumi.getter(name="capacityBytes")
877
+ def capacity_bytes(self) -> pulumi.Output[_builtins.int]:
878
+ return pulumi.get(self, "capacity_bytes")
879
+
880
+ @_builtins.property
881
+ @pulumi.getter(name="capacityMax")
882
+ def capacity_max(self) -> pulumi.Output[Optional[_builtins.str]]:
883
+ """
884
+ `(string: <optional>)` - Option for requesting a maximum
885
+ capacity, in bytes. The capacity of a volume may be the physical size of a
886
+ disk, or a quota, depending on the plugin. The specific size of the resulting
887
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
888
+ behavior is up to the plugin. If you want to specify an exact size, set
889
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
890
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
891
+ may ignore this field.
892
+ """
893
+ return pulumi.get(self, "capacity_max")
894
+
895
+ @_builtins.property
896
+ @pulumi.getter(name="capacityMaxBytes")
897
+ def capacity_max_bytes(self) -> pulumi.Output[_builtins.int]:
898
+ return pulumi.get(self, "capacity_max_bytes")
899
+
900
+ @_builtins.property
901
+ @pulumi.getter(name="capacityMin")
902
+ def capacity_min(self) -> pulumi.Output[Optional[_builtins.str]]:
903
+ """
904
+ `(string: <optional>)` - Option for requesting a minimum
905
+ capacity, in bytes. The capacity of a volume may be the physical size of a
906
+ disk, or a quota, depending on the plugin. The specific size of the resulting
907
+ volume is somewhere between `capacity_min` and `capacity_max`; the exact
908
+ behavior is up to the plugin. If you want to specify an exact size, set
909
+ `capacity_min` and `capacity_max` to the same value. Accepts human-friendly
910
+ suffixes such as `"100GiB"`. Plugins that cannot restrict the size of volumes
911
+ may ignore this field.
912
+ """
913
+ return pulumi.get(self, "capacity_min")
914
+
915
+ @_builtins.property
916
+ @pulumi.getter(name="capacityMinBytes")
917
+ def capacity_min_bytes(self) -> pulumi.Output[_builtins.int]:
918
+ return pulumi.get(self, "capacity_min_bytes")
919
+
920
+ @_builtins.property
921
+ @pulumi.getter
922
+ def constraints(self) -> pulumi.Output[Optional[Sequence['outputs.DynamicHostVolumeConstraint']]]:
923
+ """
924
+ `(block: <optional>)` - A restriction on the eligible nodes where
925
+ a volume can be created, similar to the [`constraint`][] block on a Nomad job
926
+ specification.. You can provide multiple `constraint` blocks to add more
927
+ constraints. Each constraint block has the following attributes.
928
+ """
929
+ return pulumi.get(self, "constraints")
930
+
931
+ @_builtins.property
932
+ @pulumi.getter(name="hostPath")
933
+ def host_path(self) -> pulumi.Output[_builtins.str]:
934
+ """
935
+ Host path
936
+ """
937
+ return pulumi.get(self, "host_path")
938
+
939
+ @_builtins.property
940
+ @pulumi.getter
941
+ def name(self) -> pulumi.Output[_builtins.str]:
942
+ """
943
+ `(string: <required>)` - The name of the volume, which is used as the
944
+ [`volume.source`][volume_source] field in job specifications that claim this
945
+ volume. Host volume names must be unique per node. Names are visible to any
946
+ user with `node:read` ACL, even across namespaces, so they should not be
947
+ treated as sensitive values.
948
+ """
949
+ return pulumi.get(self, "name")
950
+
951
+ @_builtins.property
952
+ @pulumi.getter
953
+ def namespace(self) -> pulumi.Output[Optional[_builtins.str]]:
954
+ """
955
+ `(string: <optional>)` - The namespace of the volume. This field
956
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
957
+ environment variable. Defaults to `"default"` if unset.
958
+ """
959
+ return pulumi.get(self, "namespace")
960
+
961
+ @_builtins.property
962
+ @pulumi.getter(name="nodeId")
963
+ def node_id(self) -> pulumi.Output[_builtins.str]:
964
+ """
965
+ `(string: <optional>)` - A specific node where you would like the
966
+ volume to be created.
967
+ """
968
+ return pulumi.get(self, "node_id")
969
+
970
+ @_builtins.property
971
+ @pulumi.getter(name="nodePool")
972
+ def node_pool(self) -> pulumi.Output[_builtins.str]:
973
+ """
974
+ `(string: <optional>)` - A specific node pool where you would like
975
+ the volume to be created. If you also provide `node_id`, the node must be in the
976
+ provided `node_pool`.
977
+ """
978
+ return pulumi.get(self, "node_pool")
979
+
980
+ @_builtins.property
981
+ @pulumi.getter
982
+ def parameters(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
983
+ """
984
+ `(map<string|string>: <optional>)` - A key-value map of strings
985
+ passed directly to the plugin to configure the volume. The details of these
986
+ parameters are specific to the plugin.
987
+ """
988
+ return pulumi.get(self, "parameters")
989
+
990
+ @_builtins.property
991
+ @pulumi.getter(name="pluginId")
992
+ def plugin_id(self) -> pulumi.Output[_builtins.str]:
993
+ """
994
+ Plugin ID
995
+ """
996
+ return pulumi.get(self, "plugin_id")
997
+
998
+ @_builtins.property
999
+ @pulumi.getter
1000
+ def state(self) -> pulumi.Output[_builtins.str]:
1001
+ """
1002
+ State
1003
+ """
1004
+ return pulumi.get(self, "state")
1005
+