pulumi-nomad 2.5.0a1744783739__py3-none-any.whl → 2.6.0a1745042960__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.
@@ -0,0 +1,740 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins
6
+ import copy
7
+ import warnings
8
+ import sys
9
+ import pulumi
10
+ import pulumi.runtime
11
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
12
+ if sys.version_info >= (3, 11):
13
+ from typing import NotRequired, TypedDict, TypeAlias
14
+ else:
15
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
16
+ from . import _utilities
17
+ from . import outputs
18
+ from ._inputs import *
19
+
20
+ __all__ = ['DynamicHostVolumeRegistrationArgs', 'DynamicHostVolumeRegistration']
21
+
22
+ @pulumi.input_type
23
+ class DynamicHostVolumeRegistrationArgs:
24
+ def __init__(__self__, *,
25
+ capabilities: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]],
26
+ host_path: pulumi.Input[builtins.str],
27
+ node_id: pulumi.Input[builtins.str],
28
+ capacity: Optional[pulumi.Input[builtins.str]] = None,
29
+ name: Optional[pulumi.Input[builtins.str]] = None,
30
+ namespace: Optional[pulumi.Input[builtins.str]] = None,
31
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None):
32
+ """
33
+ The set of arguments for constructing a DynamicHostVolumeRegistration resource.
34
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
35
+ volume. Each capability block has the following attributes:
36
+ :param pulumi.Input[builtins.str] host_path: `(string)` - The path on disk where the volume exists.
37
+ :param pulumi.Input[builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
38
+ mounted.
39
+ :param pulumi.Input[builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
40
+ physical size of a disk or a quota, depending on the plugin. This field must
41
+ be between the `capacity_min` and `capacity_max` values unless they are
42
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
43
+ :param pulumi.Input[builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
44
+ [`volume.source`][volume_source] field in job specifications that claim this
45
+ volume. Host volume names must be unique per node. Names are visible to any
46
+ user with `node:read` ACL, even across namespaces, so they should not be
47
+ treated as sensitive values.
48
+ :param pulumi.Input[builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
49
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
50
+ environment variable. Defaults to `"default"` if unset.
51
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
52
+ passed directly to the plugin to configure the volume. The details of these
53
+ parameters are specific to the plugin.
54
+
55
+
56
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
57
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
58
+ [volume_source]: /nomad/docs/job-specification/volume#source
59
+ """
60
+ pulumi.set(__self__, "capabilities", capabilities)
61
+ pulumi.set(__self__, "host_path", host_path)
62
+ pulumi.set(__self__, "node_id", node_id)
63
+ if capacity is not None:
64
+ pulumi.set(__self__, "capacity", capacity)
65
+ if name is not None:
66
+ pulumi.set(__self__, "name", name)
67
+ if namespace is not None:
68
+ pulumi.set(__self__, "namespace", namespace)
69
+ if parameters is not None:
70
+ pulumi.set(__self__, "parameters", parameters)
71
+
72
+ @property
73
+ @pulumi.getter
74
+ def capabilities(self) -> pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]:
75
+ """
76
+ `(block: <optional>)` - Option for validating the capability of a
77
+ volume. Each capability block has the following attributes:
78
+ """
79
+ return pulumi.get(self, "capabilities")
80
+
81
+ @capabilities.setter
82
+ def capabilities(self, value: pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]):
83
+ pulumi.set(self, "capabilities", value)
84
+
85
+ @property
86
+ @pulumi.getter(name="hostPath")
87
+ def host_path(self) -> pulumi.Input[builtins.str]:
88
+ """
89
+ `(string)` - The path on disk where the volume exists.
90
+ """
91
+ return pulumi.get(self, "host_path")
92
+
93
+ @host_path.setter
94
+ def host_path(self, value: pulumi.Input[builtins.str]):
95
+ pulumi.set(self, "host_path", value)
96
+
97
+ @property
98
+ @pulumi.getter(name="nodeId")
99
+ def node_id(self) -> pulumi.Input[builtins.str]:
100
+ """
101
+ `(string: <required>)` - A specific node where the volume is
102
+ mounted.
103
+ """
104
+ return pulumi.get(self, "node_id")
105
+
106
+ @node_id.setter
107
+ def node_id(self, value: pulumi.Input[builtins.str]):
108
+ pulumi.set(self, "node_id", value)
109
+
110
+ @property
111
+ @pulumi.getter
112
+ def capacity(self) -> Optional[pulumi.Input[builtins.str]]:
113
+ """
114
+ `(string: <optional>)` - The size of a volume in bytes. Either the
115
+ physical size of a disk or a quota, depending on the plugin. This field must
116
+ be between the `capacity_min` and `capacity_max` values unless they are
117
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
118
+ """
119
+ return pulumi.get(self, "capacity")
120
+
121
+ @capacity.setter
122
+ def capacity(self, value: Optional[pulumi.Input[builtins.str]]):
123
+ pulumi.set(self, "capacity", value)
124
+
125
+ @property
126
+ @pulumi.getter
127
+ def name(self) -> Optional[pulumi.Input[builtins.str]]:
128
+ """
129
+ `(string: <required>)` - The name of the volume, which is used as the
130
+ [`volume.source`][volume_source] field in job specifications that claim this
131
+ volume. Host volume names must be unique per node. Names are visible to any
132
+ user with `node:read` ACL, even across namespaces, so they should not be
133
+ treated as sensitive values.
134
+ """
135
+ return pulumi.get(self, "name")
136
+
137
+ @name.setter
138
+ def name(self, value: Optional[pulumi.Input[builtins.str]]):
139
+ pulumi.set(self, "name", value)
140
+
141
+ @property
142
+ @pulumi.getter
143
+ def namespace(self) -> Optional[pulumi.Input[builtins.str]]:
144
+ """
145
+ `(string: <optional>)` - The namespace of the volume. This field
146
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
147
+ environment variable. Defaults to `"default"` if unset.
148
+ """
149
+ return pulumi.get(self, "namespace")
150
+
151
+ @namespace.setter
152
+ def namespace(self, value: Optional[pulumi.Input[builtins.str]]):
153
+ pulumi.set(self, "namespace", value)
154
+
155
+ @property
156
+ @pulumi.getter
157
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
158
+ """
159
+ `(map<string|string>: <optional>)` - A key-value map of strings
160
+ passed directly to the plugin to configure the volume. The details of these
161
+ parameters are specific to the plugin.
162
+
163
+
164
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
165
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
166
+ [volume_source]: /nomad/docs/job-specification/volume#source
167
+ """
168
+ return pulumi.get(self, "parameters")
169
+
170
+ @parameters.setter
171
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]):
172
+ pulumi.set(self, "parameters", value)
173
+
174
+
175
+ @pulumi.input_type
176
+ class _DynamicHostVolumeRegistrationState:
177
+ def __init__(__self__, *,
178
+ capabilities: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]] = None,
179
+ capacity: Optional[pulumi.Input[builtins.str]] = None,
180
+ capacity_bytes: Optional[pulumi.Input[builtins.int]] = None,
181
+ capacity_max_bytes: Optional[pulumi.Input[builtins.int]] = None,
182
+ capacity_min_bytes: Optional[pulumi.Input[builtins.int]] = None,
183
+ constraints: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]] = None,
184
+ host_path: Optional[pulumi.Input[builtins.str]] = None,
185
+ name: Optional[pulumi.Input[builtins.str]] = None,
186
+ namespace: Optional[pulumi.Input[builtins.str]] = None,
187
+ node_id: Optional[pulumi.Input[builtins.str]] = None,
188
+ node_pool: Optional[pulumi.Input[builtins.str]] = None,
189
+ parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None,
190
+ plugin_id: Optional[pulumi.Input[builtins.str]] = None,
191
+ state: Optional[pulumi.Input[builtins.str]] = None):
192
+ """
193
+ Input properties used for looking up and filtering DynamicHostVolumeRegistration resources.
194
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]] capabilities: `(block: <optional>)` - Option for validating the capability of a
195
+ volume. Each capability block has the following attributes:
196
+ :param pulumi.Input[builtins.str] capacity: `(string: <optional>)` - The size of a volume in bytes. Either the
197
+ physical size of a disk or a quota, depending on the plugin. This field must
198
+ be between the `capacity_min` and `capacity_max` values unless they are
199
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
200
+ :param pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]] constraints: Constraints
201
+ :param pulumi.Input[builtins.str] host_path: `(string)` - The path on disk where the volume exists.
202
+ :param pulumi.Input[builtins.str] name: `(string: <required>)` - The name of the volume, which is used as the
203
+ [`volume.source`][volume_source] field in job specifications that claim this
204
+ volume. Host volume names must be unique per node. Names are visible to any
205
+ user with `node:read` ACL, even across namespaces, so they should not be
206
+ treated as sensitive values.
207
+ :param pulumi.Input[builtins.str] namespace: `(string: <optional>)` - The namespace of the volume. This field
208
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
209
+ environment variable. Defaults to `"default"` if unset.
210
+ :param pulumi.Input[builtins.str] node_id: `(string: <required>)` - A specific node where the volume is
211
+ mounted.
212
+ :param pulumi.Input[builtins.str] node_pool: Node pool
213
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] parameters: `(map<string|string>: <optional>)` - A key-value map of strings
214
+ passed directly to the plugin to configure the volume. The details of these
215
+ parameters are specific to the plugin.
216
+
217
+
218
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
219
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
220
+ [volume_source]: /nomad/docs/job-specification/volume#source
221
+ :param pulumi.Input[builtins.str] plugin_id: Plugin ID
222
+ :param pulumi.Input[builtins.str] state: State
223
+ """
224
+ if capabilities is not None:
225
+ pulumi.set(__self__, "capabilities", capabilities)
226
+ if capacity is not None:
227
+ pulumi.set(__self__, "capacity", capacity)
228
+ if capacity_bytes is not None:
229
+ pulumi.set(__self__, "capacity_bytes", capacity_bytes)
230
+ if capacity_max_bytes is not None:
231
+ pulumi.set(__self__, "capacity_max_bytes", capacity_max_bytes)
232
+ if capacity_min_bytes is not None:
233
+ pulumi.set(__self__, "capacity_min_bytes", capacity_min_bytes)
234
+ if constraints is not None:
235
+ pulumi.set(__self__, "constraints", constraints)
236
+ if host_path is not None:
237
+ pulumi.set(__self__, "host_path", host_path)
238
+ if name is not None:
239
+ pulumi.set(__self__, "name", name)
240
+ if namespace is not None:
241
+ pulumi.set(__self__, "namespace", namespace)
242
+ if node_id is not None:
243
+ pulumi.set(__self__, "node_id", node_id)
244
+ if node_pool is not None:
245
+ pulumi.set(__self__, "node_pool", node_pool)
246
+ if parameters is not None:
247
+ pulumi.set(__self__, "parameters", parameters)
248
+ if plugin_id is not None:
249
+ pulumi.set(__self__, "plugin_id", plugin_id)
250
+ if state is not None:
251
+ pulumi.set(__self__, "state", state)
252
+
253
+ @property
254
+ @pulumi.getter
255
+ def capabilities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]]:
256
+ """
257
+ `(block: <optional>)` - Option for validating the capability of a
258
+ volume. Each capability block has the following attributes:
259
+ """
260
+ return pulumi.get(self, "capabilities")
261
+
262
+ @capabilities.setter
263
+ def capabilities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationCapabilityArgs']]]]):
264
+ pulumi.set(self, "capabilities", value)
265
+
266
+ @property
267
+ @pulumi.getter
268
+ def capacity(self) -> Optional[pulumi.Input[builtins.str]]:
269
+ """
270
+ `(string: <optional>)` - The size of a volume in bytes. Either the
271
+ physical size of a disk or a quota, depending on the plugin. This field must
272
+ be between the `capacity_min` and `capacity_max` values unless they are
273
+ omitted. Accepts human-friendly suffixes such as `"100GiB"`.
274
+ """
275
+ return pulumi.get(self, "capacity")
276
+
277
+ @capacity.setter
278
+ def capacity(self, value: Optional[pulumi.Input[builtins.str]]):
279
+ pulumi.set(self, "capacity", value)
280
+
281
+ @property
282
+ @pulumi.getter(name="capacityBytes")
283
+ def capacity_bytes(self) -> Optional[pulumi.Input[builtins.int]]:
284
+ return pulumi.get(self, "capacity_bytes")
285
+
286
+ @capacity_bytes.setter
287
+ def capacity_bytes(self, value: Optional[pulumi.Input[builtins.int]]):
288
+ pulumi.set(self, "capacity_bytes", value)
289
+
290
+ @property
291
+ @pulumi.getter(name="capacityMaxBytes")
292
+ def capacity_max_bytes(self) -> Optional[pulumi.Input[builtins.int]]:
293
+ return pulumi.get(self, "capacity_max_bytes")
294
+
295
+ @capacity_max_bytes.setter
296
+ def capacity_max_bytes(self, value: Optional[pulumi.Input[builtins.int]]):
297
+ pulumi.set(self, "capacity_max_bytes", value)
298
+
299
+ @property
300
+ @pulumi.getter(name="capacityMinBytes")
301
+ def capacity_min_bytes(self) -> Optional[pulumi.Input[builtins.int]]:
302
+ return pulumi.get(self, "capacity_min_bytes")
303
+
304
+ @capacity_min_bytes.setter
305
+ def capacity_min_bytes(self, value: Optional[pulumi.Input[builtins.int]]):
306
+ pulumi.set(self, "capacity_min_bytes", value)
307
+
308
+ @property
309
+ @pulumi.getter
310
+ def constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]]:
311
+ """
312
+ Constraints
313
+ """
314
+ return pulumi.get(self, "constraints")
315
+
316
+ @constraints.setter
317
+ def constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DynamicHostVolumeRegistrationConstraintArgs']]]]):
318
+ pulumi.set(self, "constraints", value)
319
+
320
+ @property
321
+ @pulumi.getter(name="hostPath")
322
+ def host_path(self) -> Optional[pulumi.Input[builtins.str]]:
323
+ """
324
+ `(string)` - The path on disk where the volume exists.
325
+ """
326
+ return pulumi.get(self, "host_path")
327
+
328
+ @host_path.setter
329
+ def host_path(self, value: Optional[pulumi.Input[builtins.str]]):
330
+ pulumi.set(self, "host_path", value)
331
+
332
+ @property
333
+ @pulumi.getter
334
+ def name(self) -> Optional[pulumi.Input[builtins.str]]:
335
+ """
336
+ `(string: <required>)` - The name of the volume, which is used as the
337
+ [`volume.source`][volume_source] field in job specifications that claim this
338
+ volume. Host volume names must be unique per node. Names are visible to any
339
+ user with `node:read` ACL, even across namespaces, so they should not be
340
+ treated as sensitive values.
341
+ """
342
+ return pulumi.get(self, "name")
343
+
344
+ @name.setter
345
+ def name(self, value: Optional[pulumi.Input[builtins.str]]):
346
+ pulumi.set(self, "name", value)
347
+
348
+ @property
349
+ @pulumi.getter
350
+ def namespace(self) -> Optional[pulumi.Input[builtins.str]]:
351
+ """
352
+ `(string: <optional>)` - The namespace of the volume. This field
353
+ overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
354
+ environment variable. Defaults to `"default"` if unset.
355
+ """
356
+ return pulumi.get(self, "namespace")
357
+
358
+ @namespace.setter
359
+ def namespace(self, value: Optional[pulumi.Input[builtins.str]]):
360
+ pulumi.set(self, "namespace", value)
361
+
362
+ @property
363
+ @pulumi.getter(name="nodeId")
364
+ def node_id(self) -> Optional[pulumi.Input[builtins.str]]:
365
+ """
366
+ `(string: <required>)` - A specific node where the volume is
367
+ mounted.
368
+ """
369
+ return pulumi.get(self, "node_id")
370
+
371
+ @node_id.setter
372
+ def node_id(self, value: Optional[pulumi.Input[builtins.str]]):
373
+ pulumi.set(self, "node_id", value)
374
+
375
+ @property
376
+ @pulumi.getter(name="nodePool")
377
+ def node_pool(self) -> Optional[pulumi.Input[builtins.str]]:
378
+ """
379
+ Node pool
380
+ """
381
+ return pulumi.get(self, "node_pool")
382
+
383
+ @node_pool.setter
384
+ def node_pool(self, value: Optional[pulumi.Input[builtins.str]]):
385
+ pulumi.set(self, "node_pool", value)
386
+
387
+ @property
388
+ @pulumi.getter
389
+ def parameters(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
390
+ """
391
+ `(map<string|string>: <optional>)` - A key-value map of strings
392
+ passed directly to the plugin to configure the volume. The details of these
393
+ parameters are specific to the plugin.
394
+
395
+
396
+ [`access_mode`]: /nomad/docs/other-specifications/volume/capability#access_mode
397
+ [`attachment_mode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
398
+ [volume_source]: /nomad/docs/job-specification/volume#source
399
+ """
400
+ return pulumi.get(self, "parameters")
401
+
402
+ @parameters.setter
403
+ def parameters(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]):
404
+ pulumi.set(self, "parameters", value)
405
+
406
+ @property
407
+ @pulumi.getter(name="pluginId")
408
+ def plugin_id(self) -> Optional[pulumi.Input[builtins.str]]:
409
+ """
410
+ Plugin ID
411
+ """
412
+ return pulumi.get(self, "plugin_id")
413
+
414
+ @plugin_id.setter
415
+ def plugin_id(self, value: Optional[pulumi.Input[builtins.str]]):
416
+ pulumi.set(self, "plugin_id", value)
417
+
418
+ @property
419
+ @pulumi.getter
420
+ def state(self) -> Optional[pulumi.Input[builtins.str]]:
421
+ """
422
+ State
423
+ """
424
+ return pulumi.get(self, "state")
425
+
426
+ @state.setter
427
+ def state(self, value: Optional[pulumi.Input[builtins.str]]):
428
+ pulumi.set(self, "state", value)
429
+
430
+
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
+ @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
+ @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
+ @property
641
+ @pulumi.getter(name="capacityBytes")
642
+ def capacity_bytes(self) -> pulumi.Output[builtins.int]:
643
+ return pulumi.get(self, "capacity_bytes")
644
+
645
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @property
734
+ @pulumi.getter
735
+ def state(self) -> pulumi.Output[builtins.str]:
736
+ """
737
+ State
738
+ """
739
+ return pulumi.get(self, "state")
740
+