pulumi-nomad 2.4.3__py3-none-any.whl → 2.5.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 (57) hide show
  1. pulumi_nomad/__init__.py +20 -0
  2. pulumi_nomad/_inputs.py +1056 -378
  3. pulumi_nomad/acl_auth_method.py +85 -84
  4. pulumi_nomad/acl_binding_rule.py +71 -70
  5. pulumi_nomad/acl_policy.py +57 -49
  6. pulumi_nomad/acl_role.py +29 -28
  7. pulumi_nomad/acl_token.py +99 -98
  8. pulumi_nomad/config/__init__.py +1 -0
  9. pulumi_nomad/config/__init__.pyi +1 -10
  10. pulumi_nomad/config/outputs.py +7 -6
  11. pulumi_nomad/config/vars.py +1 -14
  12. pulumi_nomad/csi_volume.py +231 -202
  13. pulumi_nomad/csi_volume_registration.py +210 -209
  14. pulumi_nomad/dynamic_host_volume.py +1005 -0
  15. pulumi_nomad/dynamic_host_volume_registration.py +740 -0
  16. pulumi_nomad/external_volume.py +195 -194
  17. pulumi_nomad/get_acl_policies.py +7 -6
  18. pulumi_nomad/get_acl_policy.py +9 -8
  19. pulumi_nomad/get_acl_role.py +8 -7
  20. pulumi_nomad/get_acl_roles.py +7 -6
  21. pulumi_nomad/get_acl_token.py +15 -14
  22. pulumi_nomad/get_acl_tokens.py +7 -6
  23. pulumi_nomad/get_allocations.py +17 -16
  24. pulumi_nomad/get_datacenters.py +13 -12
  25. pulumi_nomad/get_deployments.py +3 -2
  26. pulumi_nomad/get_dynamic_host_volume.py +353 -0
  27. pulumi_nomad/get_job.py +28 -27
  28. pulumi_nomad/get_job_parser.py +13 -12
  29. pulumi_nomad/get_jwks.py +3 -2
  30. pulumi_nomad/get_namespace.py +10 -9
  31. pulumi_nomad/get_namespaces.py +3 -2
  32. pulumi_nomad/get_node_pool.py +9 -8
  33. pulumi_nomad/get_node_pools.py +12 -11
  34. pulumi_nomad/get_plugin.py +24 -23
  35. pulumi_nomad/get_plugins.py +6 -5
  36. pulumi_nomad/get_regions.py +3 -2
  37. pulumi_nomad/get_scaling_policies.py +12 -11
  38. pulumi_nomad/get_scaling_policy.py +12 -11
  39. pulumi_nomad/get_scheduler_policy.py +5 -4
  40. pulumi_nomad/get_variable.py +13 -12
  41. pulumi_nomad/get_volumes.py +23 -22
  42. pulumi_nomad/job.py +193 -302
  43. pulumi_nomad/namespace.py +57 -56
  44. pulumi_nomad/node_pool.py +43 -42
  45. pulumi_nomad/outputs.py +1030 -451
  46. pulumi_nomad/provider.py +95 -152
  47. pulumi_nomad/pulumi-plugin.json +1 -1
  48. pulumi_nomad/quote_specification.py +29 -28
  49. pulumi_nomad/scheduler_config.py +43 -42
  50. pulumi_nomad/sentinel_policy.py +71 -70
  51. pulumi_nomad/variable.py +43 -42
  52. pulumi_nomad/volume.py +209 -208
  53. {pulumi_nomad-2.4.3.dist-info → pulumi_nomad-2.5.0.dist-info}/METADATA +2 -2
  54. pulumi_nomad-2.5.0.dist-info/RECORD +58 -0
  55. {pulumi_nomad-2.4.3.dist-info → pulumi_nomad-2.5.0.dist-info}/WHEEL +1 -1
  56. pulumi_nomad-2.4.3.dist-info/RECORD +0 -55
  57. {pulumi_nomad-2.4.3.dist-info → pulumi_nomad-2.5.0.dist-info}/top_level.txt +0 -0
pulumi_nomad/job.py CHANGED
@@ -2,6 +2,7 @@
2
2
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins
5
6
  import copy
6
7
  import warnings
7
8
  import sys
@@ -21,43 +22,35 @@ __all__ = ['JobArgs', 'Job']
21
22
  @pulumi.input_type
22
23
  class JobArgs:
23
24
  def __init__(__self__, *,
24
- jobspec: pulumi.Input[str],
25
- consul_token: Optional[pulumi.Input[str]] = None,
26
- deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
27
- deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
28
- detach: Optional[pulumi.Input[bool]] = None,
25
+ jobspec: pulumi.Input[builtins.str],
26
+ deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
27
+ deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
28
+ detach: Optional[pulumi.Input[builtins.bool]] = None,
29
29
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
30
- json: Optional[pulumi.Input[bool]] = None,
31
- policy_override: Optional[pulumi.Input[bool]] = None,
32
- purge_on_destroy: Optional[pulumi.Input[bool]] = None,
33
- read_allocation_ids: Optional[pulumi.Input[bool]] = None,
34
- rerun_if_dead: Optional[pulumi.Input[bool]] = None,
35
- vault_token: Optional[pulumi.Input[str]] = None):
30
+ json: Optional[pulumi.Input[builtins.bool]] = None,
31
+ policy_override: Optional[pulumi.Input[builtins.bool]] = None,
32
+ purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
33
+ read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
34
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None):
36
35
  """
37
36
  The set of arguments for constructing a Job resource.
38
- :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
39
- :param pulumi.Input[str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
40
- Will fallback to the value declared in Nomad provider configuration, if any.
41
- :param pulumi.Input[bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
42
- :param pulumi.Input[bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
37
+ :param pulumi.Input[builtins.str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
38
+ :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
39
+ :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
43
40
  deregistered if the ID of the job in the jobspec changes.
44
- :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
41
+ :param pulumi.Input[builtins.bool] detach: `(boolean: true)` - If true, the provider will return immediately
45
42
  after creating or updating, instead of monitoring.
46
43
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
47
- :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
44
+ :param pulumi.Input[builtins.bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
48
45
  JSON instead of the default HCL.
49
- :param pulumi.Input[bool] policy_override: `(boolean: false)` - Determines if the job will override any
46
+ :param pulumi.Input[builtins.bool] policy_override: `(boolean: false)` - Determines if the job will override any
50
47
  soft-mandatory Sentinel policies and register even if they fail.
51
- :param pulumi.Input[bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
48
+ :param pulumi.Input[builtins.bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
52
49
  be purged when the resource is destroyed.
53
- :param pulumi.Input[bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
50
+ :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
54
51
  again if its status is `dead`.
55
- :param pulumi.Input[str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
56
- Will fallback to the value declared in Nomad provider configuration, if any.
57
52
  """
58
53
  pulumi.set(__self__, "jobspec", jobspec)
59
- if consul_token is not None:
60
- pulumi.set(__self__, "consul_token", consul_token)
61
54
  if deregister_on_destroy is not None:
62
55
  pulumi.set(__self__, "deregister_on_destroy", deregister_on_destroy)
63
56
  if deregister_on_id_change is not None:
@@ -79,49 +72,34 @@ class JobArgs:
79
72
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
80
73
  if rerun_if_dead is not None:
