pulumi-nomad 2.4.0__py3-none-any.whl → 2.4.0a1717653571__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 (53) hide show
  1. pulumi_nomad/_inputs.py +34 -723
  2. pulumi_nomad/_utilities.py +5 -41
  3. pulumi_nomad/acl_auth_method.py +23 -28
  4. pulumi_nomad/acl_binding_rule.py +0 -5
  5. pulumi_nomad/acl_policy.py +5 -10
  6. pulumi_nomad/acl_role.py +5 -10
  7. pulumi_nomad/acl_token.py +5 -10
  8. pulumi_nomad/config/__init__.pyi +0 -5
  9. pulumi_nomad/config/outputs.py +0 -5
  10. pulumi_nomad/config/vars.py +0 -5
  11. pulumi_nomad/csi_volume.py +16 -21
  12. pulumi_nomad/csi_volume_registration.py +16 -21
  13. pulumi_nomad/external_volume.py +54 -59
  14. pulumi_nomad/get_acl_policies.py +4 -13
  15. pulumi_nomad/get_acl_policy.py +4 -14
  16. pulumi_nomad/get_acl_role.py +4 -14
  17. pulumi_nomad/get_acl_roles.py +4 -13
  18. pulumi_nomad/get_acl_token.py +4 -21
  19. pulumi_nomad/get_acl_tokens.py +4 -13
  20. pulumi_nomad/get_allocations.py +4 -17
  21. pulumi_nomad/get_datacenters.py +4 -15
  22. pulumi_nomad/get_deployments.py +5 -12
  23. pulumi_nomad/get_job.py +4 -33
  24. pulumi_nomad/get_job_parser.py +4 -15
  25. pulumi_nomad/get_jwks.py +4 -12
  26. pulumi_nomad/get_namespace.py +4 -17
  27. pulumi_nomad/get_namespaces.py +4 -11
  28. pulumi_nomad/get_node_pool.py +4 -15
  29. pulumi_nomad/get_node_pools.py +4 -15
  30. pulumi_nomad/get_plugin.py +4 -24
  31. pulumi_nomad/get_plugins.py +5 -14
  32. pulumi_nomad/get_regions.py +4 -11
  33. pulumi_nomad/get_scaling_policies.py +4 -15
  34. pulumi_nomad/get_scaling_policy.py +5 -18
  35. pulumi_nomad/get_scheduler_policy.py +4 -13
  36. pulumi_nomad/get_variable.py +5 -16
  37. pulumi_nomad/get_volumes.py +5 -20
  38. pulumi_nomad/job.py +82 -16
  39. pulumi_nomad/namespace.py +24 -29
  40. pulumi_nomad/node_pool.py +5 -10
  41. pulumi_nomad/outputs.py +31 -67
  42. pulumi_nomad/provider.py +3 -8
  43. pulumi_nomad/pulumi-plugin.json +1 -1
  44. pulumi_nomad/quote_specification.py +19 -24
  45. pulumi_nomad/scheduler_config.py +0 -5
  46. pulumi_nomad/sentinel_policy.py +0 -5
  47. pulumi_nomad/variable.py +14 -19
  48. pulumi_nomad/volume.py +72 -65
  49. {pulumi_nomad-2.4.0.dist-info → pulumi_nomad-2.4.0a1717653571.dist-info}/METADATA +2 -3
  50. pulumi_nomad-2.4.0a1717653571.dist-info/RECORD +55 -0
  51. {pulumi_nomad-2.4.0.dist-info → pulumi_nomad-2.4.0a1717653571.dist-info}/WHEEL +1 -1
  52. pulumi_nomad-2.4.0.dist-info/RECORD +0 -55
  53. {pulumi_nomad-2.4.0.dist-info → pulumi_nomad-2.4.0a1717653571.dist-info}/top_level.txt +0 -0
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
 
17
12
  __all__ = [
@@ -107,6 +102,9 @@ def get_scheduler_policy(opts: Optional[pulumi.InvokeOptions] = None) -> Awaitab
107
102
  memory_oversubscription_enabled=pulumi.get(__ret__, 'memory_oversubscription_enabled'),
108
103
  preemption_config=pulumi.get(__ret__, 'preemption_config'),
109
104
  scheduler_algorithm=pulumi.get(__ret__, 'scheduler_algorithm'))
