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.
Files changed (54) hide show
  1. pulumi_nomad/__init__.py +1 -0
  2. pulumi_nomad/_inputs.py +896 -175
  3. pulumi_nomad/_utilities.py +41 -5
  4. pulumi_nomad/acl_auth_method.py +44 -41
  5. pulumi_nomad/acl_binding_rule.py +5 -0
  6. pulumi_nomad/acl_policy.py +10 -69
  7. pulumi_nomad/acl_role.py +10 -5
  8. pulumi_nomad/acl_token.py +28 -31
  9. pulumi_nomad/config/__init__.pyi +5 -0
  10. pulumi_nomad/config/outputs.py +5 -0
  11. pulumi_nomad/config/vars.py +5 -0
  12. pulumi_nomad/csi_volume.py +21 -88
  13. pulumi_nomad/csi_volume_registration.py +21 -88
  14. pulumi_nomad/external_volume.py +65 -132
  15. pulumi_nomad/get_acl_policies.py +14 -9
  16. pulumi_nomad/get_acl_policy.py +15 -9
  17. pulumi_nomad/get_acl_role.py +15 -9
  18. pulumi_nomad/get_acl_roles.py +14 -9
  19. pulumi_nomad/get_acl_token.py +22 -9
  20. pulumi_nomad/get_acl_tokens.py +14 -9
  21. pulumi_nomad/get_allocations.py +18 -9
  22. pulumi_nomad/get_datacenters.py +20 -13
  23. pulumi_nomad/get_deployments.py +18 -10
  24. pulumi_nomad/get_job.py +34 -9
  25. pulumi_nomad/get_job_parser.py +16 -29
  26. pulumi_nomad/get_jwks.py +124 -0
  27. pulumi_nomad/get_namespace.py +18 -9
  28. pulumi_nomad/get_namespaces.py +14 -9
  29. pulumi_nomad/get_node_pool.py +16 -9
  30. pulumi_nomad/get_node_pools.py +16 -9
  31. pulumi_nomad/get_plugin.py +25 -9
  32. pulumi_nomad/get_plugins.py +15 -10
  33. pulumi_nomad/get_regions.py +46 -5
  34. pulumi_nomad/get_scaling_policies.py +16 -9
  35. pulumi_nomad/get_scaling_policy.py +19 -10
  36. pulumi_nomad/get_scheduler_policy.py +14 -9
  37. pulumi_nomad/get_variable.py +17 -10
  38. pulumi_nomad/get_volumes.py +21 -10
  39. pulumi_nomad/job.py +22 -88
  40. pulumi_nomad/namespace.py +43 -40
  41. pulumi_nomad/node_pool.py +12 -9
  42. pulumi_nomad/outputs.py +293 -165
  43. pulumi_nomad/provider.py +8 -3
  44. pulumi_nomad/pulumi-plugin.json +2 -1
  45. pulumi_nomad/quote_specification.py +28 -25
  46. pulumi_nomad/scheduler_config.py +11 -10
  47. pulumi_nomad/sentinel_policy.py +11 -10
  48. pulumi_nomad/variable.py +33 -32
  49. pulumi_nomad/volume.py +73 -152
  50. {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/METADATA +7 -6
  51. pulumi_nomad-2.5.0a1736834448.dist-info/RECORD +55 -0
  52. {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/WHEEL +1 -1
  53. pulumi_nomad-2.3.0a1710649436.dist-info/RECORD +0 -54
  54. {pulumi_nomad-2.3.0a1710649436.dist-info → pulumi_nomad-2.5.0a1736834448.dist-info}/top_level.txt +0 -0
pulumi_nomad/job.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
  from ._inputs import *
@@ -21,7 +26,6 @@ class JobArgs:
21
26
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
22
27
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
23
28
  detach: Optional[pulumi.Input[bool]] = None,
24
- hcl1: Optional[pulumi.Input[bool]] = None,
25
29
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
26
30
  json: Optional[pulumi.Input[bool]] = None,
27
31
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -39,9 +43,6 @@ class JobArgs:
39
43
  deregistered if the ID of the job in the jobspec changes.
40
44
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
41
45
  after creating or updating, instead of monitoring.
42
- :param pulumi.Input[bool] hcl1: `(boolean: false)` - Set this to `true` to use the previous HCL1
43
- parser. This option is provided for backwards compatibility only and should
44
- not be used unless absolutely necessary.
45
46
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
46
47
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
47
48
  JSON instead of the default HCL.
@@ -63,8 +64,6 @@ class JobArgs:
63
64
  pulumi.set(__self__, "deregister_on_id_change", deregister_on_id_change)
64
65
  if detach is not None:
65
66
  pulumi.set(__self__, "detach", detach)
66
- if hcl1 is not None:
67
- pulumi.set(__self__, "hcl1", hcl1)
68
67
  if hcl2 is not None:
69
68
  pulumi.set(__self__, "hcl2", hcl2)
70
69
  if json is not None:
@@ -74,8 +73,8 @@ class JobArgs:
74
73
  if purge_on_destroy is not None:
75
74
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
76
75
  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.""")
76
+ 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)
77
+ 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
78
  if read_allocation_ids is not None:
80
79
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
81
80
  if rerun_if_dead is not None:
@@ -146,20 +145,6 @@ class JobArgs:
146
145
  def detach(self, value: Optional[pulumi.Input[bool]]):
147
146
  pulumi.set(self, "detach", value)
148
147
 
149
- @property
150
- @pulumi.getter
151
- def hcl1(self) -> Optional[pulumi.Input[bool]]:
152
- """
153
- `(boolean: false)` - Set this to `true` to use the previous HCL1
154
- parser. This option is provided for backwards compatibility only and should
155
- not be used unless absolutely necessary.
156
- """
157
- return pulumi.get(self, "hcl1")
158
-
159
- @hcl1.setter
160
- def hcl1(self, value: Optional[pulumi.Input[bool]]):
161
- pulumi.set(self, "hcl1", value)
162
-
163
148
  @property
164
149
  @pulumi.getter
165
150
  def hcl2(self) -> Optional[pulumi.Input['JobHcl2Args']]:
@@ -213,10 +198,8 @@ class JobArgs:
213
198
 
214
199
  @property
215
200
  @pulumi.getter(name="readAllocationIds")
201
+ @_utilities.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.""")
216
202
  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.""")
219
-
220
203
  return pulumi.get(self, "read_allocation_ids")
221
204
 
222
205
  @read_allocation_ids.setter
@@ -261,7 +244,6 @@ class _JobState:
261
244
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
262
245
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
263
246
  detach: Optional[pulumi.Input[bool]] = None,
264
- hcl1: Optional[pulumi.Input[bool]] = None,
265
247
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
266
248
  jobspec: Optional[pulumi.Input[str]] = None,
267
249
  json: Optional[pulumi.Input[bool]] = None,
@@ -290,9 +272,6 @@ class _JobState:
290
272
  deregistered if the ID of the job in the jobspec changes.
291
273
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
292
274
  after creating or updating, instead of monitoring.
293
- :param pulumi.Input[bool] hcl1: `(boolean: false)` - Set this to `true` to use the previous HCL1
294
- parser. This option is provided for backwards compatibility only and should
295
- not be used unless absolutely necessary.
296
275
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
297
276
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
298
277
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
@@ -313,8 +292,8 @@ class _JobState:
313
292
  Will fallback to the value declared in Nomad provider configuration, if any.
314
293
  """
315
294
  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.""")
295
+ 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)
296
+ 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
297
  if allocation_ids is not None:
319
298
  pulumi.set(__self__, "allocation_ids", allocation_ids)
320
299
  if consul_token is not None:
@@ -331,8 +310,6 @@ class _JobState:
331
310
  pulumi.set(__self__, "deregister_on_id_change", deregister_on_id_change)
332
311
  if detach is not None:
333
312
  pulumi.set(__self__, "detach", detach)
334
- if hcl1 is not None:
335
- pulumi.set(__self__, "hcl1", hcl1)
336
313
  if hcl2 is not None:
337
314
  pulumi.set(__self__, "hcl2", hcl2)
338
315
  if jobspec is not None:
@@ -350,8 +327,8 @@ class _JobState:
350
327
  if purge_on_destroy is not None:
351
328
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
352
329
  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.""")