81
74
  pulumi.set(__self__, "rerun_if_dead", rerun_if_dead)
82
- if vault_token is not None:
83
- pulumi.set(__self__, "vault_token", vault_token)
84
75
 
85
76
  @property
86
77
  @pulumi.getter
87
- def jobspec(self) -> pulumi.Input[str]:
78
+ def jobspec(self) -> pulumi.Input[builtins.str]:
88
79
  """
89
80
  `(string: <required>)` - The contents of the jobspec to register.
90
81
  """
91
82
  return pulumi.get(self, "jobspec")
92
83
 
93
84
  @jobspec.setter
94
- def jobspec(self, value: pulumi.Input[str]):
85
+ def jobspec(self, value: pulumi.Input[builtins.str]):
95
86
  pulumi.set(self, "jobspec", value)
96
87
 
97
- @property
98
- @pulumi.getter(name="consulToken")
99
- def consul_token(self) -> Optional[pulumi.Input[str]]:
100
- """
101
- `(string: <optional>)` - Consul token used when registering this job.
102
- Will fallback to the value declared in Nomad provider configuration, if any.
103
- """
104
- return pulumi.get(self, "consul_token")
105
-
106
- @consul_token.setter
107
- def consul_token(self, value: Optional[pulumi.Input[str]]):
108
- pulumi.set(self, "consul_token", value)
109
-
110
88
  @property
111
89
  @pulumi.getter(name="deregisterOnDestroy")
112
- def deregister_on_destroy(self) -> Optional[pulumi.Input[bool]]:
90
+ def deregister_on_destroy(self) -> Optional[pulumi.Input[builtins.bool]]:
113
91
  """
114
92
  If true, the job will be deregistered on destroy.
115
93
  """
116
94
  return pulumi.get(self, "deregister_on_destroy")
117
95
 
118
96
  @deregister_on_destroy.setter
119
- def deregister_on_destroy(self, value: Optional[pulumi.Input[bool]]):
97
+ def deregister_on_destroy(self, value: Optional[pulumi.Input[builtins.bool]]):
120
98
  pulumi.set(self, "deregister_on_destroy", value)
121
99
 
122
100
  @property
123
101
  @pulumi.getter(name="deregisterOnIdChange")
124
- def deregister_on_id_change(self) -> Optional[pulumi.Input[bool]]:
102
+ def deregister_on_id_change(self) -> Optional[pulumi.Input[builtins.bool]]:
125
103
  """
126
104
  `(boolean: true)` - Determines if the job will be
127
105
  deregistered if the ID of the job in the jobspec changes.
@@ -129,12 +107,12 @@ class JobArgs:
129
107
  return pulumi.get(self, "deregister_on_id_change")
130
108
 
131
109
  @deregister_on_id_change.setter
132
- def deregister_on_id_change(self, value: Optional[pulumi.Input[bool]]):
110
+ def deregister_on_id_change(self, value: Optional[pulumi.Input[builtins.bool]]):
133
111
  pulumi.set(self, "deregister_on_id_change", value)
134
112
 
135
113
  @property
136
114
  @pulumi.getter
137
- def detach(self) -> Optional[pulumi.Input[bool]]:
115
+ def detach(self) -> Optional[pulumi.Input[builtins.bool]]:
138
116
  """
139
117
  `(boolean: true)` - If true, the provider will return immediately
140
118
  after creating or updating, instead of monitoring.
@@ -142,7 +120,7 @@ class JobArgs:
142
120
  return pulumi.get(self, "detach")
143
121
 
144
122
  @detach.setter
145
- def detach(self, value: Optional[pulumi.Input[bool]]):
123
+ def detach(self, value: Optional[pulumi.Input[builtins.bool]]):
146
124
  pulumi.set(self, "detach", value)
147
125
 
148
126
  @property
@@ -159,7 +137,7 @@ class JobArgs:
159
137
 
160
138
  @property
161
139
  @pulumi.getter
162
- def json(self) -> Optional[pulumi.Input[bool]]:
140
+ def json(self) -> Optional[pulumi.Input[builtins.bool]]:
163
141
  """
164
142
  `(boolean: false)` - Set this to `true` if your jobspec is structured with
165
143
  JSON instead of the default HCL.
@@ -167,12 +145,12 @@ class JobArgs:
167
145
  return pulumi.get(self, "json")
168
146
 
169
147
  @json.setter
170
- def json(self, value: Optional[pulumi.Input[bool]]):
148
+ def json(self, value: Optional[pulumi.Input[builtins.bool]]):
171
149
  pulumi.set(self, "json", value)
172
150
 
173
151
  @property
174
152
  @pulumi.getter(name="policyOverride")
175
- def policy_override(self) -> Optional[pulumi.Input[bool]]:
153
+ def policy_override(self) -> Optional[pulumi.Input[builtins.bool]]:
176
154
  """
177
155
  `(boolean: false)` - Determines if the job will override any
178
156
  soft-mandatory Sentinel policies and register even if they fail.
@@ -180,12 +158,12 @@ class JobArgs:
180
158
  return pulumi.get(self, "policy_override")
181
159
 
182
160
  @policy_override.setter
183
- def policy_override(self, value: Optional[pulumi.Input[bool]]):
161
+ def policy_override(self, value: Optional[pulumi.Input[builtins.bool]]):
184
162
  pulumi.set(self, "policy_override", value)
185
163
 
186
164
  @property
187
165
  @pulumi.getter(name="purgeOnDestroy")
188
- def purge_on_destroy(self) -> Optional[pulumi.Input[bool]]:
166
+ def purge_on_destroy(self) -> Optional[pulumi.Input[builtins.bool]]:
189
167
  """
190
168
  `(boolean: false)` - Set this to true if you want the job to
191
169
  be purged when the resource is destroyed.
@@ -193,22 +171,22 @@ class JobArgs:
193
171
  return pulumi.get(self, "purge_on_destroy")
194
172
 
195
173
  @purge_on_destroy.setter
196
- def purge_on_destroy(self, value: Optional[pulumi.Input[bool]]):
174
+ def purge_on_destroy(self, value: Optional[pulumi.Input[builtins.bool]]):
197
175
  pulumi.set(self, "purge_on_destroy", value)
198
176
 
199
177
  @property
200
178
  @pulumi.getter(name="readAllocationIds")
201
179
  @_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
- def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
180
+ def read_allocation_ids(self) -> Optional[pulumi.Input[builtins.bool]]:
203
181
  return pulumi.get(self, "read_allocation_ids")
204
182
 
205
183
  @read_allocation_ids.setter
206
- def read_allocation_ids(self, value: Optional[pulumi.Input[bool]]):
184
+ def read_allocation_ids(self, value: Optional[pulumi.Input[builtins.bool]]):
207
185
  pulumi.set(self, "read_allocation_ids", value)
208
186
 
209
187
  @property
210
188
  @pulumi.getter(name="rerunIfDead")
211
- def rerun_if_dead(self) -> Optional[pulumi.Input[bool]]:
189
+ def rerun_if_dead(self) -> Optional[pulumi.Input[builtins.bool]]:
212
190
  """
213
191
  `(boolean: false)` - Set this to true to force the job to run
214
192
  again if its status is `dead`.
@@ -216,88 +194,67 @@ class JobArgs:
216
194
  return pulumi.get(self, "rerun_if_dead")
