pulumi-nomad 2.3.0a1710649436__py3-none-any.whl → 2.5.0a1736834448__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 +1 -0
- pulumi_nomad/_inputs.py +896 -175
- pulumi_nomad/_utilities.py +41 -5
- pulumi_nomad/acl_auth_method.py +44 -41
- pulumi_nomad/acl_binding_rule.py +5 -0
- pulumi_nomad/acl_policy.py +10 -69
- pulumi_nomad/acl_role.py +10 -5
- pulumi_nomad/acl_token.py +28 -31
- pulumi_nomad/config/__init__.pyi +5 -0
- pulumi_nomad/config/outputs.py +5 -0
- pulumi_nomad/config/vars.py +5 -0
- pulumi_nomad/csi_volume.py +21 -88
- pulumi_nomad/csi_volume_registration.py +21 -88
- pulumi_nomad/external_volume.py +65 -132
- pulumi_nomad/get_acl_policies.py +14 -9
- pulumi_nomad/get_acl_policy.py +15 -9
- pulumi_nomad/get_acl_role.py +15 -9
- pulumi_nomad/get_acl_roles.py +14 -9
- pulumi_nomad/get_acl_token.py +22 -9
- pulumi_nomad/get_acl_tokens.py +14 -9
- pulumi_nomad/get_allocations.py +18 -9
- pulumi_nomad/get_datacenters.py +20 -13
- pulumi_nomad/get_deployments.py +18 -10
- pulumi_nomad/get_job.py +34 -9
- pulumi_nomad/get_job_parser.py +16 -29
- pulumi_nomad/get_jwks.py +124 -0
- pulumi_nomad/get_namespace.py +18 -9
- pulumi_nomad/get_namespaces.py +14 -9
- pulumi_nomad/get_node_pool.py +16 -9
- pulumi_nomad/get_node_pools.py +16 -9
- pulumi_nomad/get_plugin.py +25 -9
- pulumi_nomad/get_plugins.py +15 -10
- pulumi_nomad/get_regions.py +46 -5
- pulumi_nomad/get_scaling_policies.py +16 -9
- pulumi_nomad/get_scaling_policy.py +19 -10
- pulumi_nomad/get_scheduler_policy.py +14 -9
- pulumi_nomad/get_variable.py +17 -10
- pulumi_nomad/get_volumes.py +21 -10
- pulumi_nomad/job.py +22 -88
- pulumi_nomad/namespace.py +43 -40
- pulumi_nomad/node_pool.py +12 -9
- pulumi_nomad/outputs.py +293 -165
- pulumi_nomad/provider.py +8 -3
- pulumi_nomad/pulumi-plugin.json +2 -1
- pulumi_nomad/quote_specification.py +28 -25
- pulumi_nomad/scheduler_config.py +11 -10
- pulumi_nomad/sentinel_policy.py +11 -10
- pulumi_nomad/variable.py +33 -32
- pulumi_nomad/volume.py +73 -152
- {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/METADATA +7 -6
- pulumi_nomad-2.5.0a1736834448.dist-info/RECORD +55 -0
- {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/WHEEL +1 -1
- pulumi_nomad-2.3.0a1710649436.dist-info/RECORD +0 -54
- {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/top_level.txt +0 -0
pulumi_nomad/provider.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
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
|
10
15
|
from . import _utilities
|
11
16
|
from ._inputs import *
|
12
17
|
|
@@ -270,7 +275,7 @@ class Provider(pulumi.ProviderResource):
|
|
270
275
|
cert_file: Optional[pulumi.Input[str]] = None,
|
271
276
|
cert_pem: Optional[pulumi.Input[str]] = None,
|
272
277
|
consul_token: Optional[pulumi.Input[str]] = None,
|
273
|
-
headers: Optional[pulumi.Input[Sequence[pulumi.Input[
|
278
|
+
headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
|
274
279
|
http_auth: Optional[pulumi.Input[str]] = None,
|
275
280
|
ignore_env_vars: Optional[pulumi.Input[Mapping[str, pulumi.Input[bool]]]] = None,
|
276
281
|
key_file: Optional[pulumi.Input[str]] = None,
|
@@ -294,7 +299,7 @@ class Provider(pulumi.ProviderResource):
|
|
294
299
|
:param pulumi.Input[str] cert_file: A path to a PEM-encoded certificate provided to the remote agent; requires use of key_file or key_pem.
|
295
300
|
:param pulumi.Input[str] cert_pem: PEM-encoded certificate provided to the remote agent; requires use of key_file or key_pem.
|
296
301
|
:param pulumi.Input[str] consul_token: Consul token to validate Consul Connect Service Identity policies specified in the job file.
|
297
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
302
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]] headers: The headers to send with each Nomad request.
|
298
303
|
:param pulumi.Input[str] http_auth: HTTP basic auth configuration.
|
299
304
|
:param pulumi.Input[Mapping[str, pulumi.Input[bool]]] ignore_env_vars: A set of environment variables that are ignored by the provider when configuring the Nomad API client.
|
300
305
|
:param pulumi.Input[str] key_file: A path to a PEM-encoded private key, required if cert_file or cert_pem is specified.
|
@@ -337,7 +342,7 @@ class Provider(pulumi.ProviderResource):
|
|
337
342
|
cert_file: Optional[pulumi.Input[str]] = None,
|
338
343
|
cert_pem: Optional[pulumi.Input[str]] = None,
|
339
344
|
consul_token: Optional[pulumi.Input[str]] = None,
|
340
|
-
headers: Optional[pulumi.Input[Sequence[pulumi.Input[
|
345
|
+
headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
|
341
346
|
http_auth: Optional[pulumi.Input[str]] = None,
|
342
347
|
ignore_env_vars: Optional[pulumi.Input[Mapping[str, pulumi.Input[bool]]]] = None,
|
343
348
|
key_file: Optional[pulumi.Input[str]] = None,
|
pulumi_nomad/pulumi-plugin.json
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
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
|
10
15
|
from . import _utilities
|
11
16
|
from . import outputs
|
12
17
|
from ._inputs import *
|
@@ -134,7 +139,7 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
134
139
|
resource_name: str,
|
135
140
|
opts: Optional[pulumi.ResourceOptions] = None,
|
136
141
|
description: Optional[pulumi.Input[str]] = None,
|
137
|
-
limits: Optional[pulumi.Input[Sequence[pulumi.Input[
|
142
|
+
limits: Optional[pulumi.Input[Sequence[pulumi.Input[Union['QuoteSpecificationLimitArgs', 'QuoteSpecificationLimitArgsDict']]]]] = None,
|
138
143
|
name: Optional[pulumi.Input[str]] = None,
|
139
144
|
__props__=None):
|
140
145
|
"""
|
@@ -144,27 +149,26 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
144
149
|
|
145
150
|
Registering a quota specification:
|
146
151
|
|
147
|
-
<!--Start PulumiCodeChooser -->
|
148
152
|
```python
|
149
153
|
import pulumi
|
150
154
|
import pulumi_nomad as nomad
|
151
155
|
|
152
|
-
prod_api = nomad.QuoteSpecification("
|
156
|
+
prod_api = nomad.QuoteSpecification("prod_api",
|
157
|
+
name="prod-api",
|
153
158
|
description="Production instances of backend API servers",
|
154
|
-
limits=[
|
155
|
-
region
|
156
|
-
region_limit
|
157
|
-
cpu
|
158
|
-
memory_mb
|
159
|
-
|
160
|
-
|
159
|
+
limits=[{
|
160
|
+
"region": "global",
|
161
|
+
"region_limit": {
|
162
|
+
"cpu": 2400,
|
163
|
+
"memory_mb": 1200,
|
164
|
+
},
|
165
|
+
}])
|
161
166
|
```
|
162
|
-
<!--End PulumiCodeChooser -->
|
163
167
|
|
164
168
|
:param str resource_name: The name of the resource.
|
165
169
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
166
170
|
:param pulumi.Input[str] description: `(string: "")` - A description of the quota specification.
|
167
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
171
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['QuoteSpecificationLimitArgs', 'QuoteSpecificationLimitArgsDict']]]] limits: `(block: <required>)` - A block of quota limits to enforce. Can
|
168
172
|
be repeated. See below for the structure of this block.
|
169
173
|
:param pulumi.Input[str] name: `(string: <required>)` - A unique name for the quota specification.
|
170
174
|
"""
|
@@ -181,22 +185,21 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
181
185
|
|
182
186
|
Registering a quota specification:
|
183
187
|
|
184
|
-
<!--Start PulumiCodeChooser -->
|
185
188
|
```python
|
186
189
|
import pulumi
|
187
190
|
import pulumi_nomad as nomad
|
188
191
|
|
189
|
-
prod_api = nomad.QuoteSpecification("
|
192
|
+
prod_api = nomad.QuoteSpecification("prod_api",
|
193
|
+
name="prod-api",
|
190
194
|
description="Production instances of backend API servers",
|
191
|
-
limits=[
|
192
|
-
region
|
193
|
-
region_limit
|
194
|
-
cpu
|
195
|
-
memory_mb
|
196
|
-
|
197
|
-
|
195
|
+
limits=[{
|
196
|
+
"region": "global",
|
197
|
+
"region_limit": {
|
198
|
+
"cpu": 2400,
|
199
|
+
"memory_mb": 1200,
|
200
|
+
},
|
201
|
+
}])
|
198
202
|
```
|
199
|
-
<!--End PulumiCodeChooser -->
|
200
203
|
|
201
204
|
:param str resource_name: The name of the resource.
|
202
205
|
:param QuoteSpecificationArgs args: The arguments to use to populate this resource's properties.
|
@@ -214,7 +217,7 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
214
217
|
resource_name: str,
|
215
218
|
opts: Optional[pulumi.ResourceOptions] = None,
|
216
219
|
description: Optional[pulumi.Input[str]] = None,
|
217
|
-
limits: Optional[pulumi.Input[Sequence[pulumi.Input[
|
220
|
+
limits: Optional[pulumi.Input[Sequence[pulumi.Input[Union['QuoteSpecificationLimitArgs', 'QuoteSpecificationLimitArgsDict']]]]] = None,
|
218
221
|
name: Optional[pulumi.Input[str]] = None,
|
219
222
|
__props__=None):
|
220
223
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
@@ -241,7 +244,7 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
241
244
|
id: pulumi.Input[str],
|
242
245
|
opts: Optional[pulumi.ResourceOptions] = None,
|
243
246
|
description: Optional[pulumi.Input[str]] = None,
|
244
|
-
limits: Optional[pulumi.Input[Sequence[pulumi.Input[
|
247
|
+
limits: Optional[pulumi.Input[Sequence[pulumi.Input[Union['QuoteSpecificationLimitArgs', 'QuoteSpecificationLimitArgsDict']]]]] = None,
|
245
248
|
name: Optional[pulumi.Input[str]] = None) -> 'QuoteSpecification':
|
246
249
|
"""
|
247
250
|
Get an existing QuoteSpecification resource's state with the given name, id, and optional extra
|
@@ -251,7 +254,7 @@ class QuoteSpecification(pulumi.CustomResource):
|
|
251
254
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
252
255
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
253
256
|
:param pulumi.Input[str] description: `(string: "")` - A description of the quota specification.
|
254
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
257
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['QuoteSpecificationLimitArgs', 'QuoteSpecificationLimitArgsDict']]]] limits: `(block: <required>)` - A block of quota limits to enforce. Can
|
255
258
|
be repeated. See below for the structure of this block.
|
256
259
|
:param pulumi.Input[str] name: `(string: <required>)` - A unique name for the quota specification.
|
257
260
|
"""
|
pulumi_nomad/scheduler_config.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
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
|
10
15
|
from . import _utilities
|
11
16
|
|
12
17
|
__all__ = ['SchedulerConfigArgs', 'SchedulerConfig']
|
@@ -144,22 +149,20 @@ class SchedulerConfig(pulumi.CustomResource):
|
|
144
149
|
|
145
150
|
Set cluster scheduler configuration:
|
146
151
|
|
147
|
-
<!--Start PulumiCodeChooser -->
|
148
152
|
```python
|
149
153
|
import pulumi
|
150
154
|
import pulumi_nomad as nomad
|
151
155
|
|
152
156
|
config = nomad.SchedulerConfig("config",
|
157
|
+
scheduler_algorithm="spread",
|
153
158
|
memory_oversubscription_enabled=True,
|
154
159
|
preemption_config={
|
160
|
+
"system_scheduler_enabled": True,
|
155
161
|
"batch_scheduler_enabled": True,
|
156
162
|
"service_scheduler_enabled": True,
|
157
163
|
"sysbatch_scheduler_enabled": True,
|
158
|
-
|
159
|
-
},
|
160
|
-
scheduler_algorithm="spread")
|
164
|
+
})
|
161
165
|
```
|
162
|
-
<!--End PulumiCodeChooser -->
|
163
166
|
|
164
167
|
:param str resource_name: The name of the resource.
|
165
168
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
@@ -185,22 +188,20 @@ class SchedulerConfig(pulumi.CustomResource):
|
|
185
188
|
|
186
189
|
Set cluster scheduler configuration:
|
187
190
|
|
188
|
-
<!--Start PulumiCodeChooser -->
|
189
191
|
```python
|
190
192
|
import pulumi
|
191
193
|
import pulumi_nomad as nomad
|
192
194
|
|
193
195
|
config = nomad.SchedulerConfig("config",
|
196
|
+
scheduler_algorithm="spread",
|
194
197
|
memory_oversubscription_enabled=True,
|
195
198
|
preemption_config={
|
199
|
+
"system_scheduler_enabled": True,
|
196
200
|
"batch_scheduler_enabled": True,
|
197
201
|
"service_scheduler_enabled": True,
|
198
202
|
"sysbatch_scheduler_enabled": True,
|
199
|
-
|
200
|
-
},
|
201
|
-
scheduler_algorithm="spread")
|
203
|
+
})
|
202
204
|
```
|
203
|
-
<!--End PulumiCodeChooser -->
|
204
205
|
|
205
206
|
:param str resource_name: The name of the resource.
|
206
207
|
:param SchedulerConfigArgs args: The arguments to use to populate this resource's properties.
|
pulumi_nomad/sentinel_policy.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
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
|
10
15
|
from . import _utilities
|
11
16
|
|
12
17
|
__all__ = ['SentinelPolicyArgs', 'SentinelPolicy']
|
@@ -219,14 +224,13 @@ class SentinelPolicy(pulumi.CustomResource):
|
|
219
224
|
|
220
225
|
## Example Usage
|
221
226
|
|
222
|
-
<!--Start PulumiCodeChooser -->
|
223
227
|
```python
|
224
228
|
import pulumi
|
225
229
|
import pulumi_nomad as nomad
|
226
230
|
|
227
231
|
exec_only = nomad.SentinelPolicy("exec-only",
|
232
|
+
name="exec-only",
|
228
233
|
description="Only allow jobs that are based on an exec driver.",
|
229
|
-
enforcement_level="soft-mandatory",
|
230
234
|
policy=\"\"\"main = rule { all_drivers_exec }
|
231
235
|
|
232
236
|
# all_drivers_exec checks that all the drivers in use are exec
|
@@ -237,11 +241,10 @@ class SentinelPolicy(pulumi.CustomResource):
|
|
237
241
|
}
|
238
242
|
}
|
239
243
|
}
|
240
|
-
|
241
244
|
\"\"\",
|
242
|
-
scope="submit-job"
|
245
|
+
scope="submit-job",
|
246
|
+
enforcement_level="soft-mandatory")
|
243
247
|
```
|
244
|
-
<!--End PulumiCodeChooser -->
|
245
248
|
|
246
249
|
:param str resource_name: The name of the resource.
|
247
250
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
@@ -269,14 +272,13 @@ class SentinelPolicy(pulumi.CustomResource):
|
|
269
272
|
|
270
273
|
## Example Usage
|
271
274
|
|
272
|
-
<!--Start PulumiCodeChooser -->
|
273
275
|
```python
|
274
276
|
import pulumi
|
275
277
|
import pulumi_nomad as nomad
|
276
278
|
|
277
279
|
exec_only = nomad.SentinelPolicy("exec-only",
|
280
|
+
name="exec-only",
|
278
281
|
description="Only allow jobs that are based on an exec driver.",
|
279
|
-
enforcement_level="soft-mandatory",
|
280
282
|
policy=\"\"\"main = rule { all_drivers_exec }
|
281
283
|
|
282
284
|
# all_drivers_exec checks that all the drivers in use are exec
|
@@ -287,11 +289,10 @@ class SentinelPolicy(pulumi.CustomResource):
|
|
287
289
|
}
|
288
290
|
}
|
289
291
|
}
|
290
|
-
|
291
292
|
\"\"\",
|
292
|
-
scope="submit-job"
|
293
|
+
scope="submit-job",
|
294
|
+
enforcement_level="soft-mandatory")
|
293
295
|
```
|
294
|
-
<!--End PulumiCodeChooser -->
|
295
296
|
|
296
297
|
:param str resource_name: The name of the resource.
|
297
298
|
:param SentinelPolicyArgs args: The arguments to use to populate this resource's properties.
|
pulumi_nomad/variable.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
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
|
10
15
|
from . import _utilities
|
11
16
|
|
12
17
|
__all__ = ['VariableArgs', 'Variable']
|
@@ -14,12 +19,12 @@ __all__ = ['VariableArgs', 'Variable']
|
|
14
19
|
@pulumi.input_type
|
15
20
|
class VariableArgs:
|
16
21
|
def __init__(__self__, *,
|
17
|
-
items: pulumi.Input[Mapping[str,
|
22
|
+
items: pulumi.Input[Mapping[str, pulumi.Input[str]]],
|
18
23
|
path: pulumi.Input[str],
|
19
24
|
namespace: Optional[pulumi.Input[str]] = None):
|
20
25
|
"""
|
21
26
|
The set of arguments for constructing a Variable resource.
|
22
|
-
:param pulumi.Input[Mapping[str,
|
27
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] items: `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
23
28
|
:param pulumi.Input[str] path: `(string: <required>)` - A unique path to create the variable at.
|
24
29
|
:param pulumi.Input[str] namespace: `(string: "default")` - The namepsace to create the variable in.
|
25
30
|
"""
|
@@ -30,14 +35,14 @@ class VariableArgs:
|
|
30
35
|
|
31
36
|
@property
|
32
37
|
@pulumi.getter
|
33
|
-
def items(self) -> pulumi.Input[Mapping[str,
|
38
|
+
def items(self) -> pulumi.Input[Mapping[str, pulumi.Input[str]]]:
|
34
39
|
"""
|
35
40
|
`(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
36
41
|
"""
|
37
42
|
return pulumi.get(self, "items")
|
38
43
|
|
39
44
|
@items.setter
|
40
|
-
def items(self, value: pulumi.Input[Mapping[str,
|
45
|
+
def items(self, value: pulumi.Input[Mapping[str, pulumi.Input[str]]]):
|
41
46
|
pulumi.set(self, "items", value)
|
42
47
|
|
43
48
|
@property
|
@@ -68,12 +73,12 @@ class VariableArgs:
|
|
68
73
|
@pulumi.input_type
|
69
74
|
class _VariableState:
|
70
75
|
def __init__(__self__, *,
|
71
|
-
items: Optional[pulumi.Input[Mapping[str,
|
76
|
+
items: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
72
77
|
namespace: Optional[pulumi.Input[str]] = None,
|
73
78
|
path: Optional[pulumi.Input[str]] = None):
|
74
79
|
"""
|
75
80
|
Input properties used for looking up and filtering Variable resources.
|
76
|
-
:param pulumi.Input[Mapping[str,
|
81
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] items: `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
77
82
|
:param pulumi.Input[str] namespace: `(string: "default")` - The namepsace to create the variable in.
|
78
83
|
:param pulumi.Input[str] path: `(string: <required>)` - A unique path to create the variable at.
|
79
84
|
"""
|
@@ -86,14 +91,14 @@ class _VariableState:
|
|
86
91
|
|
87
92
|
@property
|
88
93
|
@pulumi.getter
|
89
|
-
def items(self) -> Optional[pulumi.Input[Mapping[str,
|
94
|
+
def items(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
90
95
|
"""
|
91
96
|
`(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
92
97
|
"""
|
93
98
|
return pulumi.get(self, "items")
|
94
99
|
|
95
100
|
@items.setter
|
96
|
-
def items(self, value: Optional[pulumi.Input[Mapping[str,
|
101
|
+
def items(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
97
102
|
pulumi.set(self, "items", value)
|
98
103
|
|
99
104
|
@property
|
@@ -126,7 +131,7 @@ class Variable(pulumi.CustomResource):
|
|
126
131
|
def __init__(__self__,
|
127
132
|
resource_name: str,
|
128
133
|
opts: Optional[pulumi.ResourceOptions] = None,
|
129
|
-
items: Optional[pulumi.Input[Mapping[str,
|
134
|
+
items: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
130
135
|
namespace: Optional[pulumi.Input[str]] = None,
|
131
136
|
path: Optional[pulumi.Input[str]] = None,
|
132
137
|
__props__=None):
|
@@ -135,39 +140,37 @@ class Variable(pulumi.CustomResource):
|
|
135
140
|
|
136
141
|
Creating a variable in the default namespace:
|
137
142
|
|
138
|
-
<!--Start PulumiCodeChooser -->
|
139
143
|
```python
|
140
144
|
import pulumi
|
141
145
|
import pulumi_nomad as nomad
|
142
146
|
|
143
147
|
example = nomad.Variable("example",
|
148
|
+
path="some/path/of/your/choosing",
|
144
149
|
items={
|
145
150
|
"example_key": "example_value",
|
146
|
-
}
|
147
|
-
path="some/path/of/your/choosing")
|
151
|
+
})
|
148
152
|
```
|
149
|
-
<!--End PulumiCodeChooser -->
|
150
153
|
|
151
154
|
Creating a variable in a custom namespace:
|
152
155
|
|
153
|
-
<!--Start PulumiCodeChooser -->
|
154
156
|
```python
|
155
157
|
import pulumi
|
156
158
|
import pulumi_nomad as nomad
|
157
159
|
|
158
|
-
|
159
|
-
|
160
|
+
example = nomad.Namespace("example",
|
161
|
+
name="example",
|
162
|
+
description="Example namespace.")
|
163
|
+
example_variable = nomad.Variable("example",
|
160
164
|
path="some/path/of/your/choosing",
|
161
|
-
namespace=
|
165
|
+
namespace=example.name,
|
162
166
|
items={
|
163
167
|
"example_key": "example_value",
|
164
168
|
})
|
165
169
|
```
|
166
|
-
<!--End PulumiCodeChooser -->
|
167
170
|
|
168
171
|
:param str resource_name: The name of the resource.
|
169
172
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
170
|
-
:param pulumi.Input[Mapping[str,
|
173
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] items: `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
171
174
|
:param pulumi.Input[str] namespace: `(string: "default")` - The namepsace to create the variable in.
|
172
175
|
:param pulumi.Input[str] path: `(string: <required>)` - A unique path to create the variable at.
|
173
176
|
"""
|
@@ -182,35 +185,33 @@ class Variable(pulumi.CustomResource):
|
|
182
185
|
|
183
186
|
Creating a variable in the default namespace:
|
184
187
|
|
185
|
-
<!--Start PulumiCodeChooser -->
|
186
188
|
```python
|
187
189
|
import pulumi
|
188
190
|
import pulumi_nomad as nomad
|
189
191
|
|
190
192
|
example = nomad.Variable("example",
|
193
|
+
path="some/path/of/your/choosing",
|
191
194
|
items={
|
192
195
|
"example_key": "example_value",
|
193
|
-
}
|
194
|
-
path="some/path/of/your/choosing")
|
196
|
+
})
|
195
197
|
```
|
196
|
-
<!--End PulumiCodeChooser -->
|
197
198
|
|
198
199
|
Creating a variable in a custom namespace:
|
199
200
|
|
200
|
-
<!--Start PulumiCodeChooser -->
|
201
201
|
```python
|
202
202
|
import pulumi
|
203
203
|
import pulumi_nomad as nomad
|
204
204
|
|
205
|
-
|
206
|
-
|
205
|
+
example = nomad.Namespace("example",
|
206
|
+
name="example",
|
207
|
+
description="Example namespace.")
|
208
|
+
example_variable = nomad.Variable("example",
|
207
209
|
path="some/path/of/your/choosing",
|
208
|
-
namespace=
|
210
|
+
namespace=example.name,
|
209
211
|
items={
|
210
212
|
"example_key": "example_value",
|
211
213
|
})
|
212
214
|
```
|
213
|
-
<!--End PulumiCodeChooser -->
|
214
215
|
|
215
216
|
:param str resource_name: The name of the resource.
|
216
217
|
:param VariableArgs args: The arguments to use to populate this resource's properties.
|
@@ -227,7 +228,7 @@ class Variable(pulumi.CustomResource):
|
|
227
228
|
def _internal_init(__self__,
|
228
229
|
resource_name: str,
|
229
230
|
opts: Optional[pulumi.ResourceOptions] = None,
|
230
|
-
items: Optional[pulumi.Input[Mapping[str,
|
231
|
+
items: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
231
232
|
namespace: Optional[pulumi.Input[str]] = None,
|
232
233
|
path: Optional[pulumi.Input[str]] = None,
|
233
234
|
__props__=None):
|
@@ -258,7 +259,7 @@ class Variable(pulumi.CustomResource):
|
|
258
259
|
def get(resource_name: str,
|
259
260
|
id: pulumi.Input[str],
|
260
261
|
opts: Optional[pulumi.ResourceOptions] = None,
|
261
|
-
items: Optional[pulumi.Input[Mapping[str,
|
262
|
+
items: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
262
263
|
namespace: Optional[pulumi.Input[str]] = None,
|
263
264
|
path: Optional[pulumi.Input[str]] = None) -> 'Variable':
|
264
265
|
"""
|
@@ -268,7 +269,7 @@ class Variable(pulumi.CustomResource):
|
|
268
269
|
:param str resource_name: The unique name of the resulting resource.
|
269
270
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
270
271
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
271
|
-
:param pulumi.Input[Mapping[str,
|
272
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] items: `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
272
273
|
:param pulumi.Input[str] namespace: `(string: "default")` - The namepsace to create the variable in.
|
273
274
|
:param pulumi.Input[str] path: `(string: <required>)` - A unique path to create the variable at.
|
274
275
|
"""
|
@@ -283,7 +284,7 @@ class Variable(pulumi.CustomResource):
|
|
283
284
|
|
284
285
|
@property
|
285
286
|
@pulumi.getter
|
286
|
-
def items(self) -> pulumi.Output[Mapping[str,
|
287
|
+
def items(self) -> pulumi.Output[Mapping[str, str]]:
|
287
288
|
"""
|
288
289
|
`(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
|
289
290
|
"""
|