105
+
106
+
107
+ @_utilities.lift_output_func(get_scheduler_policy)
110
108
  def get_scheduler_policy_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSchedulerPolicyResult]:
111
109
  """
112
110
  Retrieve the cluster's [scheduler configuration](https://www.nomadproject.io/api-docs/operator#sample-response-3).
@@ -120,11 +118,4 @@ def get_scheduler_policy_output(opts: Optional[pulumi.InvokeOptions] = None) ->
120
118
  global_ = nomad.get_scheduler_policy()
121
119
  ```
122
120
  """
123
- __args__ = dict()
124
- opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
125
- __ret__ = pulumi.runtime.invoke_output('nomad:index/getSchedulerPolicy:getSchedulerPolicy', __args__, opts=opts, typ=GetSchedulerPolicyResult)
126
- return __ret__.apply(lambda __response__: GetSchedulerPolicyResult(
127
- id=pulumi.get(__response__, 'id'),
128
- memory_oversubscription_enabled=pulumi.get(__response__, 'memory_oversubscription_enabled'),
129
- preemption_config=pulumi.get(__response__, 'preemption_config'),
130
- scheduler_algorithm=pulumi.get(__response__, 'scheduler_algorithm')))
121
+ ...
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
 
17
12
  __all__ = [
@@ -50,7 +45,7 @@ class GetVariableResult:
50
45
 
51
46
  @property
52
47
  @pulumi.getter
53
- def items(self) -> Mapping[str, str]:
48
+ def items(self) -> Mapping[str, Any]:
54
49
  """
55
50
  `(map[string]string)` - Map of items in the variable.
56
51
  """
@@ -113,6 +108,9 @@ def get_variable(namespace: Optional[str] = None,
113
108
  items=pulumi.get(__ret__, 'items'),
114
109
  namespace=pulumi.get(__ret__, 'namespace'),
115
110
  path=pulumi.get(__ret__, 'path'))
111
+
112
+
113
+ @_utilities.lift_output_func(get_variable)
116
114
  def get_variable_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
117
115
  path: Optional[pulumi.Input[str]] = None,
118
116
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVariableResult]:
@@ -130,13 +128,4 @@ def get_variable_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
130
128
  :param str namespace: `(string: "default")` - The namepsace in which the variable exists.
131
129
  :param str path: `(string)` - Path to the existing variable.
132
130
  """
133
- __args__ = dict()
134
- __args__['namespace'] = namespace
135
- __args__['path'] = path
136
- opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
137
- __ret__ = pulumi.runtime.invoke_output('nomad:index/getVariable:getVariable', __args__, opts=opts, typ=GetVariableResult)
138
- return __ret__.apply(lambda __response__: GetVariableResult(
139
- id=pulumi.get(__response__, 'id'),
140
- items=pulumi.get(__response__, 'items'),
141
- namespace=pulumi.get(__response__, 'namespace'),
142
- path=pulumi.get(__response__, 'path')))
131
+ ...
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
 
17
12
  __all__ = [
@@ -79,7 +74,7 @@ class GetVolumesResult:
79
74
 
80
75
  @property
81
76
  @pulumi.getter
82
- def volumes(self) -> Sequence[Mapping[str, str]]:
77
+ def volumes(self) -> Sequence[Mapping[str, Any]]:
83
78
  """
84
79
  `list of maps` a list of volumes in the cluster.
85
80
  """
@@ -138,6 +133,9 @@ def get_volumes(namespace: Optional[str] = None,
138
133
  plugin_id=pulumi.get(__ret__, 'plugin_id'),
139
134
  type=pulumi.get(__ret__, 'type'),
140
135
  volumes=pulumi.get(__ret__, 'volumes'))
136
+
137
+
138
+ @_utilities.lift_output_func(get_volumes)
141
139
  def get_volumes_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
142
140
  node_id: Optional[pulumi.Input[Optional[str]]] = None,
143
141
  plugin_id: Optional[pulumi.Input[Optional[str]]] = None,
@@ -161,17 +159,4 @@ def get_volumes_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
161
159
  :param str plugin_id: `(string: optional)` Plugin ID filter.
162
160
  :param str type: `(string: "csi")` Volume type (currently only supports `csi`)
163
161
  """
