pulumi-nomad 2.5.0a1744783739__py3-none-any.whl → 2.6.0a1745042960__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.
pulumi_nomad/job.py CHANGED
@@ -23,7 +23,6 @@ __all__ = ['JobArgs', 'Job']
23
23
  class JobArgs:
24
24
  def __init__(__self__, *,
25
25
  jobspec: pulumi.Input[builtins.str],
26
- consul_token: Optional[pulumi.Input[builtins.str]] = None,
27
26
  deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
28
27
  deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
29
28
  detach: Optional[pulumi.Input[builtins.bool]] = None,
@@ -32,13 +31,10 @@ class JobArgs:
32
31
  policy_override: Optional[pulumi.Input[builtins.bool]] = None,
33
32
  purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
34
33
  read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
35
- rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
36
- vault_token: Optional[pulumi.Input[builtins.str]] = None):
34
+ rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None):
37
35
  """
38
36
  The set of arguments for constructing a Job resource.
39
37
  :param pulumi.Input[builtins.str] jobspec: `(string: <required>)` - The contents of the jobspec to register.
40
- :param pulumi.Input[builtins.str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
41
- Will fallback to the value declared in Nomad provider configuration, if any.
42
38
  :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
43
39
  :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
44
40
  deregistered if the ID of the job in the jobspec changes.
@@ -53,12 +49,8 @@ class JobArgs:
53
49
  be purged when the resource is destroyed.
54
50
  :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
55
51
  again if its status is `dead`.
56
- :param pulumi.Input[builtins.str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
57
- Will fallback to the value declared in Nomad provider configuration, if any.
58
52
  """
59
53
  pulumi.set(__self__, "jobspec", jobspec)
60
- if consul_token is not None:
61
- pulumi.set(__self__, "consul_token", consul_token)
62
54
  if deregister_on_destroy is not None:
63
55
  pulumi.set(__self__, "deregister_on_destroy", deregister_on_destroy)
64
56
  if deregister_on_id_change is not None:
@@ -80,8 +72,6 @@ class JobArgs:
80
72
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
81
73
  if rerun_if_dead is not None:
82
74
  pulumi.set(__self__, "rerun_if_dead", rerun_if_dead)
83
- if vault_token is not None:
84
- pulumi.set(__self__, "vault_token", vault_token)
85
75
 
86
76
  @property
87
77
  @pulumi.getter
@@ -95,19 +85,6 @@ class JobArgs:
95
85
  def jobspec(self, value: pulumi.Input[builtins.str]):
96
86
  pulumi.set(self, "jobspec", value)
97
87
 
98
- @property
99
- @pulumi.getter(name="consulToken")
100
- def consul_token(self) -> Optional[pulumi.Input[builtins.str]]:
101
- """
102
- `(string: <optional>)` - Consul token used when registering this job.
103
- Will fallback to the value declared in Nomad provider configuration, if any.
104
- """
105
- return pulumi.get(self, "consul_token")
106
-
107
- @consul_token.setter
108
- def consul_token(self, value: Optional[pulumi.Input[builtins.str]]):
109
- pulumi.set(self, "consul_token", value)
110
-
111
88
  @property
112
89
  @pulumi.getter(name="deregisterOnDestroy")
113
90
  def deregister_on_destroy(self) -> Optional[pulumi.Input[builtins.bool]]:
@@ -220,25 +197,11 @@ class JobArgs:
220
197
  def rerun_if_dead(self, value: Optional[pulumi.Input[builtins.bool]]):
221
198
  pulumi.set(self, "rerun_if_dead", value)
222
199
 
223
- @property
224
- @pulumi.getter(name="vaultToken")
225
- def vault_token(self) -> Optional[pulumi.Input[builtins.str]]:
226
- """
227
- `(string: <optional>)` - Vault token used when registering this job.
228
- Will fallback to the value declared in Nomad provider configuration, if any.
229
- """
230
- return pulumi.get(self, "vault_token")
231
-
232
- @vault_token.setter
233
- def vault_token(self, value: Optional[pulumi.Input[builtins.str]]):
234
- pulumi.set(self, "vault_token", value)
235
-
236
200
 
237
201
  @pulumi.input_type
238
202
  class _JobState:
