pulumi-nomad 2.2.0a1710332982__py3-none-any.whl → 2.3.0__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.
Files changed (47) hide show
  1. pulumi_nomad/__init__.py +1 -0
  2. pulumi_nomad/_inputs.py +221 -189
  3. pulumi_nomad/acl_auth_method.py +18 -20
  4. pulumi_nomad/acl_policy.py +0 -64
  5. pulumi_nomad/acl_token.py +18 -26
  6. pulumi_nomad/csi_volume.py +0 -72
  7. pulumi_nomad/csi_volume_registration.py +0 -72
  8. pulumi_nomad/external_volume.py +6 -78
  9. pulumi_nomad/get_acl_policies.py +0 -4
  10. pulumi_nomad/get_acl_policy.py +0 -4
  11. pulumi_nomad/get_acl_role.py +0 -4
  12. pulumi_nomad/get_acl_roles.py +0 -4
  13. pulumi_nomad/get_acl_token.py +0 -4
  14. pulumi_nomad/get_acl_tokens.py +0 -4
  15. pulumi_nomad/get_allocations.py +0 -4
  16. pulumi_nomad/get_datacenters.py +4 -8
  17. pulumi_nomad/get_deployments.py +5 -4
  18. pulumi_nomad/get_job.py +0 -4
  19. pulumi_nomad/get_job_parser.py +0 -24
  20. pulumi_nomad/get_jwks.py +116 -0
  21. pulumi_nomad/get_namespace.py +0 -4
  22. pulumi_nomad/get_namespaces.py +2 -4
  23. pulumi_nomad/get_node_pool.py +0 -4
  24. pulumi_nomad/get_node_pools.py +0 -4
  25. pulumi_nomad/get_plugin.py +0 -4
  26. pulumi_nomad/get_plugins.py +0 -4
  27. pulumi_nomad/get_regions.py +34 -0
  28. pulumi_nomad/get_scaling_policies.py +0 -4
  29. pulumi_nomad/get_scaling_policy.py +0 -4
  30. pulumi_nomad/get_scheduler_policy.py +0 -4
  31. pulumi_nomad/get_variable.py +0 -4
  32. pulumi_nomad/get_volumes.py +0 -4
  33. pulumi_nomad/job.py +16 -16
  34. pulumi_nomad/namespace.py +14 -16
  35. pulumi_nomad/node_pool.py +2 -4
  36. pulumi_nomad/outputs.py +274 -182
  37. pulumi_nomad/pulumi-plugin.json +2 -1
  38. pulumi_nomad/quote_specification.py +4 -6
  39. pulumi_nomad/scheduler_config.py +6 -10
  40. pulumi_nomad/sentinel_policy.py +6 -10
  41. pulumi_nomad/variable.py +14 -18
  42. pulumi_nomad/volume.py +8 -80
  43. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.3.0.dist-info}/METADATA +1 -1
  44. pulumi_nomad-2.3.0.dist-info/RECORD +55 -0
  45. pulumi_nomad-2.2.0a1710332982.dist-info/RECORD +0 -54
  46. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.3.0.dist-info}/WHEEL +0 -0
  47. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.3.0.dist-info}/top_level.txt +0 -0