330
+ 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)
331
+ 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
332
  if read_allocation_ids is not None:
356
333
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
357
334
  if region is not None:
@@ -369,13 +346,11 @@ class _JobState:
369
346
 
370
347
  @property
371
348
  @pulumi.getter(name="allocationIds")
349
+ @_utilities.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.""")
372
350
  def allocation_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
373
351
  """
374
352
  The IDs for allocations associated with this job.
375
353
  """
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.""")
378
-
379
354
  return pulumi.get(self, "allocation_ids")
380
355
 
381
356
  @allocation_ids.setter
@@ -469,20 +444,6 @@ class _JobState:
469
444
  def detach(self, value: Optional[pulumi.Input[bool]]):
470
445
  pulumi.set(self, "detach", value)
471
446
 
472
- @property
473
- @pulumi.getter
474
- def hcl1(self) -> Optional[pulumi.Input[bool]]:
475
- """
476
- `(boolean: false)` - Set this to `true` to use the previous HCL1
477
- parser. This option is provided for backwards compatibility only and should
478
- not be used unless absolutely necessary.
479
- """
480
- return pulumi.get(self, "hcl1")
481
-
482
- @hcl1.setter
483
- def hcl1(self, value: Optional[pulumi.Input[bool]]):
484
- pulumi.set(self, "hcl1", value)
485
-
486
447
  @property
