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/get_jwks.py
ADDED
@@ -0,0 +1,124 @@
|
|
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 copy
|
6
|
+
import warnings
|
7
|
+
import sys
|
8
|
+
import pulumi
|
9
|
+
import pulumi.runtime
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
+
if sys.version_info >= (3, 11):
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
+
else:
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
|
+
from . import _utilities
|
16
|
+
from . import outputs
|
17
|
+
|
18
|
+
__all__ = [
|
19
|
+
'GetJwksResult',
|
20
|
+
'AwaitableGetJwksResult',
|
21
|
+
'get_jwks',
|
22
|
+
'get_jwks_output',
|
23
|
+
]
|
24
|
+
|
25
|
+
@pulumi.output_type
|
26
|
+
class GetJwksResult:
|
27
|
+
"""
|
28
|
+
A collection of values returned by getJwks.
|
29
|
+
"""
|
30
|
+
def __init__(__self__, id=None, keys=None, pem_keys=None):
|
31
|
+
if id and not isinstance(id, str):
|
32
|
+
raise TypeError("Expected argument 'id' to be a str")
|
33
|
+
pulumi.set(__self__, "id", id)
|
34
|
+
if keys and not isinstance(keys, list):
|
35
|
+
raise TypeError("Expected argument 'keys' to be a list")
|
36
|
+
pulumi.set(__self__, "keys", keys)
|
37
|
+
if pem_keys and not isinstance(pem_keys, list):
|
38
|
+
raise TypeError("Expected argument 'pem_keys' to be a list")
|
39
|
+
pulumi.set(__self__, "pem_keys", pem_keys)
|
40
|
+
|
41
|
+
@property
|
42
|
+
@pulumi.getter
|
43
|
+
def id(self) -> str:
|
44
|
+
"""
|
45
|
+
The provider-assigned unique ID for this managed resource.
|
46
|
+
"""
|
47
|
+
return pulumi.get(self, "id")
|
48
|
+
|
49
|
+
@property
|
50
|
+
@pulumi.getter
|
51
|
+
def keys(self) -> Sequence['outputs.GetJwksKeyResult']:
|
52
|
+
"""
|
53
|
+
`list of maps` a list of JWK keys in structured format: see [RFC7517](https://datatracker.ietf.org/doc/html/rfc7517) for the
|
54
|
+
JWK field meanings.
|
55
|
+
"""
|
56
|
+
return pulumi.get(self, "keys")
|
57
|
+
|
58
|
+
@property
|
59
|
+
@pulumi.getter(name="pemKeys")
|
60
|
+
def pem_keys(self) -> Sequence[str]:
|
61
|
+
"""
|
62
|
+
`list of strings` a list JWK keys rendered as PEM-encoded X.509 keys
|
63
|
+
"""
|
64
|
+
return pulumi.get(self, "pem_keys")
|
65
|
+
|
66
|
+
|
67
|
+
class AwaitableGetJwksResult(GetJwksResult):
|
68
|
+
# pylint: disable=using-constant-test
|
69
|
+
def __await__(self):
|
70
|
+
if False:
|
71
|
+
yield self
|
72
|
+
return GetJwksResult(
|
73
|
+
id=self.id,
|
74
|
+
keys=self.keys,
|
75
|
+
pem_keys=self.pem_keys)
|
76
|
+
|
77
|
+
|
78
|
+
def get_jwks(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJwksResult:
|
79
|
+
"""
|
80
|
+
Retrieve the cluster JWKS public keys.
|
81
|
+
|
82
|
+
The keys are returned both as a list of maps (`keys`), and as a list of PEM-encoded strings
|
83
|
+
(`pem_keys`), which may be more convenient for use.
|
84
|
+
|
85
|
+
## Example Usage
|
86
|
+
|
87
|
+
```python
|
88
|
+
import pulumi
|
89
|
+
import pulumi_nomad as nomad
|
90
|
+
|
91
|
+
example = nomad.get_jwks()
|
92
|
+
```
|
93
|
+
"""
|
94
|
+
__args__ = dict()
|
95
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
96
|
+
__ret__ = pulumi.runtime.invoke('nomad:index/getJwks:getJwks', __args__, opts=opts, typ=GetJwksResult).value
|
97
|
+
|
98
|
+
return AwaitableGetJwksResult(
|
99
|
+
id=pulumi.get(__ret__, 'id'),
|
100
|
+
keys=pulumi.get(__ret__, 'keys'),
|
101
|
+
pem_keys=pulumi.get(__ret__, 'pem_keys'))
|
102
|
+
def get_jwks_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetJwksResult]:
|
103
|
+
"""
|
104
|
+
Retrieve the cluster JWKS public keys.
|
105
|
+
|
106
|
+
The keys are returned both as a list of maps (`keys`), and as a list of PEM-encoded strings
|
107
|
+
(`pem_keys`), which may be more convenient for use.
|
108
|
+
|
109
|
+
## Example Usage
|
110
|
+
|
111
|
+
```python
|
112
|
+
import pulumi
|
113
|
+
import pulumi_nomad as nomad
|
114
|
+
|
115
|
+
example = nomad.get_jwks()
|
116
|
+
```
|
117
|
+
"""
|
118
|
+
__args__ = dict()
|
119
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
120
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getJwks:getJwks', __args__, opts=opts, typ=GetJwksResult)
|
121
|
+
return __ret__.apply(lambda __response__: GetJwksResult(
|
122
|
+
id=pulumi.get(__response__, 'id'),
|
123
|
+
keys=pulumi.get(__response__, 'keys'),
|
124
|
+
pem_keys=pulumi.get(__response__, 'pem_keys')))
|
pulumi_nomad/get_namespace.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 . import outputs
|
12
17
|
|
@@ -118,14 +123,12 @@ def get_namespace(name: Optional[str] = None,
|
|
118
123
|
|
119
124
|
## Example Usage
|
120
125
|
|
121
|
-
<!--Start PulumiCodeChooser -->
|
122
126
|
```python
|
123
127
|
import pulumi
|
124
128
|
import pulumi_nomad as nomad
|
125
129
|
|
126
130
|
namespaces = nomad.get_namespace(name="default")
|
127
131
|
```
|
128
|
-
<!--End PulumiCodeChooser -->
|
129
132
|
|
130
133
|
|
131
134
|
:param str name: `(string)` - The name of the namespace.
|
@@ -143,26 +146,32 @@ def get_namespace(name: Optional[str] = None,
|
|
143
146
|
name=pulumi.get(__ret__, 'name'),
|
144
147
|
node_pool_configs=pulumi.get(__ret__, 'node_pool_configs'),
|
145
148
|
quota=pulumi.get(__ret__, 'quota'))
|
146
|
-
|
147
|
-
|
148
|
-
@_utilities.lift_output_func(get_namespace)
|
149
149
|
def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
|
150
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNamespaceResult]:
|
150
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNamespaceResult]:
|
151
151
|
"""
|
152
152
|
Get information about a namespace in Nomad.
|
153
153
|
|
154
154
|
## Example Usage
|
155
155
|
|
156
|
-
<!--Start PulumiCodeChooser -->
|
157
156
|
```python
|
158
157
|
import pulumi
|
159
158
|
import pulumi_nomad as nomad
|
160
159
|
|
161
160
|
namespaces = nomad.get_namespace(name="default")
|
162
161
|
```
|
163
|
-
<!--End PulumiCodeChooser -->
|
164
162
|
|
165
163
|
|
166
164
|
:param str name: `(string)` - The name of the namespace.
|
167
165
|
"""
|
168
|
-
|
166
|
+
__args__ = dict()
|
167
|
+
__args__['name'] = name
|
168
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
169
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getNamespace:getNamespace', __args__, opts=opts, typ=GetNamespaceResult)
|
170
|
+
return __ret__.apply(lambda __response__: GetNamespaceResult(
|
171
|
+
capabilities=pulumi.get(__response__, 'capabilities'),
|
172
|
+
description=pulumi.get(__response__, 'description'),
|
173
|
+
id=pulumi.get(__response__, 'id'),
|
174
|
+
meta=pulumi.get(__response__, 'meta'),
|
175
|
+
name=pulumi.get(__response__, 'name'),
|
176
|
+
node_pool_configs=pulumi.get(__response__, 'node_pool_configs'),
|
177
|
+
quota=pulumi.get(__response__, 'quota')))
|
pulumi_nomad/get_namespaces.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__ = [
|
@@ -62,7 +67,6 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
|
|
62
67
|
|
63
68
|
## Example Usage
|
64
69
|
|
65
|
-
<!--Start PulumiCodeChooser -->
|
66
70
|
```python
|
67
71
|
import pulumi
|
68
72
|
import pulumi_nomad as nomad
|
@@ -71,13 +75,13 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
|
|
71
75
|
namespace = []
|
72
76
|
for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
|
73
77
|
namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
|
78
|
+
name=f"namespace-{namespaces[range['value']]}",
|
74
79
|
description=f"Write to the namespace {namespaces[range['value']]}",
|
75
80
|
rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
|
76
81
|
policy = "write"
|
77
82
|
}}
|
78
83
|
\"\"\"))
|
79
84
|
```
|
80
|
-
<!--End PulumiCodeChooser -->
|
81
85
|
"""
|
82
86
|
__args__ = dict()
|
83
87
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -86,16 +90,12 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
|
|
86
90
|
return AwaitableGetNamespacesResult(
|
87
91
|
id=pulumi.get(__ret__, 'id'),
|
88
92
|
namespaces=pulumi.get(__ret__, 'namespaces'))
|
89
|
-
|
90
|
-
|
91
|
-
@_utilities.lift_output_func(get_namespaces)
|
92
|
-
def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNamespacesResult]:
|
93
|
+
def get_namespaces_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNamespacesResult]:
|
93
94
|
"""
|
94
95
|
Retrieve a list of namespaces available in Nomad.
|
95
96
|
|
96
97
|
## Example Usage
|
97
98
|
|
98
|
-
<!--Start PulumiCodeChooser -->
|
99
99
|
```python
|
100
100
|
import pulumi
|
101
101
|
import pulumi_nomad as nomad
|
@@ -104,12 +104,17 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
|
|
104
104
|
namespace = []
|
105
105
|
for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
|
106
106
|
namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
|
107
|
+
name=f"namespace-{namespaces[range['value']]}",
|
107
108
|
description=f"Write to the namespace {namespaces[range['value']]}",
|
108
109
|
rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
|
109
110
|
policy = "write"
|
110
111
|
}}
|
111
112
|
\"\"\"))
|
112
113
|
```
|
113
|
-
<!--End PulumiCodeChooser -->
|
114
114
|
"""
|
115
|
-
|
115
|
+
__args__ = dict()
|
116
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
117
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getNamespaces:getNamespaces', __args__, opts=opts, typ=GetNamespacesResult)
|
118
|
+
return __ret__.apply(lambda __response__: GetNamespacesResult(
|
119
|
+
id=pulumi.get(__response__, 'id'),
|
120
|
+
namespaces=pulumi.get(__response__, 'namespaces')))
|
pulumi_nomad/get_node_pool.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 . import outputs
|
12
17
|
|
@@ -98,14 +103,12 @@ def get_node_pool(name: Optional[str] = None,
|
|
98
103
|
|
99
104
|
## Example Usage
|
100
105
|
|
101
|
-
<!--Start PulumiCodeChooser -->
|
102
106
|
```python
|
103
107
|
import pulumi
|
104
108
|
import pulumi_nomad as nomad
|
105
109
|
|
106
110
|
dev = nomad.get_node_pool(name="dev")
|
107
111
|
```
|
108
|
-
<!--End PulumiCodeChooser -->
|
109
112
|
|
110
113
|
|
111
114
|
:param str name: `(string)` - The name of the node pool to fetch.
|
@@ -121,26 +124,30 @@ def get_node_pool(name: Optional[str] = None,
|
|
121
124
|
meta=pulumi.get(__ret__, 'meta'),
|
122
125
|
name=pulumi.get(__ret__, 'name'),
|
123
126
|
scheduler_configs=pulumi.get(__ret__, 'scheduler_configs'))
|
124
|
-
|
125
|
-
|
126
|
-
@_utilities.lift_output_func(get_node_pool)
|
127
127
|
def get_node_pool_output(name: Optional[pulumi.Input[str]] = None,
|
128
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodePoolResult]:
|
128
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNodePoolResult]:
|
129
129
|
"""
|
130
130
|
Get information about a node pool in Nomad.
|
131
131
|
|
132
132
|
## Example Usage
|
133
133
|
|
134
|
-
<!--Start PulumiCodeChooser -->
|
135
134
|
```python
|
136
135
|
import pulumi
|
137
136
|
import pulumi_nomad as nomad
|
138
137
|
|
139
138
|
dev = nomad.get_node_pool(name="dev")
|
140
139
|
```
|
141
|
-
<!--End PulumiCodeChooser -->
|
142
140
|
|
143
141
|
|
144
142
|
:param str name: `(string)` - The name of the node pool to fetch.
|
145
143
|
"""
|
146
|
-
|
144
|
+
__args__ = dict()
|
145
|
+
__args__['name'] = name
|
146
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
147
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getNodePool:getNodePool', __args__, opts=opts, typ=GetNodePoolResult)
|
148
|
+
return __ret__.apply(lambda __response__: GetNodePoolResult(
|
149
|
+
description=pulumi.get(__response__, 'description'),
|
150
|
+
id=pulumi.get(__response__, 'id'),
|
151
|
+
meta=pulumi.get(__response__, 'meta'),
|
152
|
+
name=pulumi.get(__response__, 'name'),
|
153
|
+
scheduler_configs=pulumi.get(__response__, 'scheduler_configs')))
|
pulumi_nomad/get_node_pools.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 . import outputs
|
12
17
|
|
@@ -84,14 +89,12 @@ def get_node_pools(filter: Optional[str] = None,
|
|
84
89
|
|
85
90
|
## Example Usage
|
86
91
|
|
87
|
-
<!--Start PulumiCodeChooser -->
|
88
92
|
```python
|
89
93
|
import pulumi
|
90
94
|
import pulumi_nomad as nomad
|
91
95
|
|
92
96
|
prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
|
93
97
|
```
|
94
|
-
<!--End PulumiCodeChooser -->
|
95
98
|
|
96
99
|
|
97
100
|
:param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
|
@@ -110,25 +113,20 @@ def get_node_pools(filter: Optional[str] = None,
|
|
110
113
|
id=pulumi.get(__ret__, 'id'),
|
111
114
|
node_pools=pulumi.get(__ret__, 'node_pools'),
|
112
115
|
prefix=pulumi.get(__ret__, 'prefix'))
|
113
|
-
|
114
|
-
|
115
|
-
@_utilities.lift_output_func(get_node_pools)
|
116
116
|
def get_node_pools_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
117
117
|
prefix: Optional[pulumi.Input[Optional[str]]] = None,
|
118
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodePoolsResult]:
|
118
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNodePoolsResult]:
|
119
119
|
"""
|
120
120
|
Retrieve a list of node pools available in Nomad.
|
121
121
|
|
122
122
|
## Example Usage
|
123
123
|
|
124
|
-
<!--Start PulumiCodeChooser -->
|
125
124
|
```python
|
126
125
|
import pulumi
|
127
126
|
import pulumi_nomad as nomad
|
128
127
|
|
129
128
|
prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
|
130
129
|
```
|
131
|
-
<!--End PulumiCodeChooser -->
|
132
130
|
|
133
131
|
|
134
132
|
:param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
|
@@ -136,4 +134,13 @@ def get_node_pools_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
136
134
|
:param str prefix: `(string)` - Specifies a string to filter node pools based on a name
|
137
135
|
prefix.
|
138
136
|
"""
|
139
|
-
|
137
|
+
__args__ = dict()
|
138
|
+
__args__['filter'] = filter
|
139
|
+
__args__['prefix'] = prefix
|
140
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
141
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getNodePools:getNodePools', __args__, opts=opts, typ=GetNodePoolsResult)
|
142
|
+
return __ret__.apply(lambda __response__: GetNodePoolsResult(
|
143
|
+
filter=pulumi.get(__response__, 'filter'),
|
144
|
+
id=pulumi.get(__response__, 'id'),
|
145
|
+
node_pools=pulumi.get(__response__, 'node_pools'),
|
146
|
+
prefix=pulumi.get(__response__, 'prefix')))
|
pulumi_nomad/get_plugin.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 . import outputs
|
12
17
|
|
@@ -186,7 +191,6 @@ def get_plugin(plugin_id: Optional[str] = None,
|
|
186
191
|
|
187
192
|
Check for the existence of a plugin:
|
188
193
|
|
189
|
-
<!--Start PulumiCodeChooser -->
|
190
194
|
```python
|
191
195
|
import pulumi
|
192
196
|
import pulumi_nomad as nomad
|
@@ -194,7 +198,6 @@ def get_plugin(plugin_id: Optional[str] = None,
|
|
194
198
|
ebs = nomad.get_plugin(plugin_id="aws-ebs0",
|
195
199
|
wait_for_healthy=True)
|
196
200
|
```
|
197
|
-
<!--End PulumiCodeChooser -->
|
198
201
|
|
199
202
|
This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
|
200
203
|
is healthy before returning.
|
@@ -224,13 +227,10 @@ def get_plugin(plugin_id: Optional[str] = None,
|
|
224
227
|
plugin_provider_version=pulumi.get(__ret__, 'plugin_provider_version'),
|
225
228
|
wait_for_healthy=pulumi.get(__ret__, 'wait_for_healthy'),
|
226
229
|
wait_for_registration=pulumi.get(__ret__, 'wait_for_registration'))
|
227
|
-
|
228
|
-
|
229
|
-
@_utilities.lift_output_func(get_plugin)
|
230
230
|
def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
231
231
|
wait_for_healthy: Optional[pulumi.Input[Optional[bool]]] = None,
|
232
232
|
wait_for_registration: Optional[pulumi.Input[Optional[bool]]] = None,
|
233
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPluginResult]:
|
233
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPluginResult]:
|
234
234
|
"""
|
235
235
|
Lookup a plugin by ID. The aim of this datasource is to determine whether
|
236
236
|
a particular plugin exists on the cluster, to find information on the health
|
@@ -245,7 +245,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
|
245
245
|
|
246
246
|
Check for the existence of a plugin:
|
247
247
|
|
248
|
-
<!--Start PulumiCodeChooser -->
|
249
248
|
```python
|
250
249
|
import pulumi
|
251
250
|
import pulumi_nomad as nomad
|
@@ -253,7 +252,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
|
253
252
|
ebs = nomad.get_plugin(plugin_id="aws-ebs0",
|
254
253
|
wait_for_healthy=True)
|
255
254
|
```
|
256
|
-
<!--End PulumiCodeChooser -->
|
257
255
|
|
258
256
|
This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
|
259
257
|
is healthy before returning.
|
@@ -263,4 +261,22 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
|
|
263
261
|
:param bool wait_for_healthy: `(boolean)` retry until the plugin exists and all controllers are healthy
|
264
262
|
:param bool wait_for_registration: `(boolean)` if the plugin doesn't exist, retry until it does
|
265
263
|
"""
|
266
|
-
|
264
|
+
__args__ = dict()
|
265
|
+
__args__['pluginId'] = plugin_id
|
266
|
+
__args__['waitForHealthy'] = wait_for_healthy
|
267
|
+
__args__['waitForRegistration'] = wait_for_registration
|
268
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
269
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getPlugin:getPlugin', __args__, opts=opts, typ=GetPluginResult)
|
270
|
+
return __ret__.apply(lambda __response__: GetPluginResult(
|
271
|
+
controller_required=pulumi.get(__response__, 'controller_required'),
|
272
|
+
controllers_expected=pulumi.get(__response__, 'controllers_expected'),
|
273
|
+
controllers_healthy=pulumi.get(__response__, 'controllers_healthy'),
|
274
|
+
id=pulumi.get(__response__, 'id'),
|
275
|
+
nodes=pulumi.get(__response__, 'nodes'),
|
276
|
+
nodes_expected=pulumi.get(__response__, 'nodes_expected'),
|
277
|
+
nodes_healthy=pulumi.get(__response__, 'nodes_healthy'),
|
278
|
+
plugin_id=pulumi.get(__response__, 'plugin_id'),
|
279
|
+
plugin_provider=pulumi.get(__response__, 'plugin_provider'),
|
280
|
+
plugin_provider_version=pulumi.get(__response__, 'plugin_provider_version'),
|
281
|
+
wait_for_healthy=pulumi.get(__response__, 'wait_for_healthy'),
|
282
|
+
wait_for_registration=pulumi.get(__response__, 'wait_for_registration')))
|
pulumi_nomad/get_plugins.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__ = [
|
@@ -42,7 +47,7 @@ class GetPluginsResult:
|
|
42
47
|
|
43
48
|
@property
|
44
49
|
@pulumi.getter
|
45
|
-
def plugins(self) -> Sequence[Mapping[str,
|
50
|
+
def plugins(self) -> Sequence[Mapping[str, str]]:
|
46
51
|
"""
|
47
52
|
`(list of maps)` a list of dynamic plugins registered in the cluster.
|
48
53
|
"""
|
@@ -72,14 +77,12 @@ def get_plugins(type: Optional[str] = None,
|
|
72
77
|
|
73
78
|
## Example Usage
|
74
79
|
|
75
|
-
<!--Start PulumiCodeChooser -->
|
76
80
|
```python
|
77
81
|
import pulumi
|
78
82
|
import pulumi_nomad as nomad
|
79
83
|
|
80
84
|
example = nomad.get_plugins()
|
81
85
|
```
|
82
|
-
<!--End PulumiCodeChooser -->
|
83
86
|
"""
|
84
87
|
__args__ = dict()
|
85
88
|
__args__['type'] = type
|
@@ -90,23 +93,25 @@ def get_plugins(type: Optional[str] = None,
|
|
90
93
|
id=pulumi.get(__ret__, 'id'),
|
91
94
|
plugins=pulumi.get(__ret__, 'plugins'),
|
92
95
|
type=pulumi.get(__ret__, 'type'))
|
93
|
-
|
94
|
-
|
95
|
-
@_utilities.lift_output_func(get_plugins)
|
96
96
|
def get_plugins_output(type: Optional[pulumi.Input[Optional[str]]] = None,
|
97
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPluginsResult]:
|
97
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPluginsResult]:
|
98
98
|
"""
|
99
99
|
Retrieve a list of dynamic plugins in Nomad.
|
100
100
|
|
101
101
|
## Example Usage
|
102
102
|
|
103
|
-
<!--Start PulumiCodeChooser -->
|
104
103
|
```python
|
105
104
|
import pulumi
|
106
105
|
import pulumi_nomad as nomad
|
107
106
|
|
108
107
|
example = nomad.get_plugins()
|
109
108
|
```
|
110
|
-
<!--End PulumiCodeChooser -->
|
111
109
|
"""
|
112
|
-
|
110
|
+
__args__ = dict()
|
111
|
+
__args__['type'] = type
|
112
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
113
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getPlugins:getPlugins', __args__, opts=opts, typ=GetPluginsResult)
|
114
|
+
return __ret__.apply(lambda __response__: GetPluginsResult(
|
115
|
+
id=pulumi.get(__response__, 'id'),
|
116
|
+
plugins=pulumi.get(__response__, 'plugins'),
|
117
|
+
type=pulumi.get(__response__, 'type')))
|
pulumi_nomad/get_regions.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__ = [
|
@@ -59,6 +64,23 @@ class AwaitableGetRegionsResult(GetRegionsResult):
|
|
59
64
|
def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegionsResult:
|
60
65
|
"""
|
61
66
|
Retrieve a list of regions available in Nomad.
|
67
|
+
|
68
|
+
## Example Usage
|
69
|
+
|
70
|
+
```python
|
71
|
+
import pulumi
|
72
|
+
import pulumi_nomad as nomad
|
73
|
+
|
74
|
+
|
75
|
+
def not_implemented(msg):
|
76
|
+
raise NotImplementedError(msg)
|
77
|
+
|
78
|
+
my_regions = nomad.get_regions()
|
79
|
+
jobs = not_implemented("The template_file data resource is not yet supported.")
|
80
|
+
app = []
|
81
|
+
for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
|
82
|
+
app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
|
83
|
+
```
|
62
84
|
"""
|
63
85
|
__args__ = dict()
|
64
86
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
@@ -67,11 +89,30 @@ def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegi
|
|
67
89
|
return AwaitableGetRegionsResult(
|
68
90
|
id=pulumi.get(__ret__, 'id'),
|
69
91
|
regions=pulumi.get(__ret__, 'regions'))
|
70
|
-
|
71
|
-
|
72
|
-
@_utilities.lift_output_func(get_regions)
|
73
|
-
def get_regions_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRegionsResult]:
|
92
|
+
def get_regions_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRegionsResult]:
|
74
93
|
"""
|
75
94
|
Retrieve a list of regions available in Nomad.
|
95
|
+
|
96
|
+
## Example Usage
|
97
|
+
|
98
|
+
```python
|
99
|
+
import pulumi
|
100
|
+
import pulumi_nomad as nomad
|
101
|
+
|
102
|
+
|
103
|
+
def not_implemented(msg):
|
104
|
+
raise NotImplementedError(msg)
|
105
|
+
|
106
|
+
my_regions = nomad.get_regions()
|
107
|
+
jobs = not_implemented("The template_file data resource is not yet supported.")
|
108
|
+
app = []
|
109
|
+
for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
|
110
|
+
app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
|
111
|
+
```
|
76
112
|
"""
|
77
|
-
|
113
|
+
__args__ = dict()
|
114
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
115
|
+
__ret__ = pulumi.runtime.invoke_output('nomad:index/getRegions:getRegions', __args__, opts=opts, typ=GetRegionsResult)
|
116
|
+
return __ret__.apply(lambda __response__: GetRegionsResult(
|
117
|
+
id=pulumi.get(__response__, 'id'),
|
118
|
+
regions=pulumi.get(__response__, 'regions')))
|