164
- __args__ = dict()
165
- __args__['namespace'] = namespace
166
- __args__['nodeId'] = node_id
167
- __args__['pluginId'] = plugin_id
168
- __args__['type'] = type
169
- opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
170
- __ret__ = pulumi.runtime.invoke_output('nomad:index/getVolumes:getVolumes', __args__, opts=opts, typ=GetVolumesResult)
171
- return __ret__.apply(lambda __response__: GetVolumesResult(
172
- id=pulumi.get(__response__, 'id'),
173
- namespace=pulumi.get(__response__, 'namespace'),
174
- node_id=pulumi.get(__response__, 'node_id'),
175
- plugin_id=pulumi.get(__response__, 'plugin_id'),
176
- type=pulumi.get(__response__, 'type'),
177
- volumes=pulumi.get(__response__, 'volumes')))
162
+ ...
pulumi_nomad/job.py CHANGED
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
  from . import outputs
17
12
  from ._inputs import *
@@ -26,6 +21,7 @@ class JobArgs:
26
21
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
27
22
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
28
23
  detach: Optional[pulumi.Input[bool]] = None,
24
+ hcl1: Optional[pulumi.Input[bool]] = None,
29
25
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
30
26
  json: Optional[pulumi.Input[bool]] = None,
31
27
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -43,6 +39,9 @@ class JobArgs:
43
39
  deregistered if the ID of the job in the jobspec changes.
44
40
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
45
41
  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.
46
45
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
47
46
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
48
47
  JSON instead of the default HCL.
@@ -64,6 +63,8 @@ class JobArgs:
64
63
  pulumi.set(__self__, "deregister_on_id_change", deregister_on_id_change)
65
64
  if detach is not None:
66
65
  pulumi.set(__self__, "detach", detach)
66
+ if hcl1 is not None:
67
+ pulumi.set(__self__, "hcl1", hcl1)
67
68
  if hcl2 is not None:
68
69
  pulumi.set(__self__, "hcl2", hcl2)
69
70
  if json is not None:
@@ -145,6 +146,20 @@ class JobArgs:
145
146
  def detach(self, value: Optional[pulumi.Input[bool]]):
146
147
  pulumi.set(self, "detach", value)
147
148
 
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
+
148
163
  @property
149
164
  @pulumi.getter
150
165
  def hcl2(self) -> Optional[pulumi.Input['JobHcl2Args']]:
@@ -198,8 +213,10 @@ class JobArgs:
198
213
 
199
214
  @property
200
215
  @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.""")
202
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 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
+
203
220
  return pulumi.get(self, "read_allocation_ids")
204
221
 
205
222
  @read_allocation_ids.setter
@@ -244,6 +261,7 @@ class _JobState:
244
261
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
245
262
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
246
263
  detach: Optional[pulumi.Input[bool]] = None,
264
+ hcl1: Optional[pulumi.Input[bool]] = None,
247
265
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
248
266
  jobspec: Optional[pulumi.Input[str]] = None,
249
267
  json: Optional[pulumi.Input[bool]] = None,
@@ -272,6 +290,9 @@ class _JobState:
272
290
  deregistered if the ID of the job in the jobspec changes.
273
291
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
274
292
  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.
275
296
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
276
297
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
277
298
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
@@ -310,6 +331,8 @@ class _JobState:
310
331
  pulumi.set(__self__, "deregister_on_id_change", deregister_on_id_change)
311
332
  if detach is not None:
312
333
  pulumi.set(__self__, "detach", detach)
334
+ if hcl1 is not None:
335
+ pulumi.set(__self__, "hcl1", hcl1)
313
336
  if hcl2 is not None:
314
337
  pulumi.set(__self__, "hcl2", hcl2)
315
338
  if jobspec is not None:
@@ -346,11 +369,13 @@ class _JobState:
346
369
 
347
370
  @property
348
371
  @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.""")
350
372
  def allocation_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
351
373
  """
352
374
  The IDs for allocations associated with this job.
353
375
  """
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
+
354
379
  return pulumi.get(self, "allocation_ids")
355
380
 
356
381
  @allocation_ids.setter
@@ -444,6 +469,20 @@ class _JobState:
444
469
  def detach(self, value: Optional[pulumi.Input[bool]]):
445
470
  pulumi.set(self, "detach", value)
446
471
 
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
+
447
486
  @property
448
487
  @pulumi.getter
449
488
  def hcl2(self) -> Optional[pulumi.Input['JobHcl2Args']]:
@@ -545,8 +584,10 @@ class _JobState:
545
584
 
546
585
  @property
