pulumi-nomad 2.5.0a1744697511__py3-none-any.whl → 2.5.0a1744860632__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.
- pulumi_nomad/__init__.py +19 -0
- pulumi_nomad/_inputs.py +678 -1
- pulumi_nomad/acl_policy.py +14 -7
- pulumi_nomad/config/__init__.pyi +0 -10
- pulumi_nomad/config/vars.py +0 -14
- pulumi_nomad/csi_volume.py +28 -0
- pulumi_nomad/dynamic_host_volume.py +1005 -0
- pulumi_nomad/dynamic_host_volume_registration.py +740 -0
- pulumi_nomad/get_dynamic_host_volume.py +353 -0
- pulumi_nomad/get_volumes.py +2 -2
- pulumi_nomad/job.py +3 -113
- pulumi_nomad/outputs.py +579 -1
- pulumi_nomad/provider.py +1 -59
- pulumi_nomad/pulumi-plugin.json +1 -1
- {pulumi_nomad-2.5.0a1744697511.dist-info → pulumi_nomad-2.5.0a1744860632.dist-info}/METADATA +1 -1
- {pulumi_nomad-2.5.0a1744697511.dist-info → pulumi_nomad-2.5.0a1744860632.dist-info}/RECORD +18 -15
- {pulumi_nomad-2.5.0a1744697511.dist-info → pulumi_nomad-2.5.0a1744860632.dist-info}/WHEEL +0 -0
- {pulumi_nomad-2.5.0a1744697511.dist-info → pulumi_nomad-2.5.0a1744860632.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,353 @@
|
|
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
|
+
|
19
|
+
__all__ = [
|
20
|
+
'GetDynamicHostVolumeResult',
|
21
|
+
'AwaitableGetDynamicHostVolumeResult',
|
22
|
+
'get_dynamic_host_volume',
|
23
|
+
'get_dynamic_host_volume_output',
|
24
|
+
]
|
25
|
+
|
26
|
+
@pulumi.output_type
|
27
|
+
class GetDynamicHostVolumeResult:
|
28
|
+
"""
|
29
|
+
A collection of values returned by getDynamicHostVolume.
|
30
|
+
"""
|
31
|
+
def __init__(__self__, capabilities=None, capacity=None, capacity_bytes=None, capacity_max=None, capacity_max_bytes=None, capacity_min=None, capacity_min_bytes=None, constraints=None, host_path=None, id=None, name=None, namespace=None, node_id=None, node_pool=None, parameters=None, plugin_id=None, state=None):
|
32
|
+
if capabilities and not isinstance(capabilities, list):
|
33
|
+
raise TypeError("Expected argument 'capabilities' to be a list")
|
34
|
+
pulumi.set(__self__, "capabilities", capabilities)
|
35
|
+
if capacity and not isinstance(capacity, str):
|
36
|
+
raise TypeError("Expected argument 'capacity' to be a str")
|
37
|
+
pulumi.set(__self__, "capacity", capacity)
|
38
|
+
if capacity_bytes and not isinstance(capacity_bytes, int):
|
39
|
+
raise TypeError("Expected argument 'capacity_bytes' to be a int")
|
40
|
+
pulumi.set(__self__, "capacity_bytes", capacity_bytes)
|
41
|
+
if capacity_max and not isinstance(capacity_max, str):
|
42
|
+
raise TypeError("Expected argument 'capacity_max' to be a str")
|
43
|
+
pulumi.set(__self__, "capacity_max", capacity_max)
|
44
|
+
if capacity_max_bytes and not isinstance(capacity_max_bytes, int):
|
45
|
+
raise TypeError("Expected argument 'capacity_max_bytes' to be a int")
|
46
|
+
pulumi.set(__self__, "capacity_max_bytes", capacity_max_bytes)
|
47
|
+
if capacity_min and not isinstance(capacity_min, str):
|
48
|
+
raise TypeError("Expected argument 'capacity_min' to be a str")
|
49
|
+
pulumi.set(__self__, "capacity_min", capacity_min)
|
50
|
+
if capacity_min_bytes and not isinstance(capacity_min_bytes, int):
|
51
|
+
raise TypeError("Expected argument 'capacity_min_bytes' to be a int")
|
52
|
+
pulumi.set(__self__, "capacity_min_bytes", capacity_min_bytes)
|
53
|
+
if constraints and not isinstance(constraints, list):
|
54
|
+
raise TypeError("Expected argument 'constraints' to be a list")
|
55
|
+
pulumi.set(__self__, "constraints", constraints)
|
56
|
+
if host_path and not isinstance(host_path, str):
|
57
|
+
raise TypeError("Expected argument 'host_path' to be a str")
|
58
|
+
pulumi.set(__self__, "host_path", host_path)
|
59
|
+
if id and not isinstance(id, str):
|
60
|
+
raise TypeError("Expected argument 'id' to be a str")
|
61
|
+
pulumi.set(__self__, "id", id)
|
62
|
+
if name and not isinstance(name, str):
|
63
|
+
raise TypeError("Expected argument 'name' to be a str")
|
64
|
+
pulumi.set(__self__, "name", name)
|
65
|
+
if namespace and not isinstance(namespace, str):
|
66
|
+
raise TypeError("Expected argument 'namespace' to be a str")
|
67
|
+
pulumi.set(__self__, "namespace", namespace)
|
68
|
+
if node_id and not isinstance(node_id, str):
|
69
|
+
raise TypeError("Expected argument 'node_id' to be a str")
|
70
|
+
pulumi.set(__self__, "node_id", node_id)
|
71
|
+
if node_pool and not isinstance(node_pool, str):
|
72
|
+
raise TypeError("Expected argument 'node_pool' to be a str")
|
73
|
+
pulumi.set(__self__, "node_pool", node_pool)
|
74
|
+
if parameters and not isinstance(parameters, dict):
|
75
|
+
raise TypeError("Expected argument 'parameters' to be a dict")
|
76
|
+
pulumi.set(__self__, "parameters", parameters)
|
77
|
+
if plugin_id and not isinstance(plugin_id, str):
|
78
|
+
raise TypeError("Expected argument 'plugin_id' to be a str")
|
79
|
+
pulumi.set(__self__, "plugin_id", plugin_id)
|
80
|
+
if state and not isinstance(state, str):
|
81
|
+
raise TypeError("Expected argument 'state' to be a str")
|
82
|
+
pulumi.set(__self__, "state", state)
|
83
|
+
|
84
|
+
@property
|
85
|
+
@pulumi.getter
|
86
|
+
def capabilities(self) -> Sequence['outputs.GetDynamicHostVolumeCapabilityResult']:
|
87
|
+
"""
|
88
|
+
`(block)` - Option for validating the capability of a
|
89
|
+
volume. Each capability block has the following attributes:
|
90
|
+
"""
|
91
|
+
return pulumi.get(self, "capabilities")
|
92
|
+
|
93
|
+
@property
|
94
|
+
@pulumi.getter
|
95
|
+
def capacity(self) -> builtins.str:
|
96
|
+
"""
|
97
|
+
`(string)` - The size of the volume, in human-friendly format
|
98
|
+
(ex. 10 GiB)
|
99
|
+
"""
|
100
|
+
return pulumi.get(self, "capacity")
|
101
|
+
|
102
|
+
@property
|
103
|
+
@pulumi.getter(name="capacityBytes")
|
104
|
+
def capacity_bytes(self) -> builtins.int:
|
105
|
+
"""
|
106
|
+
`(int)` - The size of the volume, in bytes.
|
107
|
+
"""
|
108
|
+
return pulumi.get(self, "capacity_bytes")
|
109
|
+
|
110
|
+
@property
|
111
|
+
@pulumi.getter(name="capacityMax")
|
112
|
+
def capacity_max(self) -> builtins.str:
|
113
|
+
"""
|
114
|
+
`(string)` - The requested maximum capacity of the volume, in
|
115
|
+
human-friendly format (ex. 10 GiB).
|
116
|
+
"""
|
117
|
+
return pulumi.get(self, "capacity_max")
|
118
|
+
|
119
|
+
@property
|
120
|
+
@pulumi.getter(name="capacityMaxBytes")
|
121
|
+
def capacity_max_bytes(self) -> builtins.int:
|
122
|
+
"""
|
123
|
+
`(string)` - The requested maximum capacity of the
|
124
|
+
volume, in bytes.
|
125
|
+
"""
|
126
|
+
return pulumi.get(self, "capacity_max_bytes")
|
127
|
+
|
128
|
+
@property
|
129
|
+
@pulumi.getter(name="capacityMin")
|
130
|
+
def capacity_min(self) -> builtins.str:
|
131
|
+
"""
|
132
|
+
`(string)` - The requested minimum capacity of the volume, in
|
133
|
+
human-friendly format (ex. 10 GiB).
|
134
|
+
"""
|
135
|
+
return pulumi.get(self, "capacity_min")
|
136
|
+
|
137
|
+
@property
|
138
|
+
@pulumi.getter(name="capacityMinBytes")
|
139
|
+
def capacity_min_bytes(self) -> builtins.int:
|
140
|
+
"""
|
141
|
+
`(string)` - The requested minimum capacity of the
|
142
|
+
volume, in bytes.
|
143
|
+
"""
|
144
|
+
return pulumi.get(self, "capacity_min_bytes")
|
145
|
+
|
146
|
+
@property
|
147
|
+
@pulumi.getter
|
148
|
+
def constraints(self) -> Sequence['outputs.GetDynamicHostVolumeConstraintResult']:
|
149
|
+
"""
|
150
|
+
`(block)` - The restrictions used to place the volume on a node,
|
151
|
+
similar to the [`constraint`][] block on a Nomad job specification. A volume
|
152
|
+
may have multiple `constraint` blocks. Each constraint block has the following
|
153
|
+
attributes.
|
154
|
+
"""
|
155
|
+
return pulumi.get(self, "constraints")
|
156
|
+
|
157
|
+
@property
|
158
|
+
@pulumi.getter(name="hostPath")
|
159
|
+
def host_path(self) -> builtins.str:
|
160
|
+
"""
|
161
|
+
`(string)` - The path on disk where the volume exists.
|
162
|
+
"""
|
163
|
+
return pulumi.get(self, "host_path")
|
164
|
+
|
165
|
+
@property
|
166
|
+
@pulumi.getter
|
167
|
+
def id(self) -> builtins.str:
|
168
|
+
return pulumi.get(self, "id")
|
169
|
+
|
170
|
+
@property
|
171
|
+
@pulumi.getter
|
172
|
+
def name(self) -> builtins.str:
|
173
|
+
"""
|
174
|
+
`(string)` - The name of the volume, which is used as the
|
175
|
+
[`volume.source`][volume_source] field in job specifications that claim this
|
176
|
+
volume. Host volume names are be unique per node. Names are visible to any
|
177
|
+
user with `node:read` ACL, even across namespaces, so they should not be
|
178
|
+
treated as sensitive values.
|
179
|
+
"""
|
180
|
+
return pulumi.get(self, "name")
|
181
|
+
|
182
|
+
@property
|
183
|
+
@pulumi.getter
|
184
|
+
def namespace(self) -> Optional[builtins.str]:
|
185
|
+
"""
|
186
|
+
`(string)` - The namespace of the volume.
|
187
|
+
"""
|
188
|
+
return pulumi.get(self, "namespace")
|
189
|
+
|
190
|
+
@property
|
191
|
+
@pulumi.getter(name="nodeId")
|
192
|
+
def node_id(self) -> builtins.str:
|
193
|
+
"""
|
194
|
+
`(string)` - A specific node where the volume is mounted.
|
195
|
+
"""
|
196
|
+
return pulumi.get(self, "node_id")
|
197
|
+
|
198
|
+
@property
|
199
|
+
@pulumi.getter(name="nodePool")
|
200
|
+
def node_pool(self) -> builtins.str:
|
201
|
+
"""
|
202
|
+
`(string: <optional>)` - The node pool of the node where the
|
203
|
+
volume is mounted.
|
204
|
+
"""
|
205
|
+
return pulumi.get(self, "node_pool")
|
206
|
+
|
207
|
+
@property
|
208
|
+
@pulumi.getter
|
209
|
+
def parameters(self) -> Mapping[str, builtins.str]:
|
210
|
+
"""
|
211
|
+
`(map<string|string>)` - A key-value map of strings
|
212
|
+
passed directly to the plugin to configure the volume. The details of these
|
213
|
+
parameters are specific to the plugin.
|
214
|
+
"""
|
215
|
+
return pulumi.get(self, "parameters")
|
216
|
+
|
217
|
+
@property
|
218
|
+
@pulumi.getter(name="pluginId")
|
219
|
+
def plugin_id(self) -> builtins.str:
|
220
|
+
"""
|
221
|
+
`(string: <required>)` - The ID of the [dynamic host volume
|
222
|
+
plugin][dhv_plugin] that manages this volume.
|
223
|
+
"""
|
224
|
+
return pulumi.get(self, "plugin_id")
|
225
|
+
|
226
|
+
@property
|
227
|
+
@pulumi.getter
|
228
|
+
def state(self) -> builtins.str:
|
229
|
+
return pulumi.get(self, "state")
|
230
|
+
|
231
|
+
|
232
|
+
class AwaitableGetDynamicHostVolumeResult(GetDynamicHostVolumeResult):
|
233
|
+
# pylint: disable=using-constant-test
|
234
|
+
def __await__(self):
|
235
|
+
if False:
|
236
|
+
yield self
|
237
|
+
return GetDynamicHostVolumeResult(
|
238
|
+
capabilities=self.capabilities,
|
239
|
+
capacity=self.capacity,
|
240
|
+
capacity_bytes=self.capacity_bytes,
|
241
|
+
capacity_max=self.capacity_max,
|
242
|
+
capacity_max_bytes=self.capacity_max_bytes,
|
243
|
+
capacity_min=self.capacity_min,
|
244
|
+
capacity_min_bytes=self.capacity_min_bytes,
|
245
|
+
constraints=self.constraints,
|
246
|
+
host_path=self.host_path,
|
247
|
+
id=self.id,
|
248
|
+
name=self.name,
|
249
|
+
namespace=self.namespace,
|
250
|
+
node_id=self.node_id,
|
251
|
+
node_pool=self.node_pool,
|
252
|
+
parameters=self.parameters,
|
253
|
+
plugin_id=self.plugin_id,
|
254
|
+
state=self.state)
|
255
|
+
|
256
|
+
|
257
|
+
def get_dynamic_host_volume(id: Optional[builtins.str] = None,
|
258
|
+
namespace: Optional[builtins.str] = None,
|
259
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDynamicHostVolumeResult:
|
260
|
+
"""
|
261
|
+
Get information on a dynamic host volume from Nomad.
|
262
|
+
|
263
|
+
## Example Usage
|
264
|
+
|
265
|
+
Check for the existing of a host volume:
|
266
|
+
|
267
|
+
```python
|
268
|
+
import pulumi
|
269
|
+
import pulumi_nomad as nomad
|
270
|
+
|
271
|
+
example = nomad.get_dynamic_host_volume(namespace="prod",
|
272
|
+
id="d688ff7a-d299-11ef-ae3c-6f2400953c18")
|
273
|
+
```
|
274
|
+
|
275
|
+
This will check for a dynamic host volume with the ID
|
276
|
+
`d688ff7a-d299-11ef-ae3c-6f2400953c18`.
|
277
|
+
|
278
|
+
|
279
|
+
:param builtins.str id: `(string)` - the ID of the volume
|
280
|
+
:param builtins.str namespace: `(string)` - the namespace of the volume. Defaults to `"default"`
|
281
|
+
"""
|
282
|
+
__args__ = dict()
|
283
|
+
__args__['id'] = id
|
284
|
+
__args__['namespace'] = namespace
|
285
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
286
|
+
__ret__ = pulumi.runtime.invoke('nomad:index/getDynamicHostVolume:getDynamicHostVolume', __args__, opts=opts, typ=GetDynamicHostVolumeResult).value
|
287
|
+
|
288
|
+
return AwaitableGetDynamicHostVolumeResult(
|
289
|
+
capabilities=pulumi.get(__ret__, 'capabilities'),
|
290
|
+
capacity=pulumi.get(__ret__, 'capacity'),
|
291
|
+
capacity_bytes=pulumi.get(__ret__, 'capacity_bytes'),
|
292
|
+
capacity_max=pulumi.get(__ret__, 'capacity_max'),
|
293
|
+
capacity_max_bytes=pulumi.get(__ret__, 'capacity_max_bytes'),
|
294
|
+
capacity_min=pulumi.get(__ret__, 'capacity_min'),
|
295
|
+
capacity_min_bytes=pulumi.get(__ret__, 'capacity_min_bytes'),
|
296
|
+
constraints=pulumi.get(__ret__, 'constraints'),
|
297
|
+
host_path=pulumi.get(__ret__, 'host_path'),
|
298
|
+
id=pulumi.get(__ret__, 'id'),
|
299
|
+
name=pulumi.get(__ret__, 'name'),
|
300
|
+
namespace=pulumi.get(__ret__, 'namespace'),
|
301
|
+
node_id=pulumi.get(__ret__, 'node_id'),
|
302
|
+
node_pool=pulumi.get(__ret__, 'node_pool'),
|
303
|
+
parameters=pulumi.get(__ret__, 'parameters'),
|
304
|
+
plugin_id=pulumi.get(__ret__, 'plugin_id'),
|
305
|
+
state=pulumi.get(__ret__, 'state'))
|
306
|
+
def get_dynamic_host_volume_output(id: Optional[pulumi.Input[builtins.str]] = None,
|
307
|
+
namespace: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
308
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDynamicHostVolumeResult]:
|
309
|
+
"""
|
310
|
+
Get information on a dynamic host volume from Nomad.
|
311
|
+
|
312
|
+
## Example Usage
|
313
|
+
|
314
|
+
Check for the existing of a host volume:
|
315
|
+
|
316
|
+
```python
|
317
|
+
import pulumi
|
318
|
+
import pulumi_nomad as nomad
|
319
|
+
|
320
|
+
example = nomad.get_dynamic_host_volume(namespace="prod",
|
321
|
+
id="d688ff7a-d299-11ef-ae3c-6f2400953c18")
|
322
|
+
```
|
323
|
+
|
324
|
+
This will check for a dynamic host volume with the ID
|
325
|
+
`d688ff7a-d299-11ef-ae3c-6f2400953c18`.
|
326
|
+
|
327
|
+
|
328
|
+
:param builtins.str id: `(string)` - the ID of the volume
|
329
|
+
:param builtins.str namespace: `(string)` - the namespace of the volume. Defaults to `"default"`
|
330
|
+
"""
|
331
|
+
__args__ = dict()
|
332
|
+
__args__['id'] = id
|
333
|
+
__args__['namespace'] = namespace
|
334
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
335
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getDynamicHostVolume:getDynamicHostVolume', __args__, opts=opts, typ=GetDynamicHostVolumeResult)
|
336
|
+
return __ret__.apply(lambda __response__: GetDynamicHostVolumeResult(
|
337
|
+
capabilities=pulumi.get(__response__, 'capabilities'),
|
338
|
+
capacity=pulumi.get(__response__, 'capacity'),
|
339
|
+
capacity_bytes=pulumi.get(__response__, 'capacity_bytes'),
|
340
|
+
capacity_max=pulumi.get(__response__, 'capacity_max'),
|
341
|
+
capacity_max_bytes=pulumi.get(__response__, 'capacity_max_bytes'),
|
342
|
+
capacity_min=pulumi.get(__response__, 'capacity_min'),
|
343
|
+
capacity_min_bytes=pulumi.get(__response__, 'capacity_min_bytes'),
|
344
|
+
constraints=pulumi.get(__response__, 'constraints'),
|
345
|
+
host_path=pulumi.get(__response__, 'host_path'),
|
346
|
+
id=pulumi.get(__response__, 'id'),
|
347
|
+
name=pulumi.get(__response__, 'name'),
|
348
|
+
namespace=pulumi.get(__response__, 'namespace'),
|
349
|
+
node_id=pulumi.get(__response__, 'node_id'),
|
350
|
+
node_pool=pulumi.get(__response__, 'node_pool'),
|
351
|
+
parameters=pulumi.get(__response__, 'parameters'),
|
352
|
+
plugin_id=pulumi.get(__response__, 'plugin_id'),
|
353
|
+
state=pulumi.get(__response__, 'state')))
|
pulumi_nomad/get_volumes.py
CHANGED
@@ -122,7 +122,7 @@ def get_volumes(namespace: Optional[builtins.str] = None,
|
|
122
122
|
:param builtins.str namespace: `(string: "default")` Nomad namespace.
|
123
123
|
:param builtins.str node_id: `(string: optional)` Volume node filter.
|
124
124
|
:param builtins.str plugin_id: `(string: optional)` Plugin ID filter.
|
125
|
-
:param builtins.str type: `(string: "csi")` Volume type (
|
125
|
+
:param builtins.str type: `(string: "csi")` Volume type (one of `csi` or `host`)
|
126
126
|
"""
|
127
127
|
__args__ = dict()
|
128
128
|
__args__['namespace'] = namespace
|
@@ -160,7 +160,7 @@ def get_volumes_output(namespace: Optional[pulumi.Input[Optional[builtins.str]]]
|
|
160
160
|
:param builtins.str namespace: `(string: "default")` Nomad namespace.
|
161
161
|
:param builtins.str node_id: `(string: optional)` Volume node filter.
|
162
162
|
:param builtins.str plugin_id: `(string: optional)` Plugin ID filter.
|
163
|
-
:param builtins.str type: `(string: "csi")` Volume type (
|
163
|
+
:param builtins.str type: `(string: "csi")` Volume type (one of `csi` or `host`)
|
164
164
|
"""
|
165
165
|
__args__ = dict()
|
166
166
|
__args__['namespace'] = namespace
|