217
195
 
218
196
  @rerun_if_dead.setter
219
- def rerun_if_dead(self, value: Optional[pulumi.Input[bool]]):
197
+ def rerun_if_dead(self, value: Optional[pulumi.Input[builtins.bool]]):
220
198
  pulumi.set(self, "rerun_if_dead", value)
221
199
 
222
- @property
223
- @pulumi.getter(name="vaultToken")
224
- def vault_token(self) -> Optional[pulumi.Input[str]]:
225
- """
226
- `(string: <optional>)` - Vault token used when registering this job.
227
- Will fallback to the value declared in Nomad provider configuration, if any.
228
- """
229
- return pulumi.get(self, "vault_token")
230
-
231
- @vault_token.setter
232
- def vault_token(self, value: Optional[pulumi.Input[str]]):
233
- pulumi.set(self, "vault_token", value)
234
-
235
200
 
236
201
  @pulumi.input_type
237
202
  class _JobState:
238
203
  def __init__(__self__, *,
239
- allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
240
- consul_token: Optional[pulumi.Input[str]] = None,
241
- datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
242
- deployment_id: Optional[pulumi.Input[str]] = None,
243
- deployment_status: Optional[pulumi.Input[str]] = None,
244
- deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
245
- deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
246
- detach: Optional[pulumi.Input[bool]] = None,
204
+ allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
205
+ datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
206
+ deployment_id: Optional[pulumi.Input[builtins.str]] = None,
207
+ deployment_status: Optional[pulumi.Input[builtins.str]] = None,
208
+ deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
209
+ deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
210
+ detach: Optional[pulumi.Input[builtins.bool]] = None,
247
211
  hcl2: Optional[pulumi.Input['JobHcl2Args']] = None,
248
- jobspec: Optional[pulumi.Input[str]] = None,
249
- json: Optional[pulumi.Input[bool]] = None,
250
- modify_index: Optional[pulumi.Input[str]] = None,
251
- name: Optional[pulumi.Input[str]] = None,
252
- namespace: Optional[pulumi.Input[str]] = None,
253
- policy_override: Optional[pulumi.Input[bool]] = None,
254
- purge_on_destroy: Optional[pulumi.Input[bool]] = None,
255
- read_allocation_ids: Optional[pulumi.Input[bool]] = None,
256
- region: Optional[pulumi.Input[str]] = None,
257
- rerun_if_dead: Optional[pulumi.Input[bool]] = None,
258
- status: Optional[pulumi.Input[str]] = None,
212
+ jobspec: Optional[pulumi.Input[builtins.str]] = None,
213
+ json: Optional[pulumi.Input[builtins.bool]] = None,
214
+ modify_index: Optional[pulumi.Input[builtins.str]] = None,
215
+ name: Optional[pulumi.Input[builtins.str]] = None,
216
+ namespace: Optional[pulumi.Input[builtins.str]] = None,
217
+ policy_override: Optional[pulumi.Input[builtins.bool]] = None,
218
+ purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
219
+ read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
220
+ region: Optional[pulumi.Input[builtins.str]] = None,
221
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
222
+ status: Optional[pulumi.Input[builtins.str]] = None,
259
223
  task_groups: Optional[pulumi.Input[Sequence[pulumi.Input['JobTaskGroupArgs']]]] = None,
260
- type: Optional[pulumi.Input[str]] = None,
261
- vault_token: Optional[pulumi.Input[str]] = None):
224
+ type: Optional[pulumi.Input[builtins.str]] = None):
262
225
  """
263
226
  Input properties used for looking up and filtering Job resources.
264
- :param pulumi.Input[Sequence[pulumi.Input[str]]] allocation_ids: The IDs for allocations associated with this job.
265
- :param pulumi.Input[str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
266
- Will fallback to the value declared in Nomad provider configuration, if any.
267
- :param pulumi.Input[Sequence[pulumi.Input[str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
268
- :param pulumi.Input[str] deployment_id: If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
269
- :param pulumi.Input[str] deployment_status: If detach = false, the status for the deployment associated with the last job create/update, if one exists.
270
- :param pulumi.Input[bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
271
- :param pulumi.Input[bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
227
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] allocation_ids: The IDs for allocations associated with this job.
228
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
229
+ :param pulumi.Input[builtins.str] deployment_id: If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
230
+ :param pulumi.Input[builtins.str] deployment_status: If detach = false, the status for the deployment associated with the last job create/update, if one exists.
231
+ :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
232
+ :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
272
233
  deregistered if the ID of the job in the jobspec changes.
273
- :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
234
+ :param pulumi.Input[builtins.bool] detach: `(boolean: true)` - If true, the provider will return immediately
274
235
  after creating or updating, instead of monitoring.
275
236
  :param pulumi.Input['JobHcl2Args'] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
276
- :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
277
- :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
237
+ :param pulumi.Input[builtins.str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
238
+ :param pulumi.Input[builtins.bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
278
239
  JSON instead of the default HCL.
279
- :param pulumi.Input[str] modify_index: Integer that increments for each change. Used to detect any changes between plan and apply.
280
- :param pulumi.Input[str] name: The name of the job, as derived from the jobspec.
281
- :param pulumi.Input[str] namespace: The namespace of the job, as derived from the jobspec.
282
- :param pulumi.Input[bool] policy_override: `(boolean: false)` - Determines if the job will override any
240
+ :param pulumi.Input[builtins.str] modify_index: Integer that increments for each change. Used to detect any changes between plan and apply.
241
+ :param pulumi.Input[builtins.str] name: The name of the job, as derived from the jobspec.
242
+ :param pulumi.Input[builtins.str] namespace: The namespace of the job, as derived from the jobspec.
243
+ :param pulumi.Input[builtins.bool] policy_override: `(boolean: false)` - Determines if the job will override any
283
244
  soft-mandatory Sentinel policies and register even if they fail.
284
- :param pulumi.Input[bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
245
+ :param pulumi.Input[builtins.bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
285
246
  be purged when the resource is destroyed.
286
- :param pulumi.Input[str] region: The target region for the job, as derived from the jobspec.
287
- :param pulumi.Input[bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
247
+ :param pulumi.Input[builtins.str] region: The target region for the job, as derived from the jobspec.
248
+ :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
288
249
  again if its status is `dead`.
289
- :param pulumi.Input[str] status: The status of the job.
290
- :param pulumi.Input[str] type: The type of the job, as derived from the jobspec.
291
- :param pulumi.Input[str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
292
- Will fallback to the value declared in Nomad provider configuration, if any.
250
+ :param pulumi.Input[builtins.str] status: The status of the job.
251
+ :param pulumi.Input[builtins.str] type: The type of the job, as derived from the jobspec.
293
252
  """
294
253
  if allocation_ids is not None:
295
254
  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
255
  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.""")
297
256
  if allocation_ids is not None:
298
257
  pulumi.set(__self__, "allocation_ids", allocation_ids)
299
- if consul_token is not None:
300
- pulumi.set(__self__, "consul_token", consul_token)
301
258
  if datacenters is not None:
302
259
  pulumi.set(__self__, "datacenters", datacenters)
303
260
  if deployment_id is not None:
@@ -341,86 +298,71 @@ class _JobState:
341
298
  pulumi.set(__self__, "task_groups", task_groups)
342
299
  if type is not None:
343
300
  pulumi.set(__self__, "type", type)
344
- if vault_token is not None:
345
- pulumi.set(__self__, "vault_token", vault_token)
346
301
 
347
302
  @property
348
303
  @pulumi.getter(name="allocationIds")
349
304
  @_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
- def allocation_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
305
+ def allocation_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
351
306
  """
