pulumi-nomad 2.2.0a1710156747__py3-none-any.whl → 2.2.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.
- pulumi_nomad/_inputs.py +92 -146
- pulumi_nomad/acl_auth_method.py +46 -41
- pulumi_nomad/acl_policy.py +0 -64
- pulumi_nomad/acl_token.py +18 -26
- pulumi_nomad/csi_volume.py +0 -72
- pulumi_nomad/csi_volume_registration.py +7 -79
- pulumi_nomad/external_volume.py +6 -78
- pulumi_nomad/get_acl_policies.py +0 -4
- pulumi_nomad/get_acl_policy.py +0 -4
- pulumi_nomad/get_acl_role.py +0 -4
- pulumi_nomad/get_acl_roles.py +0 -4
- pulumi_nomad/get_acl_token.py +0 -4
- pulumi_nomad/get_acl_tokens.py +0 -4
- pulumi_nomad/get_allocations.py +21 -5
- pulumi_nomad/get_datacenters.py +4 -8
- pulumi_nomad/get_deployments.py +0 -4
- pulumi_nomad/get_job.py +4 -9
- pulumi_nomad/get_job_parser.py +0 -24
- pulumi_nomad/get_namespace.py +0 -4
- pulumi_nomad/get_namespaces.py +2 -4
- pulumi_nomad/get_node_pool.py +0 -4
- pulumi_nomad/get_node_pools.py +0 -4
- pulumi_nomad/get_plugin.py +0 -4
- pulumi_nomad/get_plugins.py +0 -4
- pulumi_nomad/get_regions.py +34 -0
- pulumi_nomad/get_scaling_policies.py +0 -4
- pulumi_nomad/get_scaling_policy.py +0 -4
- pulumi_nomad/get_scheduler_policy.py +0 -4
- pulumi_nomad/get_variable.py +0 -4
- pulumi_nomad/get_volumes.py +0 -4
- pulumi_nomad/job.py +16 -16
- pulumi_nomad/namespace.py +14 -16
- pulumi_nomad/node_pool.py +2 -4
- pulumi_nomad/outputs.py +94 -148
- pulumi_nomad/quote_specification.py +4 -6
- pulumi_nomad/scheduler_config.py +6 -10
- pulumi_nomad/sentinel_policy.py +6 -10
- pulumi_nomad/variable.py +14 -18
- pulumi_nomad/volume.py +15 -87
- {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/METADATA +1 -1
- pulumi_nomad-2.2.1.dist-info/RECORD +54 -0
- {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/WHEEL +1 -1
- pulumi_nomad-2.2.0a1710156747.dist-info/RECORD +0 -54
- {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/top_level.txt +0 -0
pulumi_nomad/get_acl_token.py
CHANGED
@@ -173,14 +173,12 @@ def get_acl_token(accessor_id: Optional[str] = None,
|
|
173
173
|
"""
|
174
174
|
## Example Usage
|
175
175
|
|
176
|
-
<!--Start PulumiCodeChooser -->
|
177
176
|
```python
|
178
177
|
import pulumi
|
179
178
|
import pulumi_nomad as nomad
|
180
179
|
|
181
180
|
my_token = nomad.get_acl_token(accessor_id="aa534e09-6a07-0a45-2295-a7f77063d429")
|
182
181
|
```
|
183
|
-
<!--End PulumiCodeChooser -->
|
184
182
|
|
185
183
|
|
186
184
|
:param str accessor_id: `(string)` Non-sensitive identifier for this token.
|
@@ -210,14 +208,12 @@ def get_acl_token_output(accessor_id: Optional[pulumi.Input[str]] = None,
|
|
210
208
|
"""
|
211
209
|
## Example Usage
|
212
210
|
|
213
|
-
<!--Start PulumiCodeChooser -->
|
214
211
|
```python
|
215
212
|
import pulumi
|
216
213
|
import pulumi_nomad as nomad
|
217
214
|
|
218
215
|
my_token = nomad.get_acl_token(accessor_id="aa534e09-6a07-0a45-2295-a7f77063d429")
|
219
216
|
```
|
220
|
-
<!--End PulumiCodeChooser -->
|
221
217
|
|
222
218
|
|
223
219
|
:param str accessor_id: `(string)` Non-sensitive identifier for this token.
|
pulumi_nomad/get_acl_tokens.py
CHANGED
@@ -73,14 +73,12 @@ def get_acl_tokens(prefix: Optional[str] = None,
|
|
73
73
|
|
74
74
|
## Example Usage
|
75
75
|
|
76
|
-
<!--Start PulumiCodeChooser -->
|
77
76
|
```python
|
78
77
|
import pulumi
|
79
78
|
import pulumi_nomad as nomad
|
80
79
|
|
81
80
|
tokens = nomad.get_acl_tokens(prefix="a242")
|
82
81
|
```
|
83
|
-
<!--End PulumiCodeChooser -->
|
84
82
|
|
85
83
|
|
86
84
|
:param str prefix: `(string)` Optional prefix to filter the tokens.
|
@@ -104,14 +102,12 @@ def get_acl_tokens_output(prefix: Optional[pulumi.Input[Optional[str]]] = None,
|
|
104
102
|
|
105
103
|
## Example Usage
|
106
104
|
|
107
|
-
<!--Start PulumiCodeChooser -->
|
108
105
|
```python
|
109
106
|
import pulumi
|
110
107
|
import pulumi_nomad as nomad
|
111
108
|
|
112
109
|
tokens = nomad.get_acl_tokens(prefix="a242")
|
113
110
|
```
|
114
|
-
<!--End PulumiCodeChooser -->
|
115
111
|
|
116
112
|
|
117
113
|
:param str prefix: `(string)` Optional prefix to filter the tokens.
|
pulumi_nomad/get_allocations.py
CHANGED
@@ -22,7 +22,7 @@ class GetAllocationsResult:
|
|
22
22
|
"""
|
23
23
|
A collection of values returned by getAllocations.
|
24
24
|
"""
|
25
|
-
def __init__(__self__, allocations=None, filter=None, id=None, prefix=None):
|
25
|
+
def __init__(__self__, allocations=None, filter=None, id=None, namespace=None, prefix=None):
|
26
26
|
if allocations and not isinstance(allocations, list):
|
27
27
|
raise TypeError("Expected argument 'allocations' to be a list")
|
28
28
|
pulumi.set(__self__, "allocations", allocations)
|
@@ -32,6 +32,9 @@ class GetAllocationsResult:
|
|
32
32
|
if id and not isinstance(id, str):
|
33
33
|
raise TypeError("Expected argument 'id' to be a str")
|
34
34
|
pulumi.set(__self__, "id", id)
|
35
|
+
if namespace and not isinstance(namespace, str):
|
36
|
+
raise TypeError("Expected argument 'namespace' to be a str")
|
37
|
+
pulumi.set(__self__, "namespace", namespace)
|
35
38
|
if prefix and not isinstance(prefix, str):
|
36
39
|
raise TypeError("Expected argument 'prefix' to be a str")
|
37
40
|
pulumi.set(__self__, "prefix", prefix)
|
@@ -58,6 +61,14 @@ class GetAllocationsResult:
|
|
58
61
|
"""
|
59
62
|
return pulumi.get(self, "id")
|
60
63
|
|
64
|
+
@property
|
65
|
+
@pulumi.getter
|
66
|
+
def namespace(self) -> Optional[str]:
|
67
|
+
"""
|
68
|
+
`(string)` - The namespace the allocation belongs to.
|
69
|
+
"""
|
70
|
+
return pulumi.get(self, "namespace")
|
71
|
+
|
61
72
|
@property
|
62
73
|
@pulumi.getter
|
63
74
|
def prefix(self) -> Optional[str]:
|
@@ -73,10 +84,12 @@ class AwaitableGetAllocationsResult(GetAllocationsResult):
|
|
73
84
|
allocations=self.allocations,
|
74
85
|
filter=self.filter,
|
75
86
|
id=self.id,
|
87
|
+
namespace=self.namespace,
|
76
88
|
prefix=self.prefix)
|
77
89
|
|
78
90
|
|
79
91
|
def get_allocations(filter: Optional[str] = None,
|
92
|
+
namespace: Optional[str] = None,
|
80
93
|
prefix: Optional[str] = None,
|
81
94
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAllocationsResult:
|
82
95
|
"""
|
@@ -84,23 +97,24 @@ def get_allocations(filter: Optional[str] = None,
|
|
84
97
|
|
85
98
|
## Example Usage
|
86
99
|
|
87
|
-
<!--Start PulumiCodeChooser -->
|
88
100
|
```python
|
89
101
|
import pulumi
|
90
102
|
import pulumi_nomad as nomad
|
91
103
|
|
92
104
|
example = nomad.get_allocations(filter="JobID == \\"example\\"")
|
93
105
|
```
|
94
|
-
<!--End PulumiCodeChooser -->
|
95
106
|
|
96
107
|
|
97
108
|
:param str filter: `(string: <optional>)` - Specifies the
|
98
109
|
[expression][nomad_api_filter] used to filter the results.
|
110
|
+
:param str namespace: `(string: <optional>)` - Specifies the namespace to search for
|
111
|
+
allocations in.
|
99
112
|
:param str prefix: `(string: <optional>)` - Specifies a string to filter allocations
|
100
113
|
based on an ID prefix.
|
101
114
|
"""
|
102
115
|
__args__ = dict()
|
103
116
|
__args__['filter'] = filter
|
117
|
+
__args__['namespace'] = namespace
|
104
118
|
__args__['prefix'] = prefix
|
105
119
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
106
120
|
__ret__ = pulumi.runtime.invoke('nomad:index/getAllocations:getAllocations', __args__, opts=opts, typ=GetAllocationsResult).value
|
@@ -109,11 +123,13 @@ def get_allocations(filter: Optional[str] = None,
|
|
109
123
|
allocations=pulumi.get(__ret__, 'allocations'),
|
110
124
|
filter=pulumi.get(__ret__, 'filter'),
|
111
125
|
id=pulumi.get(__ret__, 'id'),
|
126
|
+
namespace=pulumi.get(__ret__, 'namespace'),
|
112
127
|
prefix=pulumi.get(__ret__, 'prefix'))
|
113
128
|
|
114
129
|
|
115
130
|
@_utilities.lift_output_func(get_allocations)
|
116
131
|
def get_allocations_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
132
|
+
namespace: Optional[pulumi.Input[Optional[str]]] = None,
|
117
133
|
prefix: Optional[pulumi.Input[Optional[str]]] = None,
|
118
134
|
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAllocationsResult]:
|
119
135
|
"""
|
@@ -121,18 +137,18 @@ def get_allocations_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
121
137
|
|
122
138
|
## Example Usage
|
123
139
|
|
124
|
-
<!--Start PulumiCodeChooser -->
|
125
140
|
```python
|
126
141
|
import pulumi
|
127
142
|
import pulumi_nomad as nomad
|
128
143
|
|
129
144
|
example = nomad.get_allocations(filter="JobID == \\"example\\"")
|
130
145
|
```
|
131
|
-
<!--End PulumiCodeChooser -->
|
132
146
|
|
133
147
|
|
134
148
|
:param str filter: `(string: <optional>)` - Specifies the
|
135
149
|
[expression][nomad_api_filter] used to filter the results.
|
150
|
+
:param str namespace: `(string: <optional>)` - Specifies the namespace to search for
|
151
|
+
allocations in.
|
136
152
|
:param str prefix: `(string: <optional>)` - Specifies a string to filter allocations
|
137
153
|
based on an ID prefix.
|
138
154
|
"""
|
pulumi_nomad/get_datacenters.py
CHANGED
@@ -82,15 +82,13 @@ def get_datacenters(ignore_down_nodes: Optional[bool] = None,
|
|
82
82
|
|
83
83
|
## Example Usage
|
84
84
|
|
85
|
-
<!--Start PulumiCodeChooser -->
|
86
85
|
```python
|
87
86
|
import pulumi
|
88
87
|
import pulumi_nomad as nomad
|
89
88
|
|
90
|
-
datacenters = nomad.get_datacenters(
|
91
|
-
|
89
|
+
datacenters = nomad.get_datacenters(prefix="prod",
|
90
|
+
ignore_down_nodes=True)
|
92
91
|
```
|
93
|
-
<!--End PulumiCodeChooser -->
|
94
92
|
|
95
93
|
|
96
94
|
:param bool ignore_down_nodes: `(bool: false)`: An optional flag that, if set to `true` will ignore down nodes when compiling the list of datacenters.
|
@@ -118,15 +116,13 @@ def get_datacenters_output(ignore_down_nodes: Optional[pulumi.Input[Optional[boo
|
|
118
116
|
|
119
117
|
## Example Usage
|
120
118
|
|
121
|
-
<!--Start PulumiCodeChooser -->
|
122
119
|
```python
|
123
120
|
import pulumi
|
124
121
|
import pulumi_nomad as nomad
|
125
122
|
|
126
|
-
datacenters = nomad.get_datacenters(
|
127
|
-
|
123
|
+
datacenters = nomad.get_datacenters(prefix="prod",
|
124
|
+
ignore_down_nodes=True)
|
128
125
|
```
|
129
|
-
<!--End PulumiCodeChooser -->
|
130
126
|
|
131
127
|
|
132
128
|
:param bool ignore_down_nodes: `(bool: false)`: An optional flag that, if set to `true` will ignore down nodes when compiling the list of datacenters.
|
pulumi_nomad/get_deployments.py
CHANGED
@@ -62,14 +62,12 @@ def get_deployments(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGet
|
|
62
62
|
|
63
63
|
## Example Usage
|
64
64
|
|
65
|
-
<!--Start PulumiCodeChooser -->
|
66
65
|
```python
|
67
66
|
import pulumi
|
68
67
|
import pulumi_nomad as nomad
|
69
68
|
|
70
69
|
example = nomad.get_deployments()
|
71
70
|
```
|
72
|
-
<!--End PulumiCodeChooser -->
|
73
71
|
"""
|
74
72
|
__args__ = dict()
|
75
73
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -87,13 +85,11 @@ def get_deployments_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulum
|
|
87
85
|
|
88
86
|
## Example Usage
|
89
87
|
|
90
|
-
<!--Start PulumiCodeChooser -->
|
91
88
|
```python
|
92
89
|
import pulumi
|
93
90
|
import pulumi_nomad as nomad
|
94
91
|
|
95
92
|
example = nomad.get_deployments()
|
96
93
|
```
|
97
|
-
<!--End PulumiCodeChooser -->
|
98
94
|
"""
|
99
95
|
...
|
pulumi_nomad/get_job.py
CHANGED
@@ -159,9 +159,6 @@ class GetJobResult:
|
|
159
159
|
@property
|
160
160
|
@pulumi.getter
|
161
161
|
def namespace(self) -> Optional[str]:
|
162
|
-
"""
|
163
|
-
`(string)` Namespace of the specified job.
|
164
|
-
"""
|
165
162
|
return pulumi.get(self, "namespace")
|
166
163
|
|
167
164
|
@property
|
@@ -304,14 +301,13 @@ def get_job(job_id: Optional[str] = None,
|
|
304
301
|
|
305
302
|
Get the data about a snapshot:
|
306
303
|
|
307
|
-
<!--Start PulumiCodeChooser -->
|
308
304
|
```python
|
309
305
|
import pulumi
|
310
306
|
import pulumi_nomad as nomad
|
311
307
|
|
312
|
-
example = nomad.get_job(job_id="example"
|
308
|
+
example = nomad.get_job(job_id="example",
|
309
|
+
namespace="dev")
|
313
310
|
```
|
314
|
-
<!--End PulumiCodeChooser -->
|
315
311
|
|
316
312
|
|
317
313
|
:param str job_id: `(string)` ID of the job.
|
@@ -362,14 +358,13 @@ def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
|
|
362
358
|
|
363
359
|
Get the data about a snapshot:
|
364
360
|
|
365
|
-
<!--Start PulumiCodeChooser -->
|
366
361
|
```python
|
367
362
|
import pulumi
|
368
363
|
import pulumi_nomad as nomad
|
369
364
|
|
370
|
-
example = nomad.get_job(job_id="example"
|
365
|
+
example = nomad.get_job(job_id="example",
|
366
|
+
namespace="dev")
|
371
367
|
```
|
372
|
-
<!--End PulumiCodeChooser -->
|
373
368
|
|
374
369
|
|
375
370
|
:param str job_id: `(string)` ID of the job.
|
pulumi_nomad/get_job_parser.py
CHANGED
@@ -86,18 +86,6 @@ def get_job_parser(canonicalize: Optional[bool] = None,
|
|
86
86
|
"""
|
87
87
|
Parse a HCL jobspec and produce the equivalent JSON encoded job.
|
88
88
|
|
89
|
-
## Example Usage
|
90
|
-
|
91
|
-
<!--Start PulumiCodeChooser -->
|
92
|
-
```python
|
93
|
-
import pulumi
|
94
|
-
import pulumi_nomad as nomad
|
95
|
-
|
96
|
-
my_job = nomad.get_job_parser(hcl=(lambda path: open(path).read())(f"{path['module']}/jobspec.hcl"),
|
97
|
-
canonicalize=False)
|
98
|
-
```
|
99
|
-
<!--End PulumiCodeChooser -->
|
100
|
-
|
101
89
|
|
102
90
|
:param bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
|
103
91
|
:param str hcl: `(string)` - the HCL definition of the job.
|
@@ -122,18 +110,6 @@ def get_job_parser_output(canonicalize: Optional[pulumi.Input[Optional[bool]]] =
|
|
122
110
|
"""
|
123
111
|
Parse a HCL jobspec and produce the equivalent JSON encoded job.
|
124
112
|
|
125
|
-
## Example Usage
|
126
|
-
|
127
|
-
<!--Start PulumiCodeChooser -->
|
128
|
-
```python
|
129
|
-
import pulumi
|
130
|
-
import pulumi_nomad as nomad
|
131
|
-
|
132
|
-
my_job = nomad.get_job_parser(hcl=(lambda path: open(path).read())(f"{path['module']}/jobspec.hcl"),
|
133
|
-
canonicalize=False)
|
134
|
-
```
|
135
|
-
<!--End PulumiCodeChooser -->
|
136
|
-
|
137
113
|
|
138
114
|
:param bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
|
139
115
|
:param str hcl: `(string)` - the HCL definition of the job.
|
pulumi_nomad/get_namespace.py
CHANGED
@@ -118,14 +118,12 @@ def get_namespace(name: Optional[str] = None,
|
|
118
118
|
|
119
119
|
## Example Usage
|
120
120
|
|
121
|
-
<!--Start PulumiCodeChooser -->
|
122
121
|
```python
|
123
122
|
import pulumi
|
124
123
|
import pulumi_nomad as nomad
|
125
124
|
|
126
125
|
namespaces = nomad.get_namespace(name="default")
|
127
126
|
```
|
128
|
-
<!--End PulumiCodeChooser -->
|
129
127
|
|
130
128
|
|
131
129
|
:param str name: `(string)` - The name of the namespace.
|
@@ -153,14 +151,12 @@ def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
|
|
153
151
|
|
154
152
|
## Example Usage
|
155
153
|
|
156
|
-
<!--Start PulumiCodeChooser -->
|
157
154
|
```python
|
158
155
|
import pulumi
|
159
156
|
import pulumi_nomad as nomad
|
160
157
|
|
161
158
|
namespaces = nomad.get_namespace(name="default")
|
162
159
|
```
|
163
|
-
<!--End PulumiCodeChooser -->
|
164
160
|
|
165
161
|
|
166
162
|
:param str name: `(string)` - The name of the namespace.
|
pulumi_nomad/get_namespaces.py
CHANGED
@@ -62,7 +62,6 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
|
|
62
62
|
|
63
63
|
## Example Usage
|
64
64
|
|
65
|
-
<!--Start PulumiCodeChooser -->
|
66
65
|
```python
|
67
66
|
import pulumi
|
68
67
|
import pulumi_nomad as nomad
|
@@ -71,13 +70,13 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
|
|
71
70
|
namespace = []
|
72
71
|
for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
|
73
72
|
namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
|
73
|
+
name=f"namespace-{namespaces[range['value']]}",
|
74
74
|
description=f"Write to the namespace {namespaces[range['value']]}",
|
75
75
|
rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
|
76
76
|
policy = "write"
|
77
77
|
}}
|
78
78
|
\"\"\"))
|
79
79
|
```
|
80
|
-
<!--End PulumiCodeChooser -->
|
81
80
|
"""
|
82
81
|
__args__ = dict()
|
83
82
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -95,7 +94,6 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
|
|
95
94
|
|
96
95
|
## Example Usage
|
97
96
|
|
98
|
-
<!--Start PulumiCodeChooser -->
|
99
97
|
```python
|
100
98
|
import pulumi
|
101
99
|
import pulumi_nomad as nomad
|
@@ -104,12 +102,12 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
|
|
104
102
|
namespace = []
|
105
103
|
for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
|
106
104
|
namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
|
105
|
+
name=f"namespace-{namespaces[range['value']]}",
|
107
106
|
description=f"Write to the namespace {namespaces[range['value']]}",
|
108
107
|
rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
|
109
108
|
policy = "write"
|
110
109
|
}}
|
111
110
|
\"\"\"))
|
112
111
|
```
|
113
|
-
<!--End PulumiCodeChooser -->
|
114
112
|
"""
|
115
113
|
...
|
pulumi_nomad/get_node_pool.py
CHANGED
@@ -98,14 +98,12 @@ def get_node_pool(name: Optional[str] = None,
|
|
98
98
|
|
99
99
|
## Example Usage
|
100
100
|
|
101
|
-
<!--Start PulumiCodeChooser -->
|
102
101
|
```python
|
103
102
|
import pulumi
|
104
103
|
import pulumi_nomad as nomad
|
105
104
|
|
106
105
|
dev = nomad.get_node_pool(name="dev")
|
107
106
|
```
|
108
|
-
<!--End PulumiCodeChooser -->
|
109
107
|
|
110
108
|
|
111
109
|
:param str name: `(string)` - The name of the node pool to fetch.
|
@@ -131,14 +129,12 @@ def get_node_pool_output(name: Optional[pulumi.Input[str]] = None,
|
|
131
129
|
|
132
130
|
## Example Usage
|
133
131
|
|
134
|
-
<!--Start PulumiCodeChooser -->
|
135
132
|
```python
|
136
133
|
import pulumi
|
137
134
|
import pulumi_nomad as nomad
|
138
135
|
|
139
136
|
dev = nomad.get_node_pool(name="dev")
|
140
137
|
```
|
141
|
-
<!--End PulumiCodeChooser -->
|
142
138
|
|
143
139
|
|
144
140
|
:param str name: `(string)` - The name of the node pool to fetch.
|
pulumi_nomad/get_node_pools.py
CHANGED
@@ -84,14 +84,12 @@ def get_node_pools(filter: Optional[str] = None,
|
|
84
84
|
|
85
85
|
## Example Usage
|
86
86
|
|
87
|
-
<!--Start PulumiCodeChooser -->
|
88
87
|
```python
|
89
88
|
import pulumi
|
90
89
|
import pulumi_nomad as nomad
|
91
90
|
|
92
91
|
prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
|
93
92
|
```
|
94
|
-
<!--End PulumiCodeChooser -->
|
95
93
|
|
96
94
|
|
97
95
|
:param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
|
@@ -121,14 +119,12 @@ def get_node_pools_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
121
119
|
|
122
120
|
## Example Usage
|
123
121
|
|
124
|
-
<!--Start PulumiCodeChooser -->
|
125
122
|
```python
|
126
123
|
import pulumi
|
127
124
|
import pulumi_nomad as nomad
|
128
125
|
|
129
126
|
prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
|
130
127
|
```
|
131
|
-
<!--End PulumiCodeChooser -->
|
132
128
|
|
133
129
|
|
134
130
|
:param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
|
pulumi_nomad/get_plugin.py
CHANGED
@@ -186,7 +186,6 @@ def get_plugin(plugin_id: Optional[str] = None,
|
|
186
186
|
|
187
187
|
Check for the existence of a plugin:
|
188
188
|
|
189
|
-
<!--Start PulumiCodeChooser -->
|
190
189
|
```python
|
191
190
|
import pulumi
|
192
191
|
import pulumi_nomad as nomad
|
@@ -194,7 +193,6 @@ def get_plugin(plugin_id: Optional[str] = None,
|
|
194
193
|
ebs = nomad.get_plugin(plugin_id="aws-ebs0",
|
195
194
|
wait_for_healthy=True)
|
196
195
|
```
|
197
|
-
<!--End PulumiCodeChooser -->
|
198
196
|
|
199
197
|
This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
|
200
198
|
is healthy before returning.
|
@@ -245,7 +243,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
|
245
243
|
|
246
244
|
Check for the existence of a plugin:
|
247
245
|
|
248
|
-
<!--Start PulumiCodeChooser -->
|
249
246
|
```python
|
250
247
|
import pulumi
|
251
248
|
import pulumi_nomad as nomad
|
@@ -253,7 +250,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
|
253
250
|
ebs = nomad.get_plugin(plugin_id="aws-ebs0",
|
254
251
|
wait_for_healthy=True)
|
255
252
|
```
|
256
|
-
<!--End PulumiCodeChooser -->
|
257
253
|
|
258
254
|
This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
|
259
255
|
is healthy before returning.
|
pulumi_nomad/get_plugins.py
CHANGED
@@ -72,14 +72,12 @@ def get_plugins(type: Optional[str] = None,
|
|
72
72
|
|
73
73
|
## Example Usage
|
74
74
|
|
75
|
-
<!--Start PulumiCodeChooser -->
|
76
75
|
```python
|
77
76
|
import pulumi
|
78
77
|
import pulumi_nomad as nomad
|
79
78
|
|
80
79
|
example = nomad.get_plugins()
|
81
80
|
```
|
82
|
-
<!--End PulumiCodeChooser -->
|
83
81
|
"""
|
84
82
|
__args__ = dict()
|
85
83
|
__args__['type'] = type
|
@@ -100,13 +98,11 @@ def get_plugins_output(type: Optional[pulumi.Input[Optional[str]]] = None,
|
|
100
98
|
|
101
99
|
## Example Usage
|
102
100
|
|
103
|
-
<!--Start PulumiCodeChooser -->
|
104
101
|
```python
|
105
102
|
import pulumi
|
106
103
|
import pulumi_nomad as nomad
|
107
104
|
|
108
105
|
example = nomad.get_plugins()
|
109
106
|
```
|
110
|
-
<!--End PulumiCodeChooser -->
|
111
107
|
"""
|
112
108
|
...
|
pulumi_nomad/get_regions.py
CHANGED
@@ -59,6 +59,23 @@ class AwaitableGetRegionsResult(GetRegionsResult):
|
|
59
59
|
def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegionsResult:
|
60
60
|
"""
|
61
61
|
Retrieve a list of regions available in Nomad.
|
62
|
+
|
63
|
+
## Example Usage
|
64
|
+
|
65
|
+
```python
|
66
|
+
import pulumi
|
67
|
+
import pulumi_nomad as nomad
|
68
|
+
|
69
|
+
|
70
|
+
def not_implemented(msg):
|
71
|
+
raise NotImplementedError(msg)
|
72
|
+
|
73
|
+
my_regions = nomad.get_regions()
|
74
|
+
jobs = not_implemented("The template_file data resource is not yet supported.")
|
75
|
+
app = []
|
76
|
+
for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
|
77
|
+
app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
|
78
|
+
```
|
62
79
|
"""
|
63
80
|
__args__ = dict()
|
64
81
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -73,5 +90,22 @@ def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegi
|
|
73
90
|
def get_regions_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRegionsResult]:
|
74
91
|
"""
|
75
92
|
Retrieve a list of regions available in Nomad.
|
93
|
+
|
94
|
+
## Example Usage
|
95
|
+
|
96
|
+
```python
|
97
|
+
import pulumi
|
98
|
+
import pulumi_nomad as nomad
|
99
|
+
|
100
|
+
|
101
|
+
def not_implemented(msg):
|
102
|
+
raise NotImplementedError(msg)
|
103
|
+
|
104
|
+
my_regions = nomad.get_regions()
|
105
|
+
jobs = not_implemented("The template_file data resource is not yet supported.")
|
106
|
+
app = []
|
107
|
+
for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
|
108
|
+
app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
|
109
|
+
```
|
76
110
|
"""
|
77
111
|
...
|
@@ -86,7 +86,6 @@ def get_scaling_policies(job_id: Optional[str] = None,
|
|
86
86
|
|
87
87
|
## Example Usage
|
88
88
|
|
89
|
-
<!--Start PulumiCodeChooser -->
|
90
89
|
```python
|
91
90
|
import pulumi
|
92
91
|
import pulumi_nomad as nomad
|
@@ -94,7 +93,6 @@ def get_scaling_policies(job_id: Optional[str] = None,
|
|
94
93
|
example = nomad.get_scaling_policies(job_id="webapp",
|
95
94
|
type="horizontal")
|
96
95
|
```
|
97
|
-
<!--End PulumiCodeChooser -->
|
98
96
|
|
99
97
|
|
100
98
|
:param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
|
@@ -122,7 +120,6 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
|
|
122
120
|
|
123
121
|
## Example Usage
|
124
122
|
|
125
|
-
<!--Start PulumiCodeChooser -->
|
126
123
|
```python
|
127
124
|
import pulumi
|
128
125
|
import pulumi_nomad as nomad
|
@@ -130,7 +127,6 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
|
|
130
127
|
example = nomad.get_scaling_policies(job_id="webapp",
|
131
128
|
type="horizontal")
|
132
129
|
```
|
133
|
-
<!--End PulumiCodeChooser -->
|
134
130
|
|
135
131
|
|
136
132
|
:param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
|
@@ -120,14 +120,12 @@ def get_scaling_policy(id: Optional[str] = None,
|
|
120
120
|
|
121
121
|
## Example Usage
|
122
122
|
|
123
|
-
<!--Start PulumiCodeChooser -->
|
124
123
|
```python
|
125
124
|
import pulumi
|
126
125
|
import pulumi_nomad as nomad
|
127
126
|
|
128
127
|
example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
|
129
128
|
```
|
130
|
-
<!--End PulumiCodeChooser -->
|
131
129
|
|
132
130
|
|
133
131
|
:param str id: `(string: <required>)` - The ID of the scaling policy.
|
@@ -155,14 +153,12 @@ def get_scaling_policy_output(id: Optional[pulumi.Input[str]] = None,
|
|
155
153
|
|
156
154
|
## Example Usage
|
157
155
|
|
158
|
-
<!--Start PulumiCodeChooser -->
|
159
156
|
```python
|
160
157
|
import pulumi
|
161
158
|
import pulumi_nomad as nomad
|
162
159
|
|
163
160
|
example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
|
164
161
|
```
|
165
|
-
<!--End PulumiCodeChooser -->
|
166
162
|
|
167
163
|
|
168
164
|
:param str id: `(string: <required>)` - The ID of the scaling policy.
|
@@ -86,14 +86,12 @@ def get_scheduler_policy(opts: Optional[pulumi.InvokeOptions] = None) -> Awaitab
|
|
86
86
|
|
87
87
|
## Example Usage
|
88
88
|
|
89
|
-
<!--Start PulumiCodeChooser -->
|
90
89
|
```python
|
91
90
|
import pulumi
|
92
91
|
import pulumi_nomad as nomad
|
93
92
|
|
94
93
|
global_ = nomad.get_scheduler_policy()
|
95
94
|
```
|
96
|
-
<!--End PulumiCodeChooser -->
|
97
95
|
"""
|
98
96
|
__args__ = dict()
|
99
97
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -113,13 +111,11 @@ def get_scheduler_policy_output(opts: Optional[pulumi.InvokeOptions] = None) ->
|
|
113
111
|
|
114
112
|
## Example Usage
|
115
113
|
|
116
|
-
<!--Start PulumiCodeChooser -->
|
117
114
|
```python
|
118
115
|
import pulumi
|
119
116
|
import pulumi_nomad as nomad
|
120
117
|
|
121
118
|
global_ = nomad.get_scheduler_policy()
|
122
119
|
```
|
123
|
-
<!--End PulumiCodeChooser -->
|
124
120
|
"""
|
125
121
|
...
|
pulumi_nomad/get_variable.py
CHANGED
@@ -86,14 +86,12 @@ def get_variable(namespace: Optional[str] = None,
|
|
86
86
|
"""
|
87
87
|
## Example Usage
|
88
88
|
|
89
|
-
<!--Start PulumiCodeChooser -->
|
90
89
|
```python
|
91
90
|
import pulumi
|
92
91
|
import pulumi_nomad as nomad
|
93
92
|
|
94
93
|
example = nomad.Variable("example", path="path/of/existing/variable")
|
95
94
|
```
|
96
|
-
<!--End PulumiCodeChooser -->
|
97
95
|
|
98
96
|
|
99
97
|
:param str namespace: `(string: "default")` - The namepsace in which the variable exists.
|
@@ -119,14 +117,12 @@ def get_variable_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
|
|
119
117
|
"""
|
120
118
|
## Example Usage
|
121
119
|
|
122
|
-
<!--Start PulumiCodeChooser -->
|
123
120
|
```python
|
124
121
|
import pulumi
|
125
122
|
import pulumi_nomad as nomad
|
126
123
|
|
127
124
|
example = nomad.Variable("example", path="path/of/existing/variable")
|
128
125
|
```
|
129
|
-
<!--End PulumiCodeChooser -->
|
130
126
|
|
131
127
|
|
132
128
|
:param str namespace: `(string: "default")` - The namepsace in which the variable exists.
|