487
448
  @pulumi.getter
488
449
  def hcl2(self) -> Optional[pulumi.Input['JobHcl2Args']]:
@@ -584,10 +545,8 @@ class _JobState:
584
545
 
585
546
  @property
586
547
  @pulumi.getter(name="readAllocationIds")
548
+ @_utilities.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.""")
587
549
  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.""")
590
-
591
550
  return pulumi.get(self, "read_allocation_ids")
592
551
 
593
552
  @read_allocation_ids.setter
@@ -675,8 +634,7 @@ class Job(pulumi.CustomResource):
675
634
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
676
635
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
677
636
  detach: Optional[pulumi.Input[bool]] = None,
678
- hcl1: Optional[pulumi.Input[bool]] = None,
679
- hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
637
+ hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
680
638
  jobspec: Optional[pulumi.Input[str]] = None,
681
639
  json: Optional[pulumi.Input[bool]] = None,
682
640
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -696,10 +654,7 @@ class Job(pulumi.CustomResource):
696
654
  deregistered if the ID of the job in the jobspec changes.
697
655
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
698
656
  after creating or updating, instead of monitoring.
699
- :param pulumi.Input[bool] hcl1: `(boolean: false)` - Set this to `true` to use the previous HCL1
700
- parser. This option is provided for backwards compatibility only and should
701
- not be used unless absolutely necessary.
702
- :param pulumi.Input[pulumi.InputType['JobHcl2Args']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
657
+ :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
703
658
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
704
659
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
705
660
  JSON instead of the default HCL.
@@ -739,8 +694,7 @@ class Job(pulumi.CustomResource):
739
694
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
740
695
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
741
696
  detach: Optional[pulumi.Input[bool]] = None,
742
- hcl1: Optional[pulumi.Input[bool]] = None,
743
- hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
697
+ hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
744
698
  jobspec: Optional[pulumi.Input[str]] = None,
745
699
  json: Optional[pulumi.Input[bool]] = None,
746
700
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -761,7 +715,6 @@ class Job(pulumi.CustomResource):
761
715
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
762
716
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
763
717
  __props__.__dict__["detach"] = detach
764
- __props__.__dict__["hcl1"] = hcl1
765
718
  __props__.__dict__["hcl2"] = hcl2
766
719
  if jobspec is None and not opts.urn:
767
720
  raise TypeError("Missing required property 'jobspec'")
@@ -803,8 +756,7 @@ class Job(pulumi.CustomResource):
803
756
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
804
757
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
805
758
  detach: Optional[pulumi.Input[bool]] = None,
806
- hcl1: Optional[pulumi.Input[bool]] = None,
807
- hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
759
+ hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
808
760
  jobspec: Optional[pulumi.Input[str]] = None,
809
761
  json: Optional[pulumi.Input[bool]] = None,
810
762
  modify_index: Optional[pulumi.Input[str]] = None,
@@ -816,7 +768,7 @@ class Job(pulumi.CustomResource):
816
768
  region: Optional[pulumi.Input[str]] = None,
817
769
  rerun_if_dead: Optional[pulumi.Input[bool]] = None,
818
770
  status: Optional[pulumi.Input[str]] = None,
819
- task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['JobTaskGroupArgs']]]]] = None,
771
+ task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['JobTaskGroupArgs', 'JobTaskGroupArgsDict']]]]] = None,
820
772
  type: Optional[pulumi.Input[str]] = None,
821
773
  vault_token: Optional[pulumi.Input[str]] = None) -> 'Job':