352
307
  The IDs for allocations associated with this job.
353
308
  """
354
309
  return pulumi.get(self, "allocation_ids")
355
310
 
356
311
  @allocation_ids.setter
357
- def allocation_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
312
+ def allocation_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
358
313
  pulumi.set(self, "allocation_ids", value)
359
314
 
360
- @property
361
- @pulumi.getter(name="consulToken")
362
- def consul_token(self) -> Optional[pulumi.Input[str]]:
363
- """
364
- `(string: <optional>)` - Consul token used when registering this job.
365
- Will fallback to the value declared in Nomad provider configuration, if any.
366
- """
367
- return pulumi.get(self, "consul_token")
368
-
369
- @consul_token.setter
370
- def consul_token(self, value: Optional[pulumi.Input[str]]):
371
- pulumi.set(self, "consul_token", value)
372
-
373
315
  @property
374
316
  @pulumi.getter
375
- def datacenters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
317
+ def datacenters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
376
318
  """
377
319
  The target datacenters for the job, as derived from the jobspec.
378
320
  """
379
321
  return pulumi.get(self, "datacenters")
380
322
 
381
323
  @datacenters.setter
382
- def datacenters(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
324
+ def datacenters(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
383
325
  pulumi.set(self, "datacenters", value)
384
326
 
385
327
  @property
386
328
  @pulumi.getter(name="deploymentId")
387
- def deployment_id(self) -> Optional[pulumi.Input[str]]:
329
+ def deployment_id(self) -> Optional[pulumi.Input[builtins.str]]:
388
330
  """
389
331
  If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
390
332
  """
391
333
  return pulumi.get(self, "deployment_id")
392
334
 
393
335
  @deployment_id.setter
394
- def deployment_id(self, value: Optional[pulumi.Input[str]]):
336
+ def deployment_id(self, value: Optional[pulumi.Input[builtins.str]]):
395
337
  pulumi.set(self, "deployment_id", value)
396
338
 
397
339
  @property
398
340
  @pulumi.getter(name="deploymentStatus")
399
- def deployment_status(self) -> Optional[pulumi.Input[str]]:
341
+ def deployment_status(self) -> Optional[pulumi.Input[builtins.str]]:
400
342
  """
401
343
  If detach = false, the status for the deployment associated with the last job create/update, if one exists.
402
344
  """
403
345
  return pulumi.get(self, "deployment_status")
404
346
 
405
347
  @deployment_status.setter
406
- def deployment_status(self, value: Optional[pulumi.Input[str]]):
348
+ def deployment_status(self, value: Optional[pulumi.Input[builtins.str]]):
407
349
  pulumi.set(self, "deployment_status", value)
408
350
 
409
351
  @property
410
352
  @pulumi.getter(name="deregisterOnDestroy")
411
- def deregister_on_destroy(self) -> Optional[pulumi.Input[bool]]:
353
+ def deregister_on_destroy(self) -> Optional[pulumi.Input[builtins.bool]]:
412
354
  """
413
355
  If true, the job will be deregistered on destroy.
414
356
  """
415
357
  return pulumi.get(self, "deregister_on_destroy")
416
358
 
417
359
  @deregister_on_destroy.setter
418
- def deregister_on_destroy(self, value: Optional[pulumi.Input[bool]]):
360
+ def deregister_on_destroy(self, value: Optional[pulumi.Input[builtins.bool]]):
419
361
  pulumi.set(self, "deregister_on_destroy", value)
420
362
 
421
363
  @property
422
364
  @pulumi.getter(name="deregisterOnIdChange")
423
- def deregister_on_id_change(self) -> Optional[pulumi.Input[bool]]:
365
+ def deregister_on_id_change(self) -> Optional[pulumi.Input[builtins.bool]]:
424
366
  """
425
367
  `(boolean: true)` - Determines if the job will be
426
368
  deregistered if the ID of the job in the jobspec changes.
@@ -428,12 +370,12 @@ class _JobState:
428
370
  return pulumi.get(self, "deregister_on_id_change")
429
371
 
430
372
  @deregister_on_id_change.setter
431
- def deregister_on_id_change(self, value: Optional[pulumi.Input[bool]]):
373
+ def deregister_on_id_change(self, value: Optional[pulumi.Input[builtins.bool]]):
432
374
  pulumi.set(self, "deregister_on_id_change", value)
433
375
 
434
376
  @property
435
377
  @pulumi.getter
436
- def detach(self) -> Optional[pulumi.Input[bool]]:
378
+ def detach(self) -> Optional[pulumi.Input[builtins.bool]]:
437
379
  """
438
380
  `(boolean: true)` - If true, the provider will return immediately
439
381
  after creating or updating, instead of monitoring.
@@ -441,7 +383,7 @@ class _JobState:
441
383
  return pulumi.get(self, "detach")
442
384
 
443
385
  @detach.setter
444
- def detach(self, value: Optional[pulumi.Input[bool]]):
386
+ def detach(self, value: Optional[pulumi.Input[builtins.bool]]):
445
387
  pulumi.set(self, "detach", value)
446
388
 
447
389
  @property
@@ -458,19 +400,19 @@ class _JobState:
458
400
 
459
401
  @property
460
402
  @pulumi.getter
461
- def jobspec(self) -> Optional[pulumi.Input[str]]:
403
+ def jobspec(self) -> Optional[pulumi.Input[builtins.str]]:
462
404
  """
463
405
  `(string: <required>)` - The contents of the jobspec to register.
464
406
  """
465
407
  return pulumi.get(self, "jobspec")
466
408
 
467
409
  @jobspec.setter
468
- def jobspec(self, value: Optional[pulumi.Input[str]]):
410
+ def jobspec(self, value: Optional[pulumi.Input[builtins.str]]):
469
411
  pulumi.set(self, "jobspec", value)
470
412
 
471
413
  @property
472
414
  @pulumi.getter
473
- def json(self) -> Optional[pulumi.Input[bool]]:
415
+ def json(self) -> Optional[pulumi.Input[builtins.bool]]:
474
416
  """
475
417
  `(boolean: false)` - Set this to `true` if your jobspec is structured with
476
418
  JSON instead of the default HCL.
@@ -478,48 +420,48 @@ class _JobState:
478
420
  return pulumi.get(self, "json")
479
421
 
480
422
  @json.setter
481
- def json(self, value: Optional[pulumi.Input[bool]]):
423
+ def json(self, value: Optional[pulumi.Input[builtins.bool]]):
482
424
  pulumi.set(self, "json", value)
483
425
 
484
426
  @property
485
427
  @pulumi.getter(name="modifyIndex")
486
- def modify_index(self) -> Optional[pulumi.Input[str]]:
428
+ def modify_index(self) -> Optional[pulumi.Input[builtins.str]]:
487
429
  """
488
430
  Integer that increments for each change. Used to detect any changes between plan and apply.
489
431
  """