239
203
  def __init__(__self__, *,
240
204
  allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
241
- consul_token: Optional[pulumi.Input[builtins.str]] = None,
242
205
  datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
243
206
  deployment_id: Optional[pulumi.Input[builtins.str]] = None,
244
207
  deployment_status: Optional[pulumi.Input[builtins.str]] = None,
@@ -258,13 +221,10 @@ class _JobState:
258
221
  rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
259
222
  status: Optional[pulumi.Input[builtins.str]] = None,
260
223
  task_groups: Optional[pulumi.Input[Sequence[pulumi.Input['JobTaskGroupArgs']]]] = None,
261
- type: Optional[pulumi.Input[builtins.str]] = None,
262
- vault_token: Optional[pulumi.Input[builtins.str]] = None):
224
+ type: Optional[pulumi.Input[builtins.str]] = None):
263
225
  """
264
226
  Input properties used for looking up and filtering Job resources.
265
227
  :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] allocation_ids: The IDs for allocations associated with this job.
266
- :param pulumi.Input[builtins.str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
267
- Will fallback to the value declared in Nomad provider configuration, if any.
268
228
  :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
269
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.
270
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.
@@ -289,16 +249,12 @@ class _JobState:
289
249
  again if its status is `dead`.
290
250
  :param pulumi.Input[builtins.str] status: The status of the job.
291
251
  :param pulumi.Input[builtins.str] type: The type of the job, as derived from the jobspec.
292
- :param pulumi.Input[builtins.str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
293
- Will fallback to the value declared in Nomad provider configuration, if any.
294
252
  """
295
253
  if allocation_ids is not None:
296
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)
297
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.""")
298
256
  if allocation_ids is not None:
299
257
  pulumi.set(__self__, "allocation_ids", allocation_ids)
300
- if consul_token is not None:
301
- pulumi.set(__self__, "consul_token", consul_token)
302
258
  if datacenters is not None:
303
259
  pulumi.set(__self__, "datacenters", datacenters)
304
260
  if deployment_id is not None:
@@ -342,8 +298,6 @@ class _JobState:
342
298
  pulumi.set(__self__, "task_groups", task_groups)
343
299
  if type is not None:
344
300
  pulumi.set(__self__, "type", type)
345
- if vault_token is not None:
346
- pulumi.set(__self__, "vault_token", vault_token)
347
301
 
348
302
  @property
349
303
  @pulumi.getter(name="allocationIds")
@@ -358,19 +312,6 @@ class _JobState:
358
312
  def allocation_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
359
313
  pulumi.set(self, "allocation_ids", value)
360
314
 
361
- @property
362
- @pulumi.getter(name="consulToken")
363
- def consul_token(self) -> Optional[pulumi.Input[builtins.str]]:
364
- """
365
- `(string: <optional>)` - Consul token used when registering this job.
366
- Will fallback to the value declared in Nomad provider configuration, if any.
367
- """
368
- return pulumi.get(self, "consul_token")
369
-
370
- @consul_token.setter
371
- def consul_token(self, value: Optional[pulumi.Input[builtins.str]]):
372
- pulumi.set(self, "consul_token", value)
373
-
374
315
  @property
375
316
  @pulumi.getter
376
317
  def datacenters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
@@ -612,26 +553,12 @@ class _JobState:
612
553
  def type(self, value: Optional[pulumi.Input[builtins.str]]):
613
554
  pulumi.set(self, "type", value)
614
555
 
615
- @property
616
- @pulumi.getter(name="vaultToken")
617
- def vault_token(self) -> Optional[pulumi.Input[builtins.str]]:
618
- """
619
- `(string: <optional>)` - Vault token used when registering this job.
620
- Will fallback to the value declared in Nomad provider configuration, if any.
621
- """
622
- return pulumi.get(self, "vault_token")
623
-
624
- @vault_token.setter
625
- def vault_token(self, value: Optional[pulumi.Input[builtins.str]]):
626
- pulumi.set(self, "vault_token", value)
627
-
628
556
 
629
557
  class Job(pulumi.CustomResource):
630
558
  @overload
631
559
  def __init__(__self__,
632
560
  resource_name: str,
633
561
  opts: Optional[pulumi.ResourceOptions] = None,
634
- consul_token: Optional[pulumi.Input[builtins.str]] = None,
635
562
  deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
636
563
  deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
637
564
  detach: Optional[pulumi.Input[builtins.bool]] = None,
@@ -642,14 +569,11 @@ class Job(pulumi.CustomResource):
642
569
  purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
643
570
  read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
644
571
  rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
645
- vault_token: Optional[pulumi.Input[builtins.str]] = None,
646
572
  __props__=None):
647
573
  """
