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.
Files changed (44) hide show
  1. pulumi_nomad/_inputs.py +92 -146
  2. pulumi_nomad/acl_auth_method.py +46 -41
  3. pulumi_nomad/acl_policy.py +0 -64
  4. pulumi_nomad/acl_token.py +18 -26
  5. pulumi_nomad/csi_volume.py +0 -72
  6. pulumi_nomad/csi_volume_registration.py +7 -79
  7. pulumi_nomad/external_volume.py +6 -78
  8. pulumi_nomad/get_acl_policies.py +0 -4
  9. pulumi_nomad/get_acl_policy.py +0 -4
  10. pulumi_nomad/get_acl_role.py +0 -4
  11. pulumi_nomad/get_acl_roles.py +0 -4
  12. pulumi_nomad/get_acl_token.py +0 -4
  13. pulumi_nomad/get_acl_tokens.py +0 -4
  14. pulumi_nomad/get_allocations.py +21 -5
  15. pulumi_nomad/get_datacenters.py +4 -8
  16. pulumi_nomad/get_deployments.py +0 -4
  17. pulumi_nomad/get_job.py +4 -9
  18. pulumi_nomad/get_job_parser.py +0 -24
  19. pulumi_nomad/get_namespace.py +0 -4
  20. pulumi_nomad/get_namespaces.py +2 -4
  21. pulumi_nomad/get_node_pool.py +0 -4
  22. pulumi_nomad/get_node_pools.py +0 -4
  23. pulumi_nomad/get_plugin.py +0 -4
  24. pulumi_nomad/get_plugins.py +0 -4
  25. pulumi_nomad/get_regions.py +34 -0
  26. pulumi_nomad/get_scaling_policies.py +0 -4
  27. pulumi_nomad/get_scaling_policy.py +0 -4
  28. pulumi_nomad/get_scheduler_policy.py +0 -4
  29. pulumi_nomad/get_variable.py +0 -4
  30. pulumi_nomad/get_volumes.py +0 -4
  31. pulumi_nomad/job.py +16 -16
  32. pulumi_nomad/namespace.py +14 -16
  33. pulumi_nomad/node_pool.py +2 -4
  34. pulumi_nomad/outputs.py +94 -148
  35. pulumi_nomad/quote_specification.py +4 -6
  36. pulumi_nomad/scheduler_config.py +6 -10
  37. pulumi_nomad/sentinel_policy.py +6 -10
  38. pulumi_nomad/variable.py +14 -18
  39. pulumi_nomad/volume.py +15 -87
  40. {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/METADATA +1 -1
  41. pulumi_nomad-2.2.1.dist-info/RECORD +54 -0
  42. {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/WHEEL +1 -1
  43. pulumi_nomad-2.2.0a1710156747.dist-info/RECORD +0 -54
  44. {pulumi_nomad-2.2.0a1710156747.dist-info → pulumi_nomad-2.2.1.dist-info}/top_level.txt +0 -0
@@ -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.
pulumi_nomad/job.py CHANGED
@@ -74,8 +74,8 @@ class JobArgs:
74
74
  if purge_on_destroy is not None:
75
75
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
76
76
  if read_allocation_ids is not None:
77
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
78
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
77
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
78
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
79
79
  if read_allocation_ids is not None:
80
80
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
81
81
  if rerun_if_dead is not None:
@@ -214,8 +214,8 @@ class JobArgs:
214
214
  @property
215
215
  @pulumi.getter(name="readAllocationIds")
216
216
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
217
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
218
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
217
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
218
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
219
219
 
220
220
  return pulumi.get(self, "read_allocation_ids")
221
221
 
@@ -313,8 +313,8 @@ class _JobState:
313
313
  Will fallback to the value declared in Nomad provider configuration, if any.
314
314
  """
315
315
  if allocation_ids is not None:
316
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
317
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
316
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
317
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
318
318
  if allocation_ids is not None:
319
319
  pulumi.set(__self__, "allocation_ids", allocation_ids)
320
320
  if consul_token is not None:
@@ -350,8 +350,8 @@ class _JobState:
350
350
  if purge_on_destroy is not None:
351
351
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
352
352
  if read_allocation_ids is not None:
353
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
354
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
353
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
354
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
355
355
  if read_allocation_ids is not None:
356
356
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
357
357
  if region is not None:
@@ -373,8 +373,8 @@ class _JobState:
373
373
  """
374
374
  The IDs for allocations associated with this job.
375
375
  """
376
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
377
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
376
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
377
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
378
378
 
379
379
  return pulumi.get(self, "allocation_ids")
380
380
 
@@ -585,8 +585,8 @@ class _JobState:
585
585
  @property
586
586
  @pulumi.getter(name="readAllocationIds")
587
587
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
588
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
589
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
588
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
589
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
590
590
 
591
591
  return pulumi.get(self, "read_allocation_ids")
592
592
 
@@ -895,8 +895,8 @@ class Job(pulumi.CustomResource):
895
895
  """
896
896
  The IDs for allocations associated with this job.
897
897
  """
898
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
899
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
898
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
899
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
900
900
 
901
901
  return pulumi.get(self, "allocation_ids")
902
902
 
@@ -1039,8 +1039,8 @@ class Job(pulumi.CustomResource):
1039
1039
  @property
1040
1040
  @pulumi.getter(name="readAllocationIds")
1041
1041
  def read_allocation_ids(self) -> pulumi.Output[Optional[bool]]:
1042
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
1043
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
1042
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
1043
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
1044
1044
 
1045
1045
  return pulumi.get(self, "read_allocation_ids")
1046
1046
 
pulumi_nomad/namespace.py CHANGED
@@ -249,29 +249,28 @@ class Namespace(pulumi.CustomResource):
249
249
 
250
250
  Registering a namespace:
251
251
 
252
- <!--Start PulumiCodeChooser -->
253
252
  ```python
254
253
  import pulumi
255
254
  import pulumi_nomad as nomad
256
255
 
257
256
  dev = nomad.Namespace("dev",
257
+ name="dev",
258
258
  description="Shared development environment.",
259
+ quota="dev",
259
260
  meta={
260
- "foo": "bar",
261
261
  "owner": "John Doe",
262
- },
263
- quota="dev")
262
+ "foo": "bar",
263
+ })
264
264
  ```
265
- <!--End PulumiCodeChooser -->
266
265
 
267
266
  Registering a namespace with a quota:
268
267
 
269
- <!--Start PulumiCodeChooser -->
270
268
  ```python
271
269
  import pulumi
272
270
  import pulumi_nomad as nomad
273
271
 
274
- web_team = nomad.QuoteSpecification("webTeam",
272
+ web_team = nomad.QuoteSpecification("web_team",
273
+ name="web-team",
275
274
  description="web team quota",
276
275
  limits=[nomad.QuoteSpecificationLimitArgs(
277
276
  region="global",
@@ -281,10 +280,10 @@ class Namespace(pulumi.CustomResource):
281
280
  ),
282
281
  )])
283
282
  web = nomad.Namespace("web",
283
+ name="web",
284
284
  description="Web team production environment.",
285
285
  quota=web_team.name)
286
286
  ```
287
- <!--End PulumiCodeChooser -->
288
287
 
289
288
  :param str resource_name: The name of the resource.
290
289
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -314,29 +313,28 @@ class Namespace(pulumi.CustomResource):
314
313
 
315
314
  Registering a namespace:
316
315
 
317
- <!--Start PulumiCodeChooser -->
318
316
  ```python
319
317
  import pulumi
320
318
  import pulumi_nomad as nomad
321
319
 
322
320
  dev = nomad.Namespace("dev",
321
+ name="dev",
323
322
  description="Shared development environment.",
323
+ quota="dev",
324
324
  meta={
325
- "foo": "bar",
326
325
  "owner": "John Doe",
327
- },
328
- quota="dev")
326
+ "foo": "bar",
327
+ })
329
328
  ```
330
- <!--End PulumiCodeChooser -->
331
329
 
332
330
  Registering a namespace with a quota:
333
331
 
334
- <!--Start PulumiCodeChooser -->
335
332
  ```python
336
333
  import pulumi
337
334
  import pulumi_nomad as nomad
338
335
 
339
- web_team = nomad.QuoteSpecification("webTeam",
336
+ web_team = nomad.QuoteSpecification("web_team",
337
+ name="web-team",
340
338
  description="web team quota",
341
339
  limits=[nomad.QuoteSpecificationLimitArgs(
342
340
  region="global",
@@ -346,10 +344,10 @@ class Namespace(pulumi.CustomResource):
346
344
  ),
347
345
  )])
348
346
  web = nomad.Namespace("web",
347
+ name="web",
349
348
  description="Web team production environment.",
350
349
  quota=web_team.name)
351
350
  ```
352
- <!--End PulumiCodeChooser -->
353
351
 
354
352
  :param str resource_name: The name of the resource.
355
353
  :param NamespaceArgs args: The arguments to use to populate this resource's properties.
pulumi_nomad/node_pool.py CHANGED
@@ -178,19 +178,18 @@ class NodePool(pulumi.CustomResource):
178
178
 
179
179
  Registering a node pool:
180
180
 
181
- <!--Start PulumiCodeChooser -->
182
181
  ```python
183
182
  import pulumi
184
183
  import pulumi_nomad as nomad
185
184
 
186
185
  dev = nomad.NodePool("dev",
186
+ name="dev",
187
187
  description="Nodes for the development environment.",
188
188
  meta={
189
189
  "department": "Engineering",
190
190
  "env": "dev",
191
191
  })
192
192
  ```
193
- <!--End PulumiCodeChooser -->
194
193
 
195
194
  :param str resource_name: The name of the resource.
196
195
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -213,19 +212,18 @@ class NodePool(pulumi.CustomResource):
213
212
 
214
213
  Registering a node pool:
215
214
 
216
- <!--Start PulumiCodeChooser -->
217
215
  ```python
218
216
  import pulumi
219
217
  import pulumi_nomad as nomad
220
218
 
221
219
  dev = nomad.NodePool("dev",
220
+ name="dev",
222
221
  description="Nodes for the development environment.",
223
222
  meta={
224
223
  "department": "Engineering",
225
224
  "env": "dev",
226
225
  })
227
226
  ```
228
- <!--End PulumiCodeChooser -->
229
227
 
230
228
  :param str resource_name: The name of the resource.
231
229
  :param NodePoolArgs args: The arguments to use to populate this resource's properties.