490
432
  return pulumi.get(self, "modify_index")
491
433
 
492
434
  @modify_index.setter
493
- def modify_index(self, value: Optional[pulumi.Input[str]]):
435
+ def modify_index(self, value: Optional[pulumi.Input[builtins.str]]):
494
436
  pulumi.set(self, "modify_index", value)
495
437
 
496
438
  @property
497
439
  @pulumi.getter
498
- def name(self) -> Optional[pulumi.Input[str]]:
440
+ def name(self) -> Optional[pulumi.Input[builtins.str]]:
499
441
  """
500
442
  The name of the job, as derived from the jobspec.
501
443
  """
502
444
  return pulumi.get(self, "name")
503
445
 
504
446
  @name.setter
505
- def name(self, value: Optional[pulumi.Input[str]]):
447
+ def name(self, value: Optional[pulumi.Input[builtins.str]]):
506
448
  pulumi.set(self, "name", value)
507
449
 
508
450
  @property
509
451
  @pulumi.getter
510
- def namespace(self) -> Optional[pulumi.Input[str]]:
452
+ def namespace(self) -> Optional[pulumi.Input[builtins.str]]:
511
453
  """
512
454
  The namespace of the job, as derived from the jobspec.
513
455
  """
514
456
  return pulumi.get(self, "namespace")
515
457
 
516
458
  @namespace.setter
517
- def namespace(self, value: Optional[pulumi.Input[str]]):
459
+ def namespace(self, value: Optional[pulumi.Input[builtins.str]]):
518
460
  pulumi.set(self, "namespace", value)
519
461
 
520
462
  @property
521
463
  @pulumi.getter(name="policyOverride")
522
- def policy_override(self) -> Optional[pulumi.Input[bool]]:
464
+ def policy_override(self) -> Optional[pulumi.Input[builtins.bool]]:
523
465
  """
524
466
  `(boolean: false)` - Determines if the job will override any
525
467
  soft-mandatory Sentinel policies and register even if they fail.
@@ -527,12 +469,12 @@ class _JobState:
527
469
  return pulumi.get(self, "policy_override")
528
470
 
529
471
  @policy_override.setter
530
- def policy_override(self, value: Optional[pulumi.Input[bool]]):
472
+ def policy_override(self, value: Optional[pulumi.Input[builtins.bool]]):
531
473
  pulumi.set(self, "policy_override", value)
532
474
 
533
475
  @property
534
476
  @pulumi.getter(name="purgeOnDestroy")
535
- def purge_on_destroy(self) -> Optional[pulumi.Input[bool]]:
477
+ def purge_on_destroy(self) -> Optional[pulumi.Input[builtins.bool]]:
536
478
  """
537
479
  `(boolean: false)` - Set this to true if you want the job to
538
480
  be purged when the resource is destroyed.
@@ -540,34 +482,34 @@ class _JobState:
540
482
  return pulumi.get(self, "purge_on_destroy")
541
483
 
542
484
  @purge_on_destroy.setter
543
- def purge_on_destroy(self, value: Optional[pulumi.Input[bool]]):
485
+ def purge_on_destroy(self, value: Optional[pulumi.Input[builtins.bool]]):
544
486
  pulumi.set(self, "purge_on_destroy", value)
545
487
 
546
488
  @property
547
489
  @pulumi.getter(name="readAllocationIds")
548
490
  @_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
- def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
491
+ def read_allocation_ids(self) -> Optional[pulumi.Input[builtins.bool]]:
550
492
  return pulumi.get(self, "read_allocation_ids")
551
493
 
552
494
  @read_allocation_ids.setter
553
- def read_allocation_ids(self, value: Optional[pulumi.Input[bool]]):
495
+ def read_allocation_ids(self, value: Optional[pulumi.Input[builtins.bool]]):
554
496
  pulumi.set(self, "read_allocation_ids", value)
555
497
 
556
498
  @property
557
499
  @pulumi.getter
558
- def region(self) -> Optional[pulumi.Input[str]]:
500
+ def region(self) -> Optional[pulumi.Input[builtins.str]]:
559
501
  """
560
502
  The target region for the job, as derived from the jobspec.
561
503
  """
562
504
  return pulumi.get(self, "region")
563
505
 
564
506
  @region.setter
565
- def region(self, value: Optional[pulumi.Input[str]]):
507
+ def region(self, value: Optional[pulumi.Input[builtins.str]]):
566
508
  pulumi.set(self, "region", value)
567
509
 
568
510
  @property
569
511
  @pulumi.getter(name="rerunIfDead")
570
- def rerun_if_dead(self) -> Optional[pulumi.Input[bool]]:
512
+ def rerun_if_dead(self) -> Optional[pulumi.Input[builtins.bool]]:
571
513
  """
572
514
  `(boolean: false)` - Set this to true to force the job to run
573
515
  again if its status is `dead`.
@@ -575,19 +517,19 @@ class _JobState:
575
517
  return pulumi.get(self, "rerun_if_dead")
576
518
 
577
519
  @rerun_if_dead.setter
578
- def rerun_if_dead(self, value: Optional[pulumi.Input[bool]]):
520
+ def rerun_if_dead(self, value: Optional[pulumi.Input[builtins.bool]]):
579
521
  pulumi.set(self, "rerun_if_dead", value)
580
522
 
581
523
  @property
582
524
  @pulumi.getter
583
- def status(self) -> Optional[pulumi.Input[str]]:
525
+ def status(self) -> Optional[pulumi.Input[builtins.str]]:
584
526
  """
585
527
  The status of the job.
586
528
  """
587
529
  return pulumi.get(self, "status")
588
530
 
589
531
  @status.setter
590
- def status(self, value: Optional[pulumi.Input[str]]):
532
+ def status(self, value: Optional[pulumi.Input[builtins.str]]):
591
533
  pulumi.set(self, "status", value)
592
534
 
593
535
  @property
@@ -601,71 +543,52 @@ class _JobState:
601
543
 
602
544
  @property
603
545
  @pulumi.getter
604
- def type(self) -> Optional[pulumi.Input[str]]:
546
+ def type(self) -> Optional[pulumi.Input[builtins.str]]:
605
547
  """
606
548
  The type of the job, as derived from the jobspec.