648
574
  Create a Job resource with the given unique name, props, and options.
649
575
  :param str resource_name: The name of the resource.
650
576
  :param pulumi.ResourceOptions opts: Options for the resource.
651
- :param pulumi.Input[builtins.str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
652
- Will fallback to the value declared in Nomad provider configuration, if any.
653
577
  :param pulumi.Input[builtins.bool] deregister_on_destroy: If true, the job will be deregistered on destroy.
654
578
  :param pulumi.Input[builtins.bool] deregister_on_id_change: `(boolean: true)` - Determines if the job will be
655
579
  deregistered if the ID of the job in the jobspec changes.
@@ -665,8 +589,6 @@ class Job(pulumi.CustomResource):
665
589
  be purged when the resource is destroyed.
666
590
  :param pulumi.Input[builtins.bool] rerun_if_dead: `(boolean: false)` - Set this to true to force the job to run
667
591
  again if its status is `dead`.
668
- :param pulumi.Input[builtins.str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
669
- Will fallback to the value declared in Nomad provider configuration, if any.
670
592
  """
671
593
  ...
672
594
  @overload
@@ -691,7 +613,6 @@ class Job(pulumi.CustomResource):
691
613
  def _internal_init(__self__,
692
614
  resource_name: str,
693
615
  opts: Optional[pulumi.ResourceOptions] = None,
694
- consul_token: Optional[pulumi.Input[builtins.str]] = None,
695
616
  deregister_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
696
617
  deregister_on_id_change: Optional[pulumi.Input[builtins.bool]] = None,
697
618
  detach: Optional[pulumi.Input[builtins.bool]] = None,
@@ -702,7 +623,6 @@ class Job(pulumi.CustomResource):
702
623
  purge_on_destroy: Optional[pulumi.Input[builtins.bool]] = None,
703
624
  read_allocation_ids: Optional[pulumi.Input[builtins.bool]] = None,
704
625
  rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
705
- vault_token: Optional[pulumi.Input[builtins.str]] = None,
706
626
  __props__=None):
707
627
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
708
628
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -712,7 +632,6 @@ class Job(pulumi.CustomResource):
712
632
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
713
633
  __props__ = JobArgs.__new__(JobArgs)
714
634
 
715
- __props__.__dict__["consul_token"] = None if consul_token is None else pulumi.Output.secret(consul_token)
716
635
  __props__.__dict__["deregister_on_destroy"] = deregister_on_destroy
717
636
  __props__.__dict__["deregister_on_id_change"] = deregister_on_id_change
718
637
  __props__.__dict__["detach"] = detach
@@ -725,7 +644,6 @@ class Job(pulumi.CustomResource):
725
644
  __props__.__dict__["purge_on_destroy"] = purge_on_destroy
726
645
  __props__.__dict__["read_allocation_ids"] = read_allocation_ids
727
646
  __props__.__dict__["rerun_if_dead"] = rerun_if_dead
728
- __props__.__dict__["vault_token"] = None if vault_token is None else pulumi.Output.secret(vault_token)
729
647
  __props__.__dict__["allocation_ids"] = None
730
648
  __props__.__dict__["datacenters"] = None
731
649
  __props__.__dict__["deployment_id"] = None
@@ -737,8 +655,6 @@ class Job(pulumi.CustomResource):
737
655
  __props__.__dict__["status"] = None
738
656
  __props__.__dict__["task_groups"] = None
739
657
  __props__.__dict__["type"] = None
740
- secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["consulToken", "vaultToken"])
741
- opts = pulumi.ResourceOptions.merge(opts, secret_opts)
742
658
  super(Job, __self__).__init__(
743
659
  'nomad:index/job:Job',
744
660
  resource_name,
@@ -750,7 +666,6 @@ class Job(pulumi.CustomResource):
750
666
  id: pulumi.Input[str],
751
667
  opts: Optional[pulumi.ResourceOptions] = None,
752
668
  allocation_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
753
- consul_token: Optional[pulumi.Input[builtins.str]] = None,
754
669
  datacenters: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
755
670
  deployment_id: Optional[pulumi.Input[builtins.str]] = None,
756
671
  deployment_status: Optional[pulumi.Input[builtins.str]] = None,
@@ -770,8 +685,7 @@ class Job(pulumi.CustomResource):
770
685
  rerun_if_dead: Optional[pulumi.Input[builtins.bool]] = None,
771
686
  status: Optional[pulumi.Input[builtins.str]] = None,
772
687
  task_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['JobTaskGroupArgs', 'JobTaskGroupArgsDict']]]]] = None,
773
- type: Optional[pulumi.Input[builtins.str]] = None,
774
- vault_token: Optional[pulumi.Input[builtins.str]] = None) -> 'Job':
688
+ type: Optional[pulumi.Input[builtins.str]] = None) -> 'Job':
775
689
  """
776
690
  Get an existing Job resource's state with the given name, id, and optional extra
777
691
  properties used to qualify the lookup.
@@ -780,8 +694,6 @@ class Job(pulumi.CustomResource):
780
694
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
781
695
  :param pulumi.ResourceOptions opts: Options for the resource.
782
696
  :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] allocation_ids: The IDs for allocations associated with this job.
783
- :param pulumi.Input[builtins.str] consul_token: `(string: <optional>)` - Consul token used when registering this job.
784
- Will fallback to the value declared in Nomad provider configuration, if any.
785
697
  :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] datacenters: The target datacenters for the job, as derived from the jobspec.