547
586
  @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.""")
549
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 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
+
550
591
  return pulumi.get(self, "read_allocation_ids")
551
592
 
552
593
  @read_allocation_ids.setter
@@ -634,7 +675,8 @@ class Job(pulumi.CustomResource):
634
675
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
635
676
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
636
677
  detach: Optional[pulumi.Input[bool]] = None,
637
- hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
678
+ hcl1: Optional[pulumi.Input[bool]] = None,
679
+ hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
638
680
  jobspec: Optional[pulumi.Input[str]] = None,
639
681
  json: Optional[pulumi.Input[bool]] = None,
640
682
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -654,7 +696,10 @@ class Job(pulumi.CustomResource):
654
696
  deregistered if the ID of the job in the jobspec changes.
655
697
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
656
698
  after creating or updating, instead of monitoring.
657
- :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
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.
658
703
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
659
704
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
660
705
  JSON instead of the default HCL.
@@ -694,7 +739,8 @@ class Job(pulumi.CustomResource):
694
739
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
695
740
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
696
741
  detach: Optional[pulumi.Input[bool]] = None,
697
- hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
742
+ hcl1: Optional[pulumi.Input[bool]] = None,
743
+ hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
698
744
  jobspec: Optional[pulumi.Input[str]] = None,
699
745
  json: Optional[pulumi.Input[bool]] = None,
700
746
  policy_override: Optional[pulumi.Input[bool]] = None,
@@ -715,6 +761,7 @@ class Job(pulumi.CustomResource):
715
761
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
716
762
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
717
763
  __props__.__dict__["detach"] = detach
764
+ __props__.__dict__["hcl1"] = hcl1
718
765
  __props__.__dict__["hcl2"] = hcl2
719
766
  if jobspec is None and not opts.urn:
720
767
  raise TypeError("Missing required property 'jobspec'")
@@ -756,7 +803,8 @@ class Job(pulumi.CustomResource):
756
803
  deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
757
804
  deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
758
805
  detach: Optional[pulumi.Input[bool]] = None,
759
- hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
806
+ hcl1: Optional[pulumi.Input[bool]] = None,
807
+ hcl2: Optional[pulumi.Input[pulumi.InputType['JobHcl2Args']]] = None,
760
808
  jobspec: Optional[pulumi.Input[str]] = None,
761
809
  json: Optional[pulumi.Input[bool]] = None,
762
810
  modify_index: Optional[pulumi.Input[str]] = None,
@@ -768,7 +816,7 @@ class Job(pulumi.CustomResource):
768
816
  region: Optional[pulumi.Input[str]] = None,
769
817
  rerun_if_dead: Optional[pulumi.Input[bool]] = None,
770
818
  status: Optional[pulumi.Input[str]] = None,
771
- task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['JobTaskGroupArgs', 'JobTaskGroupArgsDict']]]]] = None,
819
+ task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['JobTaskGroupArgs']]]]] = None,
772
820
  type: Optional[pulumi.Input[str]] = None,
773
821
  vault_token: Optional[pulumi.Input[str]] = None) -> 'Job':
774
822
  """
@@ -789,7 +837,10 @@ class Job(pulumi.CustomResource):
789
837
  deregistered if the ID of the job in the jobspec changes.
790
838
  :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
791
839
  after creating or updating, instead of monitoring.
792
- :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
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.
793
844
  :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
794
845
  :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
795
846
  JSON instead of the default HCL.
@@ -820,6 +871,7 @@ class Job(pulumi.CustomResource):
820
871
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
821
872
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
822
873
  __props__.__dict__["detach"] = detach
874
+ __props__.__dict__["hcl1"] = hcl1
823
875
  __props__.__dict__["hcl2"] = hcl2
824
876
  __props__.__dict__["jobspec"] = jobspec
825
877
  __props__.__dict__["json"] = json
@@ -839,11 +891,13 @@ class Job(pulumi.CustomResource):
839
891
 
840
892
  @property
841
893
  @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.""")
843
894
  def allocation_ids(self) -> pulumi.Output[Sequence[str]]:
844
895
  """
845
896
  The IDs for allocations associated with this job.
846
897
  """
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
+
847
901
  return pulumi.get(self, "allocation_ids")
848
902
 
849
903
  @property
@@ -905,6 +959,16 @@ class Job(pulumi.CustomResource):
905
959
  """
906
960
  return pulumi.get(self, "detach")
907
961
 
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
+
908
972
  @property
