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,740 @@
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__ = ['DynamicHostVolumeRegistrationArgs', 'DynamicHostVolumeRegistration']
20
+
21
+ @pulumi.input_type
22
+ class DynamicHostVolumeRegistrationArgs:
23
+ def __init__(__self__, *,
24
+ capabilities: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]],
25
+ host_path: pulumi.Input[_builtins.str],
26
+ node_id: pulumi.Input[_builtins.str],
27
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
28
+ name: Optional[pulumi.Input[_builtins.str]] = None,
29
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
30
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None):
31
+ """
32
+ The set of arguments for constructing a DynamicHostVolumeRegistration resource.
33
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
34
+ volume. Each capability block has the following attributes:
35
+ :param pulumi.Input[_builtins.str] host_path: `(string)` - The path on disk where the volume exists.
36
+ :param pulumi.Input[_builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
37
+ mounted.
38
+ :param pulumi.Input[_builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
39
+ physical size of a disk or a quota, depending on the plugin. This field must
40
+ be between the `capacity_min` and `capacity_max` values unless they are
41
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
42
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
43
+ [`volume.source`][volume_source] field in job specifications that claim this
44
+ volume. Host volume names must be unique per node. Names are visible to any
45
+ user with `node:read` ACL, even across namespaces, so they should not be
46
+ treated as sensitive values.
47
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
48
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
49
+ environment variable. Defaults to `"default"` if unset.
50
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
51
+ passed directly to the plugin to configure the volume. The details of these
52
+ parameters are specific to the plugin.
53
+
54
+
55
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
56
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
57
+ [volume_source]: /nomad/docs/job-specification/volume#source
58
+ """
59
+ pulumi.set(__self__, "capabilities", capabilities)
60
+ pulumi.set(__self__, "host_path", host_path)
61
+ pulumi.set(__self__, "node_id", node_id)
62
+ if capacity is not None:
63
+ pulumi.set(__self__, "capacity", capacity)
64
+ if name is not None:
65
+ pulumi.set(__self__, "name", name)
66
+ if namespace is not None:
67
+ pulumi.set(__self__, "namespace", namespace)
68
+ if parameters is not None:
69
+ pulumi.set(__self__, "parameters", parameters)
70
+
71
+ @_builtins.property
72
+ @pulumi.getter
73
+ def capabilities(self) -> pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]:
74
+ """
75
+ `(block: <optional>)` - Option for validating the capability of a
76
+ volume. Each capability block has the following attributes:
77
+ """
78
+ return pulumi.get(self, "capabilities")
79
+
80
+ @capabilities.setter
81
+ def capabilities(self, value: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]):
82
+ pulumi.set(self, "capabilities", value)
83
+
84
+ @_builtins.property
85
+ @pulumi.getter(name="hostPath")
86
+ def host_path(self) -> pulumi.Input[_builtins.str]:
87
+ """
88
+ `(string)` - The path on disk where the volume exists.
89
+ """
90
+ return pulumi.get(self, "host_path")
91
+
92
+ @host_path.setter
93
+ def host_path(self, value: pulumi.Input[_builtins.str]):
94
+ pulumi.set(self, "host_path", value)
95
+
96
+ @_builtins.property
97
+ @pulumi.getter(name="nodeId")
98
+ def node_id(self) -> pulumi.Input[_builtins.str]:
99
+ """
100
+ `(string: <required>)` - A specific node where the volume is
101
+ mounted.
102
+ """
103
+ return pulumi.get(self, "node_id")
104
+
105
+ @node_id.setter
106
+ def node_id(self, value: pulumi.Input[_builtins.str]):
107
+ pulumi.set(self, "node_id", value)
108
+
109
+ @_builtins.property
110
+ @pulumi.getter
111
+ def capacity(self) -> Optional[pulumi.Input[_builtins.str]]:
112
+ """
113
+ `(string: <optional>)` - The size of a volume in bytes. Either the
114
+ physical size of a disk or a quota, depending on the plugin. This field must
115
+ be between the `capacity_min` and `capacity_max` values unless they are
116
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
117
+ """
118
+ return pulumi.get(self, "capacity")
119
+
120
+ @capacity.setter
121
+ def capacity(self, value: Optional[pulumi.Input[_builtins.str]]):
122
+ pulumi.set(self, "capacity", value)
123
+
124
+ @_builtins.property
125
+ @pulumi.getter
126
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
127
+ """
128
+ `(string: <required>)` - The name of the volume, which is used as the
129
+ [`volume.source`][volume_source] field in job specifications that claim this
130
+ volume. Host volume names must be unique per node. Names are visible to any
131
+ user with `node:read` ACL, even across namespaces, so they should not be
132
+ treated as sensitive values.
133
+ """
134
+ return pulumi.get(self, "name")
135
+
136
+ @name.setter
137
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
138
+ pulumi.set(self, "name", value)
139
+
140
+ @_builtins.property
141
+ @pulumi.getter
142
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
143
+ """
144
+ `(string: <optional>)` - The namespace of the volume. This field
145
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
146
+ environment variable. Defaults to `"default"` if unset.
147
+ """
148
+ return pulumi.get(self, "namespace")
149
+
150
+ @namespace.setter
151
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
152
+ pulumi.set(self, "namespace", value)
153
+
154
+ @_builtins.property
155
+ @pulumi.getter
156
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
157
+ """
158
+ `(map<string|string>: <optional>)` - A key-value map of strings
159
+ passed directly to the plugin to configure the volume. The details of these
160
+ parameters are specific to the plugin.
161
+
162
+
163
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
164
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
165
+ [volume_source]: /nomad/docs/job-specification/volume#source
166
+ """
167
+ return pulumi.get(self, "parameters")
168
+
169
+ @parameters.setter
170
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
171
+ pulumi.set(self, "parameters", value)
172
+
173
+
174
+ @pulumi.input_type
175
+ class _DynamicHostVolumeRegistrationState:
176
+ def __init__(__self__, *,
177
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]] = None,
178
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
179
+ capacity_bytes: Optional[pulumi.Input[_builtins.int]] = None,
180
+ capacity_max_bytes: Optional[pulumi.Input[_builtins.int]] = None,
181
+ capacity_min_bytes: Optional[pulumi.Input[_builtins.int]] = None,
182
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]] = None,
183
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
184
+ name: Optional[pulumi.Input[_builtins.str]] = None,
185
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
186
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
187
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
188
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
189
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
190
+ state: Optional[pulumi.Input[_builtins.str]] = None):
191
+ """
192
+ Input properties used for looking up and filtering DynamicHostVolumeRegistration resources.
193
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
194
+ volume. Each capability block has the following attributes:
195
+ :param pulumi.Input[_builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
196
+ physical size of a disk or a quota, depending on the plugin. This field must
197
+ be between the `capacity_min` and `capacity_max` values unless they are
198
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
199
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]] constraints: Constraints
200
+ :param pulumi.Input[_builtins.str] host_path: `(string)` - The path on disk where the volume exists.
201
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
202
+ [`volume.source`][volume_source] field in job specifications that claim this
203
+ volume. Host volume names must be unique per node. Names are visible to any
204
+ user with `node:read` ACL, even across namespaces, so they should not be
205
+ treated as sensitive values.
206
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
207
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
208
+ environment variable. Defaults to `"default"` if unset.
209
+ :param pulumi.Input[_builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
210
+ mounted.
211
+ :param pulumi.Input[_builtins.str] node_pool: Node pool
212
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
213
+ passed directly to the plugin to configure the volume. The details of these
214
+ parameters are specific to the plugin.
215
+
216
+
217
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
218
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
219
+ [volume_source]: /nomad/docs/job-specification/volume#source
220
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
221
+ :param pulumi.Input[_builtins.str] state: State
222
+ """
223
+ if capabilities is not None:
224
+ pulumi.set(__self__, "capabilities", capabilities)
225
+ if capacity is not None:
226
+ pulumi.set(__self__, "capacity", capacity)
227
+ if capacity_bytes is not None:
228
+ pulumi.set(__self__, "capacity_bytes", capacity_bytes)
229
+ if capacity_max_bytes is not None:
230
+ pulumi.set(__self__, "capacity_max_bytes", capacity_max_bytes)
231
+ if capacity_min_bytes is not None:
232
+ pulumi.set(__self__, "capacity_min_bytes", capacity_min_bytes)
233
+ if constraints is not None:
234
+ pulumi.set(__self__, "constraints", constraints)
235
+ if host_path is not None:
236
+ pulumi.set(__self__, "host_path", host_path)
237
+ if name is not None:
238
+ pulumi.set(__self__, "name", name)
239
+ if namespace is not None:
240
+ pulumi.set(__self__, "namespace", namespace)
241
+ if node_id is not None:
242
+ pulumi.set(__self__, "node_id", node_id)
243
+ if node_pool is not None:
244
+ pulumi.set(__self__, "node_pool", node_pool)
245
+ if parameters is not None:
246
+ pulumi.set(__self__, "parameters", parameters)
247
+ if plugin_id is not None:
248
+ pulumi.set(__self__, "plugin_id", plugin_id)
249
+ if state is not None:
250
+ pulumi.set(__self__, "state", state)
251
+
252
+ @_builtins.property
253
+ @pulumi.getter
254
+ def capabilities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]]:
255
+ """
256
+ `(block: <optional>)` - Option for validating the capability of a
257
+ volume. Each capability block has the following attributes:
258
+ """
259
+ return pulumi.get(self, "capabilities")
260
+
261
+ @capabilities.setter
262
+ def capabilities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]]):
263
+ pulumi.set(self, "capabilities", value)
264
+
265
+ @_builtins.property
266
+ @pulumi.getter
267
+ def capacity(self) -> Optional[pulumi.Input[_builtins.str]]:
268
+ """
269
+ `(string: <optional>)` - The size of a volume in bytes. Either the
270
+ physical size of a disk or a quota, depending on the plugin. This field must
271
+ be between the `capacity_min` and `capacity_max` values unless they are
272
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
273
+ """
274
+ return pulumi.get(self, "capacity")
275
+
276
+ @capacity.setter
277
+ def capacity(self, value: Optional[pulumi.Input[_builtins.str]]):
278
+ pulumi.set(self, "capacity", value)
279
+
280
+ @_builtins.property
281
+ @pulumi.getter(name="capacityBytes")
282
+ def capacity_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
283
+ return pulumi.get(self, "capacity_bytes")
284
+
285
+ @capacity_bytes.setter
286
+ def capacity_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
287
+ pulumi.set(self, "capacity_bytes", value)
288
+
289
+ @_builtins.property
290
+ @pulumi.getter(name="capacityMaxBytes")
291
+ def capacity_max_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
292
+ return pulumi.get(self, "capacity_max_bytes")
293
+
294
+ @capacity_max_bytes.setter
295
+ def capacity_max_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
296
+ pulumi.set(self, "capacity_max_bytes", value)
297
+
298
+ @_builtins.property
299
+ @pulumi.getter(name="capacityMinBytes")
300
+ def capacity_min_bytes(self) -> Optional[pulumi.Input[_builtins.int]]:
301
+ return pulumi.get(self, "capacity_min_bytes")
302
+
303
+ @capacity_min_bytes.setter
304
+ def capacity_min_bytes(self, value: Optional[pulumi.Input[_builtins.int]]):
305
+ pulumi.set(self, "capacity_min_bytes", value)
306
+
307
+ @_builtins.property
308
+ @pulumi.getter
309
+ def constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]]:
310
+ """
311
+ Constraints
312
+ """
313
+ return pulumi.get(self, "constraints")
314
+
315
+ @constraints.setter
316
+ def constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]]):
317
+ pulumi.set(self, "constraints", value)
318
+
319
+ @_builtins.property
320
+ @pulumi.getter(name="hostPath")
321
+ def host_path(self) -> Optional[pulumi.Input[_builtins.str]]:
322
+ """
323
+ `(string)` - The path on disk where the volume exists.
324
+ """
325
+ return pulumi.get(self, "host_path")
326
+
327
+ @host_path.setter
328
+ def host_path(self, value: Optional[pulumi.Input[_builtins.str]]):
329
+ pulumi.set(self, "host_path", value)
330
+
331
+ @_builtins.property
332
+ @pulumi.getter
333
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
334
+ """
335
+ `(string: <required>)` - The name of the volume, which is used as the
336
+ [`volume.source`][volume_source] field in job specifications that claim this
337
+ volume. Host volume names must be unique per node. Names are visible to any
338
+ user with `node:read` ACL, even across namespaces, so they should not be
339
+ treated as sensitive values.
340
+ """
341
+ return pulumi.get(self, "name")
342
+
343
+ @name.setter
344
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
345
+ pulumi.set(self, "name", value)
346
+
347
+ @_builtins.property
348
+ @pulumi.getter
349
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
350
+ """
351
+ `(string: <optional>)` - The namespace of the volume. This field
352
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
353
+ environment variable. Defaults to `"default"` if unset.
354
+ """
355
+ return pulumi.get(self, "namespace")
356
+
357
+ @namespace.setter
358
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
359
+ pulumi.set(self, "namespace", value)
360
+
361
+ @_builtins.property
362
+ @pulumi.getter(name="nodeId")
363
+ def node_id(self) -> Optional[pulumi.Input[_builtins.str]]:
364
+ """
365
+ `(string: <required>)` - A specific node where the volume is
366
+ mounted.
367
+ """
368
+ return pulumi.get(self, "node_id")
369
+
370
+ @node_id.setter
371
+ def node_id(self, value: Optional[pulumi.Input[_builtins.str]]):
372
+ pulumi.set(self, "node_id", value)
373
+
374
+ @_builtins.property
375
+ @pulumi.getter(name="nodePool")
376
+ def node_pool(self) -> Optional[pulumi.Input[_builtins.str]]:
377
+ """
378
+ Node pool
379
+ """
380
+ return pulumi.get(self, "node_pool")
381
+
382
+ @node_pool.setter
383
+ def node_pool(self, value: Optional[pulumi.Input[_builtins.str]]):
384
+ pulumi.set(self, "node_pool", value)
385
+
386
+ @_builtins.property
387
+ @pulumi.getter
388
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
389
+ """
390
+ `(map<string|string>: <optional>)` - A key-value map of strings
391
+ passed directly to the plugin to configure the volume. The details of these
392
+ parameters are specific to the plugin.
393
+
394
+
395
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
396
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
397
+ [volume_source]: /nomad/docs/job-specification/volume#source
398
+ """
399
+ return pulumi.get(self, "parameters")
400
+
401
+ @parameters.setter
402
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
403
+ pulumi.set(self, "parameters", value)
404
+
405
+ @_builtins.property
406
+ @pulumi.getter(name="pluginId")
407
+ def plugin_id(self) -> Optional[pulumi.Input[_builtins.str]]:
408
+ """
409
+ Plugin ID
410
+ """
411
+ return pulumi.get(self, "plugin_id")
412
+
413
+ @plugin_id.setter
414
+ def plugin_id(self, value: Optional[pulumi.Input[_builtins.str]]):
415
+ pulumi.set(self, "plugin_id", value)
416
+
417
+ @_builtins.property
418
+ @pulumi.getter
419
+ def state(self) -> Optional[pulumi.Input[_builtins.str]]:
420
+ """
421
+ State
422
+ """
423
+ return pulumi.get(self, "state")
424
+
425
+ @state.setter
426
+ def state(self, value: Optional[pulumi.Input[_builtins.str]]):
427
+ pulumi.set(self, "state", value)
428
+
429
+
430
+ @pulumi.type_token("nomad:index/dynamicHostVolumeRegistration:DynamicHostVolumeRegistration")
431
+ class DynamicHostVolumeRegistration(pulumi.CustomResource):
432
+ @overload
433
+ def __init__(__self__,
434
+ resource_name: str,
435
+ opts: Optional[pulumi.ResourceOptions] = None,
436
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationCapabilityArgs', 'DynamicHostVolumeRegistrationCapabilityArgsDict']]]]] = None,
437
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
438
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
439
+ name: Optional[pulumi.Input[_builtins.str]] = None,
440
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
441
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
442
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
443
+ __props__=None):
444
+ """
445
+ Registers a dynamic host volume in Nomad that has already been created. Note
446
+ that Nomad supports two workflows for dynamic host volumes: create and
447
+ register. Both resources result in the same data source with the same outputs.
448
+
449
+ :param str resource_name: The name of the resource.
450
+ :param pulumi.ResourceOptions opts: Options for the resource.
451
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationCapabilityArgs', 'DynamicHostVolumeRegistrationCapabilityArgsDict']]]] capabilities: `(block: <optional>)` - Option for validating the capability of a
452
+ volume. Each capability block has the following attributes:
453
+ :param pulumi.Input[_builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
454
+ physical size of a disk or a quota, depending on the plugin. This field must
455
+ be between the `capacity_min` and `capacity_max` values unless they are
456
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
457
+ :param pulumi.Input[_builtins.str] host_path: `(string)` - The path on disk where the volume exists.
458
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
459
+ [`volume.source`][volume_source] field in job specifications that claim this
460
+ volume. Host volume names must be unique per node. Names are visible to any
461
+ user with `node:read` ACL, even across namespaces, so they should not be
462
+ treated as sensitive values.
463
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
464
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
465
+ environment variable. Defaults to `"default"` if unset.
466
+ :param pulumi.Input[_builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
467
+ mounted.
468
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
469
+ passed directly to the plugin to configure the volume. The details of these
470
+ parameters are specific to the plugin.
471
+
472
+
473
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
474
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
475
+ [volume_source]: /nomad/docs/job-specification/volume#source
476
+ """
477
+ ...
478
+ @overload
479
+ def __init__(__self__,
480
+ resource_name: str,
481
+ args: DynamicHostVolumeRegistrationArgs,
482
+ opts: Optional[pulumi.ResourceOptions] = None):
483
+ """
484
+ Registers a dynamic host volume in Nomad that has already been created. Note
485
+ that Nomad supports two workflows for dynamic host volumes: create and
486
+ register. Both resources result in the same data source with the same outputs.
487
+
488
+ :param str resource_name: The name of the resource.
489
+ :param DynamicHostVolumeRegistrationArgs args: The arguments to use to populate this resource's properties.
490
+ :param pulumi.ResourceOptions opts: Options for the resource.
491
+ """
492
+ ...
493
+ def __init__(__self__, resource_name: str, *args, **kwargs):
494
+ resource_args, opts = _utilities.get_resource_args_opts(DynamicHostVolumeRegistrationArgs, pulumi.ResourceOptions, *args, **kwargs)
495
+ if resource_args is not None:
496
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
497
+ else:
498
+ __self__._internal_init(resource_name, *args, **kwargs)
499
+
500
+ def _internal_init(__self__,
501
+ resource_name: str,
502
+ opts: Optional[pulumi.ResourceOptions] = None,
503
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationCapabilityArgs', 'DynamicHostVolumeRegistrationCapabilityArgsDict']]]]] = None,
504
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
505
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
506
+ name: Optional[pulumi.Input[_builtins.str]] = None,
507
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
508
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
509
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
510
+ __props__=None):
511
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
512
+ if not isinstance(opts, pulumi.ResourceOptions):
513
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
514
+ if opts.id is None:
515
+ if __props__ is not None:
516
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
517
+ __props__ = DynamicHostVolumeRegistrationArgs.__new__(DynamicHostVolumeRegistrationArgs)
518
+
519
+ if capabilities is None and not opts.urn:
520
+ raise TypeError("Missing required property 'capabilities'")
521
+ __props__.__dict__["capabilities"] = capabilities
522
+ __props__.__dict__["capacity"] = capacity
523
+ if host_path is None and not opts.urn:
524
+ raise TypeError("Missing required property 'host_path'")
525
+ __props__.__dict__["host_path"] = host_path
526
+ __props__.__dict__["name"] = name
527
+ __props__.__dict__["namespace"] = namespace
528
+ if node_id is None and not opts.urn:
529
+ raise TypeError("Missing required property 'node_id'")
530
+ __props__.__dict__["node_id"] = node_id
531
+ __props__.__dict__["parameters"] = parameters
532
+ __props__.__dict__["capacity_bytes"] = None
533
+ __props__.__dict__["capacity_max_bytes"] = None
534
+ __props__.__dict__["capacity_min_bytes"] = None
535
+ __props__.__dict__["constraints"] = None
536
+ __props__.__dict__["node_pool"] = None
537
+ __props__.__dict__["plugin_id"] = None
538
+ __props__.__dict__["state"] = None
539
+ super(DynamicHostVolumeRegistration, __self__).__init__(
540
+ 'nomad:index/dynamicHostVolumeRegistration:DynamicHostVolumeRegistration',
541
+ resource_name,
542
+ __props__,
543
+ opts)
544
+
545
+ @staticmethod
546
+ def get(resource_name: str,
547
+ id: pulumi.Input[str],
548
+ opts: Optional[pulumi.ResourceOptions] = None,
549
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationCapabilityArgs', 'DynamicHostVolumeRegistrationCapabilityArgsDict']]]]] = None,
550
+ capacity: Optional[pulumi.Input[_builtins.str]] = None,
551
+ capacity_bytes: Optional[pulumi.Input[_builtins.int]] = None,
552
+ capacity_max_bytes: Optional[pulumi.Input[_builtins.int]] = None,
553
+ capacity_min_bytes: Optional[pulumi.Input[_builtins.int]] = None,
554
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationConstraintArgs', 'DynamicHostVolumeRegistrationConstraintArgsDict']]]]] = None,
555
+ host_path: Optional[pulumi.Input[_builtins.str]] = None,
556
+ name: Optional[pulumi.Input[_builtins.str]] = None,
557
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
558
+ node_id: Optional[pulumi.Input[_builtins.str]] = None,
559
+ node_pool: Optional[pulumi.Input[_builtins.str]] = None,
560
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
561
+ plugin_id: Optional[pulumi.Input[_builtins.str]] = None,
562
+ state: Optional[pulumi.Input[_builtins.str]] = None) -> 'DynamicHostVolumeRegistration':
563
+ """
564
+ Get an existing DynamicHostVolumeRegistration resource's state with the given name, id, and optional extra
565
+ properties used to qualify the lookup.
566
+
567
+ :param str resource_name: The unique name of the resulting resource.
568
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
569
+ :param pulumi.ResourceOptions opts: Options for the resource.
570
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationCapabilityArgs', 'DynamicHostVolumeRegistrationCapabilityArgsDict']]]] capabilities: `(block: <optional>)` - Option for validating the capability of a
571
+ volume. Each capability block has the following attributes:
572
+ :param pulumi.Input[_builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
573
+ physical size of a disk or a quota, depending on the plugin. This field must
574
+ be between the `capacity_min` and `capacity_max` values unless they are
575
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
576
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DynamicHostVolumeRegistrationConstraintArgs', 'DynamicHostVolumeRegistrationConstraintArgsDict']]]] constraints: Constraints
577
+ :param pulumi.Input[_builtins.str] host_path: `(string)` - The path on disk where the volume exists.
578
+ :param pulumi.Input[_builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
579
+ [`volume.source`][volume_source] field in job specifications that claim this
580
+ volume. Host volume names must be unique per node. Names are visible to any
581
+ user with `node:read` ACL, even across namespaces, so they should not be
582
+ treated as sensitive values.
583
+ :param pulumi.Input[_builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
584
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
585
+ environment variable. Defaults to `"default"` if unset.
586
+ :param pulumi.Input[_builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
587
+ mounted.
588
+ :param pulumi.Input[_builtins.str] node_pool: Node pool
589
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
590
+ passed directly to the plugin to configure the volume. The details of these
591
+ parameters are specific to the plugin.
592
+
593
+
594
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
595
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
596
+ [volume_source]: /nomad/docs/job-specification/volume#source
597
+ :param pulumi.Input[_builtins.str] plugin_id: Plugin ID
598
+ :param pulumi.Input[_builtins.str] state: State
599
+ """
600
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
601
+
602
+ __props__ = _DynamicHostVolumeRegistrationState.__new__(_DynamicHostVolumeRegistrationState)
603
+
604
+ __props__.__dict__["capabilities"] = capabilities
605
+ __props__.__dict__["capacity"] = capacity
606
+ __props__.__dict__["capacity_bytes"] = capacity_bytes
607
+ __props__.__dict__["capacity_max_bytes"] = capacity_max_bytes
608
+ __props__.__dict__["capacity_min_bytes"] = capacity_min_bytes
609
+ __props__.__dict__["constraints"] = constraints
610
+ __props__.__dict__["host_path"] = host_path
611
+ __props__.__dict__["name"] = name
612
+ __props__.__dict__["namespace"] = namespace
613
+ __props__.__dict__["node_id"] = node_id
614
+ __props__.__dict__["node_pool"] = node_pool
615
+ __props__.__dict__["parameters"] = parameters
616
+ __props__.__dict__["plugin_id"] = plugin_id
617
+ __props__.__dict__["state"] = state
618
+ return DynamicHostVolumeRegistration(resource_name, opts=opts, __props__=__props__)
619
+
620
+ @_builtins.property
621
+ @pulumi.getter
622
+ def capabilities(self) -> pulumi.Output[Sequence['outputs.DynamicHostVolumeRegistrationCapability']]:
623
+ """
624
+ `(block: <optional>)` - Option for validating the capability of a
625
+ volume. Each capability block has the following attributes:
626
+ """
627
+ return pulumi.get(self, "capabilities")
628
+
629
+ @_builtins.property
630
+ @pulumi.getter
631
+ def capacity(self) -> pulumi.Output[Optional[_builtins.str]]:
632
+ """
633
+ `(string: <optional>)` - The size of a volume in bytes. Either the
634
+ physical size of a disk or a quota, depending on the plugin. This field must
635
+ be between the `capacity_min` and `capacity_max` values unless they are
636
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
637
+ """
638
+ return pulumi.get(self, "capacity")
639
+
640
+ @_builtins.property
641
+ @pulumi.getter(name="capacityBytes")
642
+ def capacity_bytes(self) -> pulumi.Output[_builtins.int]:
643
+ return pulumi.get(self, "capacity_bytes")
644
+
645
+ @_builtins.property
646
+ @pulumi.getter(name="capacityMaxBytes")
647
+ def capacity_max_bytes(self) -> pulumi.Output[_builtins.int]:
648
+ return pulumi.get(self, "capacity_max_bytes")
649
+
650
+ @_builtins.property
651
+ @pulumi.getter(name="capacityMinBytes")
652
+ def capacity_min_bytes(self) -> pulumi.Output[_builtins.int]:
653
+ return pulumi.get(self, "capacity_min_bytes")
654
+
655
+ @_builtins.property
656
+ @pulumi.getter
657
+ def constraints(self) -> pulumi.Output[Sequence['outputs.DynamicHostVolumeRegistrationConstraint']]:
658
+ """
659
+ Constraints
660
+ """
661
+ return pulumi.get(self, "constraints")
662
+
663
+ @_builtins.property
664
+ @pulumi.getter(name="hostPath")
665
+ def host_path(self) -> pulumi.Output[_builtins.str]:
666
+ """
667
+ `(string)` - The path on disk where the volume exists.
668
+ """
669
+ return pulumi.get(self, "host_path")
670
+
671
+ @_builtins.property
672
+ @pulumi.getter
673
+ def name(self) -> pulumi.Output[_builtins.str]:
674
+ """
675
+ `(string: <required>)` - The name of the volume, which is used as the
676
+ [`volume.source`][volume_source] field in job specifications that claim this
677
+ volume. Host volume names must be unique per node. Names are visible to any
678
+ user with `node:read` ACL, even across namespaces, so they should not be
679
+ treated as sensitive values.
680
+ """
681
+ return pulumi.get(self, "name")
682
+
683
+ @_builtins.property
684
+ @pulumi.getter
685
+ def namespace(self) -> pulumi.Output[Optional[_builtins.str]]:
686
+ """
687
+ `(string: <optional>)` - The namespace of the volume. This field
688
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
689
+ environment variable. Defaults to `"default"` if unset.
690
+ """
691
+ return pulumi.get(self, "namespace")
692
+
693
+ @_builtins.property
694
+ @pulumi.getter(name="nodeId")
695
+ def node_id(self) -> pulumi.Output[_builtins.str]:
696
+ """
697
+ `(string: <required>)` - A specific node where the volume is
698
+ mounted.
699
+ """
700
+ return pulumi.get(self, "node_id")
701
+
702
+ @_builtins.property
703
+ @pulumi.getter(name="nodePool")
704
+ def node_pool(self) -> pulumi.Output[_builtins.str]:
705
+ """
706
+ Node pool
707
+ """
708
+ return pulumi.get(self, "node_pool")
709
+
710
+ @_builtins.property
711
+ @pulumi.getter
712
+ def parameters(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
713
+ """
714
+ `(map<string|string>: <optional>)` - A key-value map of strings
715
+ passed directly to the plugin to configure the volume. The details of these
716
+ parameters are specific to the plugin.
717
+
718
+
719
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
720
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
721
+ [volume_source]: /nomad/docs/job-specification/volume#source
722
+ """
723
+ return pulumi.get(self, "parameters")
724
+
725
+ @_builtins.property
726
+ @pulumi.getter(name="pluginId")
727
+ def plugin_id(self) -> pulumi.Output[_builtins.str]:
728
+ """
729
+ Plugin ID
730
+ """
731
+ return pulumi.get(self, "plugin_id")
732
+
733
+ @_builtins.property
734
+ @pulumi.getter
735
+ def state(self) -> pulumi.Output[_builtins.str]:
736
+ """
737
+ State
738
+ """
739
+ return pulumi.get(self, "state")
740
+