607
549
  """
608
550
  return pulumi.get(self, "type")
609
551
 
610
552
  @type.setter
611
- def type(self, value: Optional[pulumi.Input[str]]):
553
+ def type(self, value: Optional[pulumi.Input[builtins.str]]):
612
554
  pulumi.set(self, "type", value)
613
555
 
614
- @property
615
- @pulumi.getter(name="vaultToken")
616
- def vault_token(self) -> Optional[pulumi.Input[str]]:
617
- """
618
- `(string: <optional>)` - Vault token used when registering this job.
619
- Will fallback to the value declared in Nomad provider configuration, if any.
620
- """
621
- return pulumi.get(self, "vault_token")
622
-
623
- @vault_token.setter
624
- def vault_token(self, value: Optional[pulumi.Input[str]]):
625
- pulumi.set(self, "vault_token", value)
626
-
627
556
 
628
557
  class Job(pulumi.CustomResource):
629
558
  @overload
630
559
  def __init__(__self__,
631
560
  resource_name: str,
632
561
  opts: Optional[pulumi.ResourceOptions] = None,
633
- consul_token: Optional[pulumi.Input[str]] = None,
634
- deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
635
- deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
636
- detach: Optional[pulumi.Input[bool]] = None,
562
+ deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
563
+ deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
564
+ detach: Optional[pulumi.Input[builtins.bool]] = None,
637
565
  hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
638
- jobspec: Optional[pulumi.Input[str]] = None,
639
- json: Optional[pulumi.Input[bool]] = None,
640
- policy_override: Optional[pulumi.Input[bool]] = None,
641
- purge_on_destroy: Optional[pulumi.Input[bool]] = None,
642
- read_allocation_ids: Optional[pulumi.Input[bool]] = None,
643
- rerun_if_dead: Optional[pulumi.Input[bool]] = None,
644
- vault_token: Optional[pulumi.Input[str]] = None,
566
+ jobspec: Optional[pulumi.Input[builtins.str]] = None,
567
+ json: Optional[pulumi.Input[builtins.bool]] = None,
568
+ policy_override: Optional[pulumi.Input[builtins.bool]] = None,
569
+ purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
570
+ read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
571
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
645
572
  __props__=None):
646
573
  """
647
574
  Create a Job resource with the given unique name, props, and options.
648
575
  :param str resource_name: The name of the resource.
649
576
  :param pulumi.ResourceOptions opts: Options for the resource.