822
774
  """
@@ -837,10 +789,7 @@ class Job(pulumi.CustomResource):
837
789
  deregistered if the ID of the job in the jobspec changes.
838
790
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
839
791
  after creating or updating, instead of monitoring.
840
- :param pulumi.Input[bool] hcl1: `(boolean: false)` - Set this to `true` to use the previous HCL1
841
- parser. This option is provided for backwards compatibility only and should
842
- not be used unless absolutely necessary.
843
- :param pulumi.Input[pulumi.InputType['JobHcl2Args']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
792
+ :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
844
793
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
845
794
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
846
795
  JSON instead of the default HCL.
@@ -871,7 +820,6 @@ class Job(pulumi.CustomResource):
871
820
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
872
821
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
873
822
  __props__.__dict__["detach"] = detach
874
- __props__.__dict__["hcl1"] = hcl1
875
823
  __props__.__dict__["hcl2"] = hcl2
876
824
  __props__.__dict__["jobspec"] = jobspec
877
825
  __props__.__dict__["json"] = json
@@ -891,13 +839,11 @@ class Job(pulumi.CustomResource):
891
839
 
892
840
  @property
893
841
  @pulumi.getter(name="allocationIds")
842
+ @_utilities.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.""")
894
843
  def allocation_ids(self) -> pulumi.Output[Sequence[str]]:
895
844
  """
896
845
  The IDs for allocations associated with this job.
897
846
  """
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.""")
900
-
901
847
  return pulumi.get(self, "allocation_ids")
902
848
 
903
849
  @property
@@ -959,16 +905,6 @@ class Job(pulumi.CustomResource):
959
905
  """
960
906
  return pulumi.get(self, "detach")
961
907
 
962
- @property
963
- @pulumi.getter
964
- def hcl1(self) -> pulumi.Output[Optional[bool]]:
965
- """
966
- `(boolean: false)` - Set this to `true` to use the previous HCL1
967
- parser. This option is provided for backwards compatibility only and should
968
- not be used unless absolutely necessary.
969
- """
970
- return pulumi.get(self, "hcl1")
971
-
972
908
  @property
973
909
  @pulumi.getter
974
910
  def hcl2(self) -> pulumi.Output[Optional['outputs.JobHcl2']]:
@@ -1038,10 +974,8 @@ class Job(pulumi.CustomResource):
1038
974
 
1039
975
  @property
1040
976
  @pulumi.getter(name="readAllocationIds")
977
+ @_utilities.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.""")
1041
978
  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.""")
1044
-
1045
979
  return pulumi.get(self, "read_allocation_ids")
1046
980
 
1047
981
  @property
pulumi_nomad/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
  from ._inputs import *
@@ -230,11 +235,11 @@ class Namespace(pulumi.CustomResource):
230
235
  def __init__(__self__,
231
236
  resource_name: str,
232
237
  opts: Optional[pulumi.ResourceOptions] = None,
233
- capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
238
+ capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
234
239
  description: Optional[pulumi.Input[str]] = None,
235
240
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
236
241
  name: Optional[pulumi.Input[str]] = None,
237
- node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
242
+ node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
238
243
  quota: Optional[pulumi.Input[str]] = None,
239
244
  __props__=None):