909
973
  @pulumi.getter
910
974
  def hcl2(self) -> pulumi.Output[Optional['outputs.JobHcl2']]:
@@ -974,8 +1038,10 @@ class Job(pulumi.CustomResource):
974
1038
 
975
1039
  @property
976
1040
  @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.""")
978
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 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
+
979
1045
  return pulumi.get(self, "read_allocation_ids")
980
1046
 
981
1047
  @property
pulumi_nomad/namespace.py CHANGED
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
  from . import outputs
17
12
  from ._inputs import *
@@ -235,11 +230,11 @@ class Namespace(pulumi.CustomResource):
235
230
  def __init__(__self__,
236
231
  resource_name: str,
237
232
  opts: Optional[pulumi.ResourceOptions] = None,
238
- capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
233
+ capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
239
234
  description: Optional[pulumi.Input[str]] = None,
240
235
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
241
236
  name: Optional[pulumi.Input[str]] = None,
242
- node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
237
+ node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
243
238
  quota: Optional[pulumi.Input[str]] = None,
244
239
  __props__=None):
245
240
  """
@@ -277,13 +272,13 @@ class Namespace(pulumi.CustomResource):
277
272
  web_team = nomad.QuoteSpecification("web_team",
278
273
  name="web-team",
279
274
  description="web team quota",
280
- limits=[{
281
- "region": "global",
282
- "region_limit": {
283
- "cpu": 1000,
284
- "memory_mb": 256,
285
- },
286
- }])
275
+ limits=[nomad.QuoteSpecificationLimitArgs(
276
+ region="global",
277
+ region_limit=nomad.QuoteSpecificationLimitRegionLimitArgs(
278
+ cpu=1000,
279
+ memory_mb=256,
280
+ ),
281
+ )])
287
282
  web = nomad.Namespace("web",
288
283
  name="web",
289
284
  description="Web team production environment.",
@@ -292,12 +287,12 @@ class Namespace(pulumi.CustomResource):
292
287
 
293
288
  :param str resource_name: The name of the resource.
294
289
  :param pulumi.ResourceOptions opts: Options for the resource.
295
- :param pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
290
+ :param pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
296
291
  be repeated. See below for the structure of this block.
297
292
  :param pulumi.Input[str] description: `(string: "")` - A description of the namespace.
298
293
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string: <optional>)` - Specifies arbitrary KV metadata to associate with the namespace.
299
294
  :param pulumi.Input[str] name: `(string: <required>)` - A unique name for the namespace.
300
- :param pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
295
+ :param pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
301
296
  :param pulumi.Input[str] quota: `(string: "")` - A resource quota to attach to the namespace.
302
297
  """
303
298
  ...
@@ -341,13 +336,13 @@ class Namespace(pulumi.CustomResource):
341
336
  web_team = nomad.QuoteSpecification("web_team",
342
337
  name="web-team",
343
338
  description="web team quota",
344
- limits=[{
345
- "region": "global",
346
- "region_limit": {
347
- "cpu": 1000,
348
- "memory_mb": 256,
349
- },
350
- }])
339
+ limits=[nomad.QuoteSpecificationLimitArgs(
340
+ region="global",
341
+ region_limit=nomad.QuoteSpecificationLimitRegionLimitArgs(
342
+ cpu=1000,
343
+ memory_mb=256,
344
+ ),
345
+ )])
351
346
  web = nomad.Namespace("web",
352
347
  name="web",
353
348
  description="Web team production environment.",
@@ -369,11 +364,11 @@ class Namespace(pulumi.CustomResource):
369
364
  def _internal_init(__self__,
370
365
  resource_name: str,
371
366
  opts: Optional[pulumi.ResourceOptions] = None,
372
- capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
367
+ capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
373
368
  description: Optional[pulumi.Input[str]] = None,
374
369
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
375
370
  name: Optional[pulumi.Input[str]] = None,
376
- node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
371
+ node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
377
372
  quota: Optional[pulumi.Input[str]] = None,
378
373
  __props__=None):
379
374
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -400,11 +395,11 @@ class Namespace(pulumi.CustomResource):
400
395
  def get(resource_name: str,
401
396
  id: pulumi.Input[str],
402
397
  opts: Optional[pulumi.ResourceOptions] = None,
403
- capabilities: Optional[pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']]] = None,
398
+ capabilities: Optional[pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']]] = None,
404
399
  description: Optional[pulumi.Input[str]] = None,
405
400
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
406
401
  name: Optional[pulumi.Input[str]] = None,
407
- node_pool_config: Optional[pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']]] = None,
402
+ node_pool_config: Optional[pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']]] = None,
408
403
  quota: Optional[pulumi.Input[str]] = None) -> 'Namespace':
409
404
  """
410
405
  Get an existing Namespace resource's state with the given name, id, and optional extra
@@ -413,12 +408,12 @@ class Namespace(pulumi.CustomResource):
413
408
  :param str resource_name: The unique name of the resulting resource.
414
409
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
415
410
  :param pulumi.ResourceOptions opts: Options for the resource.
416
- :param pulumi.Input[Union['NamespaceCapabilitiesArgs', 'NamespaceCapabilitiesArgsDict']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
411
+ :param pulumi.Input[pulumi.InputType['NamespaceCapabilitiesArgs']] capabilities: `(block: <optional>)` - A block of capabilities for the namespace. Can't
417
412
  be repeated. See below for the structure of this block.
418
413
  :param pulumi.Input[str] description: `(string: "")` - A description of the namespace.
419
414
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string: <optional>)` - Specifies arbitrary KV metadata to associate with the namespace.
420
415
  :param pulumi.Input[str] name: `(string: <required>)` - A unique name for the namespace.