650
- :param pulumi.Input[str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
651
- Will fallback to the value declared in Nomad provider configuration, if any.
652
- :param pulumi.Input[bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
653
- :param pulumi.Input[bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
577
+ :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
578
+ :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
654
579
  deregistered if the ID of the job in the jobspec changes.
655
- :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
580
+ :param pulumi.Input[builtins.bool] detach: `(boolean: true)` - If true, the provider will return immediately
656
581
  after creating or updating, instead of monitoring.
657
582
  :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
658
- :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
659
- :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
583
+ :param pulumi.Input[builtins.str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
584
+ :param pulumi.Input[builtins.bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
660
585
  JSON instead of the default HCL.
661
- :param pulumi.Input[bool] policy_override: `(boolean: false)` - Determines if the job will override any
586
+ :param pulumi.Input[builtins.bool] policy_override: `(boolean: false)` - Determines if the job will override any
662
587
  soft-mandatory Sentinel policies and register even if they fail.
663
- :param pulumi.Input[bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
588
+ :param pulumi.Input[builtins.bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
664
589
  be purged when the resource is destroyed.
665
- :param pulumi.Input[bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
590
+ :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
666
591
  again if its status is `dead`.
667
- :param pulumi.Input[str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
668
- Will fallback to the value declared in Nomad provider configuration, if any.
669
592
  """
670
593
  ...
671
594
  @overload
@@ -690,18 +613,16 @@ class Job(pulumi.CustomResource):
690
613
  def _internal_init(__self__,
691
614
  resource_name: str,
692
615
  opts: Optional[pulumi.ResourceOptions] = None,
693
- consul_token: Optional[pulumi.Input[str]] = None,
694
- deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
695
- deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
696
- detach: Optional[pulumi.Input[bool]] = None,
616
+ deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
617
+ deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
618
+ detach: Optional[pulumi.Input[builtins.bool]] = None,
697
619
  hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
698
- jobspec: Optional[pulumi.Input[str]] = None,
699
- json: Optional[pulumi.Input[bool]] = None,
700
- policy_override: Optional[pulumi.Input[bool]] = None,
701
- purge_on_destroy: Optional[pulumi.Input[bool]] = None,
702
- read_allocation_ids: Optional[pulumi.Input[bool]] = None,
703
- rerun_if_dead: Optional[pulumi.Input[bool]] = None,
704
- vault_token: Optional[pulumi.Input[str]] = None,
620
+ jobspec: Optional[pulumi.Input[builtins.str]] = None,
621
+ json: Optional[pulumi.Input[builtins.bool]] = None,
622
+ policy_override: Optional[pulumi.Input[builtins.bool]] = None,
623
+ purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
624
+ read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
625
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
705
626
  __props__=None):
706
627
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
707
628
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -711,7 +632,6 @@ class Job(pulumi.CustomResource):
711
632
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
712
633
  __props__ = JobArgs.__new__(JobArgs)
713
634
 
714
- __props__.__dict__["consul_token"] = None if consul_token is None else pulumi.Output.secret(consul_token)
715
635
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
716
636
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
717
637
  __props__.__dict__["detach"] = detach
@@ -724,7 +644,6 @@ class Job(pulumi.CustomResource):
724
644
  __props__.__dict__["purge_on_destroy"] = purge_on_destroy
725
645
  __props__.__dict__["read_allocation_ids"] = read_allocation_ids
726
646
  __props__.__dict__["rerun_if_dead"] = rerun_if_dead
727
- __props__.__dict__["vault_token"] = None if vault_token is None else pulumi.Output.secret(vault_token)
728
647
  __props__.__dict__["allocation_ids"] = None
729
648
  __props__.__dict__["datacenters"] = None
730
649
  __props__.__dict__["deployment_id"] = None
@@ -736,8 +655,6 @@ class Job(pulumi.CustomResource):
736
655
  __props__.__dict__["status"] = None
737
656
  __props__.__dict__["task_groups"] = None
738
657
  __props__.__dict__["type"] = None
739
- secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["consulToken", "vaultToken"])
740
- opts = pulumi.ResourceOptions.merge(opts, secret_opts)
741
658
  super(Job, __self__).__init__(
742
659
  'nomad:index/job:Job',
743
660
  resource_name,
@@ -748,29 +665,27 @@ class Job(pulumi.CustomResource):
748
665
  def get(resource_name: str,
749
666
  id: pulumi.Input[str],
750
667
  opts: Optional[pulumi.ResourceOptions] = None,
751
- allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
752
- consul_token: Optional[pulumi.Input[str]] = None,
753
- datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
754
- deployment_id: Optional[pulumi.Input[str]] = None,
755
- deployment_status: Optional[pulumi.Input[str]] = None,
756
- deregister_on_destroy: Optional[pulumi.Input[bool]] = None,
757
- deregister_on_id_change: Optional[pulumi.Input[bool]] = None,
758
- detach: Optional[pulumi.Input[bool]] = None,
668
+ allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
669
+ datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
670
+ deployment_id: Optional[pulumi.Input[builtins.str]] = None,
671
+ deployment_status: Optional[pulumi.Input[builtins.str]] = None,
672
+ deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
673
+ deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
674
+ detach: Optional[pulumi.Input[builtins.bool]] = None,
759
675
  hcl2: Optional[pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']]] = None,
760
- jobspec: Optional[pulumi.Input[str]] = None,
761
- json: Optional[pulumi.Input[bool]] = None,
762
- modify_index: Optional[pulumi.Input[str]] = None,
763
- name: Optional[pulumi.Input[str]] = None,
764
- namespace: Optional[pulumi.Input[str]] = None,
765
- policy_override: Optional[pulumi.Input[bool]] = None,
766
- purge_on_destroy: Optional[pulumi.Input[bool]] = None,
767
- read_allocation_ids: Optional[pulumi.Input[bool]] = None,
768
- region: Optional[pulumi.Input[str]] = None,
769
- rerun_if_dead: Optional[pulumi.Input[bool]] = None,
770
- status: Optional[pulumi.Input[str]] = None,
676
+ jobspec: Optional[pulumi.Input[builtins.str]] = None,
677
+ json: Optional[pulumi.Input[builtins.bool]] = None,
678
+ modify_index: Optional[pulumi.Input[builtins.str]] = None,
679
+ name: Optional[pulumi.Input[builtins.str]] = None,
680
+ namespace: Optional[pulumi.Input[builtins.str]] = None,
681
+ policy_override: Optional[pulumi.Input[builtins.bool]] = None,
682
+ purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
683
+ read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
684
+ region: Optional[pulumi.Input[builtins.str]] = None,
685
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
686
+ status: Optional[pulumi.Input[builtins.str]] = None,
771
687
  task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['JobTaskGroupArgs', 'JobTaskGroupArgsDict']]]]] = None,
772
- type: Optional[pulumi.Input[str]] = None,
773
- vault_token: Optional[pulumi.Input[str]] = None) -> 'Job':
688
+ type: Optional[pulumi.Input[builtins.str]] = None) -> 'Job':
774
689
  """
775
690
  Get an existing Job resource's state with the given name, id, and optional extra
776
691
  properties used to qualify the lookup.
@@ -778,42 +693,37 @@ class Job(pulumi.CustomResource):
778
693
  :param str resource_name: The unique name of the resulting resource.
779
694
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
780
695
  :param pulumi.ResourceOptions opts: Options for the resource.
781
- :param pulumi.Input[Sequence[pulumi.Input[str]]] allocation_ids: The IDs for allocations associated with this job.
782
- :param pulumi.Input[str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
783
- Will fallback to the value declared in Nomad provider configuration, if any.
784
- :param pulumi.Input[Sequence[pulumi.Input[str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
785
- :param pulumi.Input[str] deployment_id: If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
786
- :param pulumi.Input[str] deployment_status: If detach = false, the status for the deployment associated with the last job create/update, if one exists.
787
- :param pulumi.Input[bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
788
- :param pulumi.Input[bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
696
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] allocation_ids: The IDs for allocations associated with this job.
697
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
698
+ :param pulumi.Input[builtins.str] deployment_id: If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
699
+ :param pulumi.Input[builtins.str] deployment_status: If detach = false, the status for the deployment associated with the last job create/update, if one exists.
700
+ :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
701
+ :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
789
702
  deregistered if the ID of the job in the jobspec changes.
790
- :param pulumi.Input[bool] detach: `(boolean: true)` - If true, the provider will return immediately
703
+ :param pulumi.Input[builtins.bool] detach: `(boolean: true)` - If true, the provider will return immediately
791
704
  after creating or updating, instead of monitoring.
792
705
  :param pulumi.Input[Union['JobHcl2Args', 'JobHcl2ArgsDict']] hcl2: `(block: optional)` - Options for the HCL2 jobspec parser.
793
- :param pulumi.Input[str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
794
- :param pulumi.Input[bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
706
+ :param pulumi.Input[builtins.str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
707
+ :param pulumi.Input[builtins.bool] json: `(boolean: false)` - Set this to `true` if your jobspec is structured with
795
708
  JSON instead of the default HCL.
796
- :param pulumi.Input[str] modify_index: Integer that increments for each change. Used to detect any changes between plan and apply.
797
- :param pulumi.Input[str] name: The name of the job, as derived from the jobspec.
798
- :param pulumi.Input[str] namespace: The namespace of the job, as derived from the jobspec.
799
- :param pulumi.Input[bool] policy_override: `(boolean: false)` - Determines if the job will override any
709
+ :param pulumi.Input[builtins.str] modify_index: Integer that increments for each change. Used to detect any changes between plan and apply.
710
+ :param pulumi.Input[builtins.str] name: The name of the job, as derived from the jobspec.
711
+ :param pulumi.Input[builtins.str] namespace: The namespace of the job, as derived from the jobspec.
712
+ :param pulumi.Input[builtins.bool] policy_override: `(boolean: false)` - Determines if the job will override any
800
713
  soft-mandatory Sentinel policies and register even if they fail.
801
- :param pulumi.Input[bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
714
+ :param pulumi.Input[builtins.bool] purge_on_destroy: `(boolean: false)` - Set this to true if you want the job to
802
715
  be purged when the resource is destroyed.
803
- :param pulumi.Input[str] region: The target region for the job, as derived from the jobspec.
804
- :param pulumi.Input[bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
716
+ :param pulumi.Input[builtins.str] region: The target region for the job, as derived from the jobspec.
717
+ :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
805
718
  again if its status is `dead`.
806
- :param pulumi.Input[str] status: The status of the job.
807
- :param pulumi.Input[str] type: The type of the job, as derived from the jobspec.
808
- :param pulumi.Input[str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
809
- Will fallback to the value declared in Nomad provider configuration, if any.
719
+ :param pulumi.Input[builtins.str] status: The status of the job.
720
+ :param pulumi.Input[builtins.str] type: The type of the job, as derived from the jobspec.
810
721
  """
811
722
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
812
723
 
813
724
  __props__ = _JobState.__new__(_JobState)
814
725
 
815
726
  __props__.__dict__["allocation_ids"] = allocation_ids
816
- __props__.__dict__["consul_token"] = consul_token
817
727
  __props__.__dict__["datacenters"] = datacenters
818
728
  __props__.__dict__["deployment_id"] = deployment_id
819
729
  __props__.__dict__["deployment_status"] = deployment_status
@@ -834,30 +744,20 @@ class Job(pulumi.CustomResource):
834
744
  __props__.__dict__["status"] = status
835
745
  __props__.__dict__["task_groups"] = task_groups
836
746
  __props__.__dict__["type"] = type
837
- __props__.__dict__["vault_token"] = vault_token
838
747
  return Job(resource_name, opts=opts, __props__=__props__)
839
748
 
840
749
  @property
841
750
  @pulumi.getter(name="allocationIds")
842
751
  @_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
- def allocation_ids(self) -> pulumi.Output[Sequence[str]]:
752
+ def allocation_ids(self) -> pulumi.Output[Sequence[builtins.str]]:
844
753
  """
845
754
  The IDs for allocations associated with this job.
846
755
  """
847
756
  return pulumi.get(self, "allocation_ids")
848
757
 
849
- @property
850
- @pulumi.getter(name="consulToken")
851
- def consul_token(self) -> pulumi.Output[Optional[str]]:
852
- """
853
- `(string: <optional>)` - Consul token used when registering this job.
854
- Will fallback to the value declared in Nomad provider configuration, if any.
855
- """
856
- return pulumi.get(self, "consul_token")
857
-
858
758
  @property
859
759
  @pulumi.getter
860
- def datacenters(self) -> pulumi.Output[Sequence[str]]:
760
+ def datacenters(self) -> pulumi.Output[Sequence[builtins.str]]:
861
761
  """
862
762
  The target datacenters for the job, as derived from the jobspec.
863
763
  """
@@ -865,7 +765,7 @@ class Job(pulumi.CustomResource):
865
765
 
866
766
  @property
867
767
  @pulumi.getter(name="deploymentId")
868
- def deployment_id(self) -> pulumi.Output[str]:
768
+ def deployment_id(self) -> pulumi.Output[builtins.str]:
869
769
  """
870
770
  If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
871
771
  """
@@ -873,7 +773,7 @@ class Job(pulumi.CustomResource):
873
773
 
874
774
  @property
875
775
  @pulumi.getter(name="deploymentStatus")
876
- def deployment_status(self) -> pulumi.Output[str]:
776
+ def deployment_status(self) -> pulumi.Output[builtins.str]:
877
777
  """
878
778
  If detach = false, the status for the deployment associated with the last job create/update, if one exists.
879
779
  """
@@ -881,7 +781,7 @@ class Job(pulumi.CustomResource):
881
781
 
882
782
  @property
883
783
  @pulumi.getter(name="deregisterOnDestroy")
884
- def deregister_on_destroy(self) -> pulumi.Output[Optional[bool]]:
784
+ def deregister_on_destroy(self) -> pulumi.Output[Optional[builtins.bool]]:
885
785
  """
886
786
  If true, the job will be deregistered on destroy.
887
787
  """
@@ -889,7 +789,7 @@ class Job(pulumi.CustomResource):
889
789
 
890
790
  @property
891
791
  @pulumi.getter(name="deregisterOnIdChange")
892
- def deregister_on_id_change(self) -> pulumi.Output[Optional[bool]]:
792
+ def deregister_on_id_change(self) -> pulumi.Output[Optional[builtins.bool]]:
893
793
  """
894
794
  `(boolean: true)` - Determines if the job will be
895
795
  deregistered if the ID of the job in the jobspec changes.
@@ -898,7 +798,7 @@ class Job(pulumi.CustomResource):
898
798
 
899
799
  @property
900
800
  @pulumi.getter
901
- def detach(self) -> pulumi.Output[Optional[bool]]:
801
+ def detach(self) -> pulumi.Output[Optional[builtins.bool]]:
902
802
  """
903
803
  `(boolean: true)` - If true, the provider will return immediately
904
804
  after creating or updating, instead of monitoring.
@@ -915,7 +815,7 @@ class Job(pulumi.CustomResource):
915
815
 
916
816
  @property
917
817
  @pulumi.getter
918
- def jobspec(self) -> pulumi.Output[str]:
818
+ def jobspec(self) -> pulumi.Output[builtins.str]:
919
819
  """
920
820
  `(string: <required>)` - The contents of the jobspec to register.
921
821
  """
@@ -923,7 +823,7 @@ class Job(pulumi.CustomResource):
923
823
 
924
824
  @property
925
825
  @pulumi.getter
926
- def json(self) -> pulumi.Output[Optional[bool]]:
826
+ def json(self) -> pulumi.Output[Optional[builtins.bool]]:
927
827
  """
928
828
  `(boolean: false)` - Set this to `true` if your jobspec is structured with
929
829
  JSON instead of the default HCL.
@@ -932,7 +832,7 @@ class Job(pulumi.CustomResource):
932
832
 
933
833
  @property
934
834
  @pulumi.getter(name="modifyIndex")
935
- def modify_index(self) -> pulumi.Output[str]:
835
+ def modify_index(self) -> pulumi.Output[builtins.str]:
936
836
  """
937
837
  Integer that increments for each change. Used to detect any changes between plan and apply.
938
838
  """
@@ -940,7 +840,7 @@ class Job(pulumi.CustomResource):
940
840
 
941
841
  @property
942
842
  @pulumi.getter
943
- def name(self) -> pulumi.Output[str]:
843
+ def name(self) -> pulumi.Output[builtins.str]:
944
844
  """
945
845
  The name of the job, as derived from the jobspec.
946
846
  """
@@ -948,7 +848,7 @@ class Job(pulumi.CustomResource):
948
848
 
949
849
  @property
950
850
  @pulumi.getter
951
- def namespace(self) -> pulumi.Output[str]:
851
+ def namespace(self) -> pulumi.Output[builtins.str]:
952
852
  """
953
853
  The namespace of the job, as derived from the jobspec.
954
854
  """
@@ -956,7 +856,7 @@ class Job(pulumi.CustomResource):
956
856
 
957
857
  @property
958
858
  @pulumi.getter(name="policyOverride")
959
- def policy_override(self) -> pulumi.Output[Optional[bool]]:
859
+ def policy_override(self) -> pulumi.Output[Optional[builtins.bool]]:
960
860
  """
961
861
  `(boolean: false)` - Determines if the job will override any
962
862
  soft-mandatory Sentinel policies and register even if they fail.
@@ -965,7 +865,7 @@ class Job(pulumi.CustomResource):
965
865
 
966
866
  @property
967
867
  @pulumi.getter(name="purgeOnDestroy")
968
- def purge_on_destroy(self) -> pulumi.Output[Optional[bool]]:
868
+ def purge_on_destroy(self) -> pulumi.Output[Optional[builtins.bool]]:
969
869
  """
970
870
  `(boolean: false)` - Set this to true if you want the job to
971
871
  be purged when the resource is destroyed.
@@ -975,12 +875,12 @@ class Job(pulumi.CustomResource):
975
875
  @property
976
876
  @pulumi.getter(name="readAllocationIds")
977
877
  @_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
- def read_allocation_ids(self) -> pulumi.Output[Optional[bool]]:
878
+ def read_allocation_ids(self) -> pulumi.Output[Optional[builtins.bool]]:
979
879
  return pulumi.get(self, "read_allocation_ids")
980
880
 
981
881
  @property
982
882
  @pulumi.getter
983
- def region(self) -> pulumi.Output[str]:
883
+ def region(self) -> pulumi.Output[builtins.str]:
984
884
  """
985
885
  The target region for the job, as derived from the jobspec.
986
886
  """
@@ -988,7 +888,7 @@ class Job(pulumi.CustomResource):
988
888
 
989
889
  @property
990
890
  @pulumi.getter(name="rerunIfDead")
991
- def rerun_if_dead(self) -> pulumi.Output[Optional[bool]]:
891
+ def rerun_if_dead(self) -> pulumi.Output[Optional[builtins.bool]]:
992
892
  """
993
893
  `(boolean: false)` - Set this to true to force the job to run
994
894
  again if its status is `dead`.
@@ -997,7 +897,7 @@ class Job(pulumi.CustomResource):
997
897
 
998
898
  @property
999
899
  @pulumi.getter
1000
- def status(self) -> pulumi.Output[str]:
900
+ def status(self) -> pulumi.Output[builtins.str]:
1001
901
  """
1002
902
  The status of the job.
1003
903
  """
@@ -1010,18 +910,9 @@ class Job(pulumi.CustomResource):
1010
910
 
1011
911
  @property
1012
912
  @pulumi.getter
1013
- def type(self) -> pulumi.Output[str]:
913
+ def type(self) -> pulumi.Output[builtins.str]:
1014
914
  """
1015
915
  The type of the job, as derived from the jobspec.
1016
916
  """
1017
917
  return pulumi.get(self, "type")
1018
918
 
1019
- @property
1020
- @pulumi.getter(name="vaultToken")
1021
- def vault_token(self) -> pulumi.Output[Optional[str]]:
1022
- """
1023
- `(string: <optional>)` - Vault token used when registering this job.
1024
- Will fallback to the value declared in Nomad provider configuration, if any.
1025
- """
1026
- return pulumi.get(self, "vault_token")
1027
-