240
245
  """
@@ -249,51 +254,50 @@ class Namespace(pulumi.CustomResource):
249
254
 
250
255
  Registering a namespace:
251
256
 
252
- <!--Start PulumiCodeChooser -->
253
257
  ```python
254
258
  import pulumi
255
259
  import pulumi_nomad as nomad
256
260
 
257
261
  dev = nomad.Namespace("dev",
262
+ name="dev",
258
263
  description="Shared development environment.",
264
+ quota="dev",
259
265
  meta={
260
- "foo": "bar",
261
266
  "owner": "John Doe",
262
- },
263
- quota="dev")
267
+ "foo": "bar",
268
+ })
264
269
  ```
265
- <!--End PulumiCodeChooser -->
266
270
 
267
271
  Registering a namespace with a quota:
268
272
 
269
- <!--Start PulumiCodeChooser -->
270
273
  ```python
271
274
  import pulumi
272
275
  import pulumi_nomad as nomad
273
276
 
274
- web_team = nomad.QuoteSpecification("webTeam",
277
+ web_team = nomad.QuoteSpecification("web_team",
278
+ name="web-team",
275
279
  description="web team quota",
276
- limits=[nomad.QuoteSpecificationLimitArgs(
277
- region="global",
278
- region_limit=nomad.QuoteSpecificationLimitRegionLimitArgs(
279
- cpu=1000,
280
- memory_mb=256,
281
- ),
282
- )])
280
+ limits=[{
281
+ "region": "global",
282
+ "region_limit": {
283
+ "cpu": 1000,
284
+ "memory_mb": 256,
285
+ },
286
+ }])
283
287
  web = nomad.Namespace("web",
288
+ name="web",
284
289
  description="Web team production environment.",
285
290
  quota=web_team.name)
286
291
  ```
287
- <!--End PulumiCodeChooser -->
288
292
 
289
293
  :param str resource_name: The name of the resource.
290
294
  :param pulumi.ResourceOptions opts: Options for the resource.
291
- :param pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
295
+ :param pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
292
296
  be repeated. See below for the structure of this block.
293
297
  :param pulumi.Input[str] description: `(string: "")` - A description of the namespace.
294
298
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string: <optional>)` - Specifies arbitrary KV metadata to associate with the namespace.
295
299
  :param pulumi.Input[str] name: `(string: <required>)` - A unique name for the namespace.
296
- :param pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
300
+ :param pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
297
301
  :param pulumi.Input[str] quota: `(string: "")` - A resource quota to attach to the namespace.
298
302
  """
299
303
  ...
@@ -314,42 +318,41 @@ class Namespace(pulumi.CustomResource):
314
318
 
315
319
  Registering a namespace:
316
320
 
317
- <!--Start PulumiCodeChooser -->
318
321
  ```python
319
322
  import pulumi
320
323
  import pulumi_nomad as nomad
321
324
 
322
325
  dev = nomad.Namespace("dev",
326
+ name="dev",
323
327
  description="Shared development environment.",
328
+ quota="dev",
324
329
  meta={
325
- "foo": "bar",
326
330
  "owner": "John Doe",
327
- },
328
- quota="dev")
331
+ "foo": "bar",
332
+ })
329
333
  ```
330
- <!--End PulumiCodeChooser -->
331
334
 
332
335
  Registering a namespace with a quota:
333
336
 
334
- <!--Start PulumiCodeChooser -->
335
337
  ```python
336
338
  import pulumi
337
339
  import pulumi_nomad as nomad
338
340
 
339
- web_team = nomad.QuoteSpecification("webTeam",
341
+ web_team = nomad.QuoteSpecification("web_team",
342
+ name="web-team",
340
343
  description="web team quota",
341
- limits=[nomad.QuoteSpecificationLimitArgs(
342
- region="global",
343
- region_limit=nomad.QuoteSpecificationLimitRegionLimitArgs(
344
- cpu=1000,
345
- memory_mb=256,
346
- ),
347
- )])
344
+ limits=[{
345
+ "region": "global",
346
+ "region_limit": {
347
+ "cpu": 1000,
348
+ "memory_mb": 256,
349
+ },
350
+ }])
348
351
  web = nomad.Namespace("web",
352
+ name="web",
349
353
  description="Web team production environment.",
350
354
  quota=web_team.name)
351
355
  ```
352
- <!--End PulumiCodeChooser -->
353
356
 
354
357
  :param str resource_name: The name of the resource.
355
358
  :param NamespaceArgs args: The arguments to use to populate this resource's properties.
@@ -366,11 +369,11 @@ class Namespace(pulumi.CustomResource):
366
369
  def _internal_init(__self__,
367
370
  resource_name: str,
368
371
  opts: Optional[pulumi.ResourceOptions] = None,
369
- capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
372
+ capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
370
373
  description: Optional[pulumi.Input[str]] = None,
371
374
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
372
375
  name: Optional[pulumi.Input[str]] = None,
373
- node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
376
+ node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
374
377
  quota: Optional[pulumi.Input[str]] = None,
375
378
  __props__=None):
376
379
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -397,11 +400,11 @@ class Namespace(pulumi.CustomResource):
397
400
  def get(resource_name: str,
398
401
  id: pulumi.Input[str],
399
402
  opts: Optional[pulumi.ResourceOptions] = None,
400
- capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
403
+ capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
401
404
  description: Optional[pulumi.Input[str]] = None,
402
405
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
403
406
  name: Optional[pulumi.Input[str]] = None,
404
- node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
407
+ node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
405
408
  quota: Optional[pulumi.Input[str]] = None) -> 'Namespace':