421
- :param pulumi.Input[Union['NamespaceNodePoolConfigArgs', 'NamespaceNodePoolConfigArgsDict']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
416
+ :param pulumi.Input[pulumi.InputType['NamespaceNodePoolConfigArgs']] node_pool_config: `(block: <optional>)` - A block with node pool configuration for the namespace (Nomad Enterprise only).
422
417
  :param pulumi.Input[str] quota: `(string: "")` - A resource quota to attach to the namespace.
423
418
  """
424
419
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
pulumi_nomad/node_pool.py CHANGED
@@ -4,14 +4,9 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
- import sys
8
7
  import pulumi
9
8
  import pulumi.runtime
10
9
  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
10
  from . import _utilities
16
11
  from . import outputs
17
12
  from ._inputs import *
@@ -174,7 +169,7 @@ class NodePool(pulumi.CustomResource):
174
169
  description: Optional[pulumi.Input[str]] = None,
175
170
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
176
171
  name: Optional[pulumi.Input[str]] = None,
177
- scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None,
172
+ scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None,
178
173
  __props__=None):
179
174
  """
180
175
  Provisions a node pool within a Nomad cluster.
@@ -202,7 +197,7 @@ class NodePool(pulumi.CustomResource):
202
197
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string)` - Arbitrary KV metadata associated with the
203
198
  node pool.
204
199
  :param pulumi.Input[str] name: `(string)` - The name of the node pool.
205
- :param pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
200
+ :param pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
206
201
  """
207
202
  ...
208
203
  @overload
@@ -248,7 +243,7 @@ class NodePool(pulumi.CustomResource):
248
243
  description: Optional[pulumi.Input[str]] = None,
249
244
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
250
245
  name: Optional[pulumi.Input[str]] = None,
251
- scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None,
246
+ scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None,
252
247
  __props__=None):
253
248
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
254
249
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -275,7 +270,7 @@ class NodePool(pulumi.CustomResource):
275
270
  description: Optional[pulumi.Input[str]] = None,
276
271
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
277
272
  name: Optional[pulumi.Input[str]] = None,
278
- scheduler_config: Optional[pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']]] = None) -> 'NodePool':
273
+ scheduler_config: Optional[pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']]] = None) -> 'NodePool':
279
274
  """
280
275
  Get an existing NodePool resource's state with the given name, id, and optional extra
281
276
  properties used to qualify the lookup.
@@ -287,7 +282,7 @@ class NodePool(pulumi.CustomResource):
287
282
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: `(map[string]string)` - Arbitrary KV metadata associated with the
288
283
  node pool.
289
284
  :param pulumi.Input[str] name: `(string)` - The name of the node pool.
290
- :param pulumi.Input[Union['NodePoolSchedulerConfigArgs', 'NodePoolSchedulerConfigArgsDict']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
285
+ :param pulumi.Input[pulumi.InputType['NodePoolSchedulerConfigArgs']] scheduler_config: `(block)` - Scheduler configuration for the node pool.
291
286
  """
292
287
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
293
288