@@ -97,14 +97,12 @@ def get_allocations(filter: Optional[str] = None,
97
97
 
98
98
  ## Example Usage
99
99
 
100
- <!--Start PulumiCodeChooser -->
101
100
  ```python
102
101
  import pulumi
103
102
  import pulumi_nomad as nomad
104
103
 
105
104
  example = nomad.get_allocations(filter="JobID == \\"example\\"")
106
105
  ```
107
- <!--End PulumiCodeChooser -->
108
106
 
109
107
 
110
108
  :param str filter: `(string: <optional>)` - Specifies the
@@ -139,14 +137,12 @@ def get_allocations_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
139
137
 
140
138
  ## Example Usage
141
139
 
142
- <!--Start PulumiCodeChooser -->
143
140
  ```python
144
141
  import pulumi
145
142
  import pulumi_nomad as nomad
146
143
 
147
144
  example = nomad.get_allocations(filter="JobID == \\"example\\"")
148
145
  ```
149
- <!--End PulumiCodeChooser -->
150
146
 
151
147
 
152
148
  :param str filter: `(string: <optional>)` - Specifies the
@@ -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(ignore_down_nodes=True,
91
- prefix="prod")
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(ignore_down_nodes=True,
127
- prefix="prod")
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.
@@ -34,6 +34,11 @@ class GetDeploymentsResult:
34
34
  def deployments(self) -> Sequence[Mapping[str, Any]]:
35
35
  """
36
36
  `list of maps` a list of deployments in the cluster.
37
+ * `ID`: `string` Deployment ID.
38
+ * `JobID`: `string` Job ID associated with the deployment.
39
+ * `JobVersion`: `string` Job version.
40
+ * `Status`: `string` Deployment status.
41
+ * `StatusDescription`: `string` Detailed description of the deployment's status.
37
42
  """
38
43
  return pulumi.get(self, "deployments")
39
44
 
@@ -62,14 +67,12 @@ def get_deployments(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGet
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
69
73
 
70
74
  example = nomad.get_deployments()
71
75
  ```
72
- <!--End PulumiCodeChooser -->
73
76
  """
74
77
  __args__ = dict()
75
78
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -87,13 +90,11 @@ def get_deployments_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulum
87
90
 
88
91
  ## Example Usage
89
92
 
90
- <!--Start PulumiCodeChooser -->
91
93
  ```python
92
94
  import pulumi
93
95
  import pulumi_nomad as nomad
94
96
 
95
97
  example = nomad.get_deployments()
96
98
  ```
97
- <!--End PulumiCodeChooser -->
98
99
  """
99
100
  ...
pulumi_nomad/get_job.py CHANGED
@@ -301,7 +301,6 @@ def get_job(job_id: Optional[str] = None,
301
301
 
302
302
  Get the data about a snapshot:
303
303
 
304
- <!--Start PulumiCodeChooser -->
305
304
  ```python
306
305
  import pulumi
307
306
  import pulumi_nomad as nomad
@@ -309,7 +308,6 @@ def get_job(job_id: Optional[str] = None,
309
308
  example = nomad.get_job(job_id="example",
310
309
  namespace="dev")
311
310
  ```
312
- <!--End PulumiCodeChooser -->
313
311
 
314
312
 
315
313
  :param str job_id: `(string)` ID of the job.
@@ -360,7 +358,6 @@ def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
360
358
 
361
359
  Get the data about a snapshot:
362
360
 
363
- <!--Start PulumiCodeChooser -->
364
361
  ```python
365
362
  import pulumi
366
363
  import pulumi_nomad as nomad
@@ -368,7 +365,6 @@ def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
368
365
  example = nomad.get_job(job_id="example",
369
366
  namespace="dev")
370
367
  ```
371
- <!--End PulumiCodeChooser -->
372
368
 
373
369
 
374
370
  :param str job_id: `(string)` ID of the job.
@@ -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.
@@ -0,0 +1,116 @@
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 pulumi
8
+ import pulumi.runtime
9
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
10
+ from . import _utilities
11
+ from . import outputs
12
+
13
+ __all__ = [
14
+ 'GetJwksResult',
15
+ 'AwaitableGetJwksResult',
16
+ 'get_jwks',
17
+ 'get_jwks_output',
18
+ ]
19
+
20
+ @pulumi.output_type
21
+ class GetJwksResult:
22
+ """
23
+ A collection of values returned by getJwks.
24
+ """
25
+ def __init__(__self__, id=None, keys=None, pem_keys=None):
26
+ if id and not isinstance(id, str):
27
+ raise TypeError("Expected argument 'id' to be a str")
28
+ pulumi.set(__self__, "id", id)
29
+ if keys and not isinstance(keys, list):
30
+ raise TypeError("Expected argument 'keys' to be a list")
31
+ pulumi.set(__self__, "keys", keys)
32
+ if pem_keys and not isinstance(pem_keys, list):
33
+ raise TypeError("Expected argument 'pem_keys' to be a list")
34
+ pulumi.set(__self__, "pem_keys", pem_keys)
35
+
36
+ @property
37
+ @pulumi.getter
38
+ def id(self) -> str:
39
+ """
40
+ The provider-assigned unique ID for this managed resource.
41
+ """
42
+ return pulumi.get(self, "id")
43
+
44
+ @property
45
+ @pulumi.getter
46
+ def keys(self) -> Sequence['outputs.GetJwksKeyResult']:
47
+ """
48
+ `list of maps` a list of JWK keys in structured format: see [RFC7517](https://datatracker.ietf.org/doc/html/rfc7517) for the
49
+ JWK field meanings.
50
+ """
51
+ return pulumi.get(self, "keys")
52
+
53
+ @property
54
+ @pulumi.getter(name="pemKeys")
55
+ def pem_keys(self) -> Sequence[str]:
56
+ """
57
+ `list of strings` a list JWK keys rendered as PEM-encoded X.509 keys
58
+ """
59
+ return pulumi.get(self, "pem_keys")
60
+
61
+
62
+ class AwaitableGetJwksResult(GetJwksResult):
63
+ # pylint: disable=using-constant-test
64
+ def __await__(self):
65
+ if False:
66
+ yield self
67
+ return GetJwksResult(
68
+ id=self.id,
69
+ keys=self.keys,
70
+ pem_keys=self.pem_keys)
71
+
72
+
73
+ def get_jwks(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJwksResult:
74
+ """
75
+ Retrieve the cluster JWKS public keys.
76
+
77
+ The keys are returned both as a list of maps (`keys`), and as a list of PEM-encoded strings
78
+ (`pem_keys`), which may be more convenient for use.
79
+
80
+ ## Example Usage
81
+
82
+ ```python
83
+ import pulumi
84
+ import pulumi_nomad as nomad
85
+
86
+ example = nomad.get_jwks()
87
+ ```
88
+ """
89
+ __args__ = dict()
90
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
91
+ __ret__ = pulumi.runtime.invoke('nomad:index/getJwks:getJwks', __args__, opts=opts, typ=GetJwksResult).value
92
+
93
+ return AwaitableGetJwksResult(
94
+ id=pulumi.get(__ret__, 'id'),
95
+ keys=pulumi.get(__ret__, 'keys'),
96
+ pem_keys=pulumi.get(__ret__, 'pem_keys'))
97
+
98
+
99
+ @_utilities.lift_output_func(get_jwks)
100
+ def get_jwks_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetJwksResult]:
101
+ """
102
+ Retrieve the cluster JWKS public keys.
103
+
104
+ The keys are returned both as a list of maps (`keys`), and as a list of PEM-encoded strings
105
+ (`pem_keys`), which may be more convenient for use.
106
+
107
+ ## Example Usage
108
+
109
+ ```python
110
+ import pulumi
111
+ import pulumi_nomad as nomad
112
+
113
+ example = nomad.get_jwks()
114
+ ```
115
+ """
116
+ ...
@@ -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.
@@ -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
  ...
@@ -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.
@@ -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
@@ -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.
@@ -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
  ...
@@ -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
  ...
@@ -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.
@@ -105,14 +105,12 @@ def get_volumes(namespace: Optional[str] = None,
105
105
 
106
106
  ## Example Usage
107
107
 
108
- <!--Start PulumiCodeChooser -->
109
108
  ```python
110
109
  import pulumi
111
110
  import pulumi_nomad as nomad
112
111
 
113
112
  example = nomad.get_volumes()
114
113
  ```
115
- <!--End PulumiCodeChooser -->
116
114
 
117
115
 
118
116
  :param str namespace: `(string: "default")` Nomad namespace.
@@ -148,14 +146,12 @@ def get_volumes_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
148
146
 
149
147
  ## Example Usage
150
148
 
151
- <!--Start PulumiCodeChooser -->
152
149
  ```python
153
150
  import pulumi
154
151
  import pulumi_nomad as nomad
155
152
 
156
153
  example = nomad.get_volumes()
157
154
  ```
158
- <!--End PulumiCodeChooser -->
159
155
 
160
156
 
161
157
  :param str namespace: `(string: "default")` Nomad namespace.