406
409
  """
407
410
  Get an existing Namespace resource's state with the given name, id, and optional extra
@@ -410,12 +413,12 @@ class Namespace(pulumi.CustomResource):
410
413
  :param str resource_name: The unique name of the resulting resource.
411
414
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
412
415
  :param pulumi.ResourceOptions opts: Options for the resource.
413
- :param pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
416
+ :param pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
414
417
  be repeated. See below for the structure of this block.
415
418
  :param pulumi.Input[str] description: `(string: "")` - A description of the namespace.
416
419
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string: <optional>)` - Specifies arbitrary KV metadata to associate with the namespace.
417
420
  :param pulumi.Input[str] name: `(string: <required>)` - A unique name for the namespace.
418
- :param pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
421
+ :param pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
419
422
  :param pulumi.Input[str] quota: `(string: "")` - A resource quota to attach to the namespace.
420
423
  """
421
424
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
pulumi_nomad/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
  from ._inputs import *
@@ -169,7 +174,7 @@ class NodePool(pulumi.CustomResource):
169
174
  description: Optional[pulumi.Input[str]] = None,
170
175
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
171
176
  name: Optional[pulumi.Input[str]] = None,
172
- scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None,
177
+ scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None,
173
178
  __props__=None):
174
179
  """
175
180
  Provisions a node pool within a Nomad cluster.
@@ -178,19 +183,18 @@ class NodePool(pulumi.CustomResource):
178
183
 
179
184
  Registering a node pool:
180
185
 
181
- <!--Start PulumiCodeChooser -->
182
186
  ```python
183
187
  import pulumi
184
188
  import pulumi_nomad as nomad
185
189
 
186
190
  dev = nomad.NodePool("dev",
191
+ name="dev",
187
192
  description="Nodes for the development environment.",
188
193
  meta={
189
194
  "department": "Engineering",
190
195
  "env": "dev",
191
196
  })
192
197
  ```
193
- <!--End PulumiCodeChooser -->
194
198
 
195
199
  :param str resource_name: The name of the resource.
196
200
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -198,7 +202,7 @@ class NodePool(pulumi.CustomResource):
198
202
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string)` - Arbitrary KV metadata associated with the
199
203
  node pool.
200
204
  :param pulumi.Input[str] name: `(string)` - The name of the node pool.
201
- :param pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
205
+ :param pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
202
206
  """
203
207
  ...
204
208
  @overload
@@ -213,19 +217,18 @@ class NodePool(pulumi.CustomResource):
213
217
 
214
218
  Registering a node pool:
215
219
 
216
- <!--Start PulumiCodeChooser -->
217
220
  ```python
218
221
  import pulumi
219
222
  import pulumi_nomad as nomad
220
223
 
221
224
  dev = nomad.NodePool("dev",
225
+ name="dev",
222
226
  description="Nodes for the development environment.",
223
227
  meta={
224
228
  "department": "Engineering",
225
229
  "env": "dev",
226
230
  })
227
231
  ```
228
- <!--End PulumiCodeChooser -->
229
232
 
230
233
  :param str resource_name: The name of the resource.
231
234
  :param NodePoolArgs args: The arguments to use to populate this resource's properties.
@@ -245,7 +248,7 @@ class NodePool(pulumi.CustomResource):
245
248
  description: Optional[pulumi.Input[str]] = None,
246
249
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
247
250
  name: Optional[pulumi.Input[str]] = None,
248
- scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None,
251
+ scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None,
249
252
  __props__=None):
250
253
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
251
254
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -272,7 +275,7 @@ class NodePool(pulumi.CustomResource):
272
275
  description: Optional[pulumi.Input[str]] = None,
273
276
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
274
277
  name: Optional[pulumi.Input[str]] = None,
275
- scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None) -> 'NodePool':
278
+ scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None) -> 'NodePool':
276
279
  """
277
280
  Get an existing NodePool resource's state with the given name, id, and optional extra
278
281
  properties used to qualify the lookup.
@@ -284,7 +287,7 @@ class NodePool(pulumi.CustomResource):
284
287
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string)` - Arbitrary KV metadata associated with the
285
288
  node pool.
286
289
  :param pulumi.Input[str] name: `(string)` - The name of the node pool.
287
- :param pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
290
+ :param pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
288
291
  """
289
292
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
290
293