786
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.
787
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.
@@ -806,15 +718,12 @@ class Job(pulumi.CustomResource):
806
718
  again if its status is `dead`.
807
719
  :param pulumi.Input[builtins.str] status: The status of the job.
808
720
  :param pulumi.Input[builtins.str] type: The type of the job, as derived from the jobspec.
809
- :param pulumi.Input[builtins.str] vault_token: `(string: <optional>)` - Vault token used when registering this job.
810
- Will fallback to the value declared in Nomad provider configuration, if any.
811
721
  """
812
722
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
813
723
 
814
724
  __props__ = _JobState.__new__(_JobState)
815
725
 
816
726
  __props__.__dict__["allocation_ids"] = allocation_ids
817
- __props__.__dict__["consul_token"] = consul_token
818
727
  __props__.__dict__["datacenters"] = datacenters
819
728
  __props__.__dict__["deployment_id"] = deployment_id
820
729
  __props__.__dict__["deployment_status"] = deployment_status
@@ -835,7 +744,6 @@ class Job(pulumi.CustomResource):
835
744
  __props__.__dict__["status"] = status
836
745
  __props__.__dict__["task_groups"] = task_groups
837
746
  __props__.__dict__["type"] = type
838
- __props__.__dict__["vault_token"] = vault_token
839
747
  return Job(resource_name, opts=opts, __props__=__props__)
840
748
 
841
749
  @property
@@ -847,15 +755,6 @@ class Job(pulumi.CustomResource):
847
755
  """
848
756
  return pulumi.get(self, "allocation_ids")
849
757
 
850
- @property
851
- @pulumi.getter(name="consulToken")
852
- def consul_token(self) -> pulumi.Output[Optional[builtins.str]]:
853
- """
854
- `(string: <optional>)` - Consul token used when registering this job.
855
- Will fallback to the value declared in Nomad provider configuration, if any.
856
- """
857
- return pulumi.get(self, "consul_token")
858
-
859
758
  @property
860
759
  @pulumi.getter
861
760
  def datacenters(self) -> pulumi.Output[Sequence[builtins.str]]:
@@ -1017,12 +916,3 @@ class Job(pulumi.CustomResource):
1017
916
  """
1018
917
  return pulumi.get(self, "type")
1019
918
 
1020
- @property
1021
- @pulumi.getter(name="vaultToken")
1022
- def vault_token(self) -> pulumi.Output[Optional[builtins.str]]:
1023
- """
1024
- `(string: <optional>)` - Vault token used when registering this job.
1025
- Will fallback to the value declared in Nomad provider configuration, if any.
1026
- """
1027
- return pulumi.get(self, "vault_token")
1028
-