pulumi-nomad 2.2.0a1710332982__py3-none-any.whl → 2.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. pulumi_nomad/_inputs.py +32 -126
  2. pulumi_nomad/acl_auth_method.py +4 -6
  3. pulumi_nomad/acl_policy.py +0 -64
  4. pulumi_nomad/acl_token.py +18 -26
  5. pulumi_nomad/csi_volume.py +0 -72
  6. pulumi_nomad/csi_volume_registration.py +0 -72
  7. pulumi_nomad/external_volume.py +6 -78
  8. pulumi_nomad/get_acl_policies.py +0 -4
  9. pulumi_nomad/get_acl_policy.py +0 -4
  10. pulumi_nomad/get_acl_role.py +0 -4
  11. pulumi_nomad/get_acl_roles.py +0 -4
  12. pulumi_nomad/get_acl_token.py +0 -4
  13. pulumi_nomad/get_acl_tokens.py +0 -4
  14. pulumi_nomad/get_allocations.py +0 -4
  15. pulumi_nomad/get_datacenters.py +4 -8
  16. pulumi_nomad/get_deployments.py +0 -4
  17. pulumi_nomad/get_job.py +0 -4
  18. pulumi_nomad/get_job_parser.py +0 -24
  19. pulumi_nomad/get_namespace.py +0 -4
  20. pulumi_nomad/get_namespaces.py +2 -4
  21. pulumi_nomad/get_node_pool.py +0 -4
  22. pulumi_nomad/get_node_pools.py +0 -4
  23. pulumi_nomad/get_plugin.py +0 -4
  24. pulumi_nomad/get_plugins.py +0 -4
  25. pulumi_nomad/get_regions.py +34 -0
  26. pulumi_nomad/get_scaling_policies.py +0 -4
  27. pulumi_nomad/get_scaling_policy.py +0 -4
  28. pulumi_nomad/get_scheduler_policy.py +0 -4
  29. pulumi_nomad/get_variable.py +0 -4
  30. pulumi_nomad/get_volumes.py +0 -4
  31. pulumi_nomad/job.py +16 -16
  32. pulumi_nomad/namespace.py +14 -16
  33. pulumi_nomad/node_pool.py +2 -4
  34. pulumi_nomad/outputs.py +32 -126
  35. pulumi_nomad/quote_specification.py +4 -6
  36. pulumi_nomad/scheduler_config.py +6 -10
  37. pulumi_nomad/sentinel_policy.py +6 -10
  38. pulumi_nomad/variable.py +14 -18
  39. pulumi_nomad/volume.py +8 -80
  40. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.2.1.dist-info}/METADATA +1 -1
  41. pulumi_nomad-2.2.1.dist-info/RECORD +54 -0
  42. pulumi_nomad-2.2.0a1710332982.dist-info/RECORD +0 -54
  43. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.2.1.dist-info}/WHEEL +0 -0
  44. {pulumi_nomad-2.2.0a1710332982.dist-info → pulumi_nomad-2.2.1.dist-info}/top_level.txt +0 -0
@@ -62,7 +62,6 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
62
62
 
63
63
  ## Example Usage
64
64
 
65
- <!--Start PulumiCodeChooser -->
66
65
  ```python
67
66
  import pulumi
68
67
  import pulumi_nomad as nomad
@@ -71,13 +70,13 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
71
70
  namespace = []
72
71
  for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
73
72
  namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
73
+ name=f"namespace-{namespaces[range['value']]}",
74
74
  description=f"Write to the namespace {namespaces[range['value']]}",
75
75
  rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
76
76
  policy = "write"
77
77
  }}
78
78
  \"\"\"))
79
79
  ```
80
- <!--End PulumiCodeChooser -->
81
80
  """
82
81
  __args__ = dict()
83
82
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -95,7 +94,6 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
95
94
 
96
95
  ## Example Usage
97
96
 
98
- <!--Start PulumiCodeChooser -->
99
97
  ```python
100
98
  import pulumi
101
99
  import pulumi_nomad as nomad
@@ -104,12 +102,12 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
104
102
  namespace = []
105
103
  for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
106
104
  namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
105
+ name=f"namespace-{namespaces[range['value']]}",
107
106
  description=f"Write to the namespace {namespaces[range['value']]}",
108
107
  rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
109
108
  policy = "write"
110
109
  }}
111
110
  \"\"\"))
112
111
  ```
113
- <!--End PulumiCodeChooser -->
114
112
  """
115
113
  ...
@@ -98,14 +98,12 @@ def get_node_pool(name: Optional[str] = None,
98
98
 
99
99
  ## Example Usage
100
100
 
101
- <!--Start PulumiCodeChooser -->
102
101
  ```python
103
102
  import pulumi
104
103
  import pulumi_nomad as nomad
105
104
 
106
105
  dev = nomad.get_node_pool(name="dev")
107
106
  ```
108
- <!--End PulumiCodeChooser -->
109
107
 
110
108
 
111
109
  :param str name: `(string)` - The name of the node pool to fetch.
@@ -131,14 +129,12 @@ def get_node_pool_output(name: Optional[pulumi.Input[str]] = None,
131
129
 
132
130
  ## Example Usage
133
131
 
134
- <!--Start PulumiCodeChooser -->
135
132
  ```python
136
133
  import pulumi
137
134
  import pulumi_nomad as nomad
138
135
 
139
136
  dev = nomad.get_node_pool(name="dev")
140
137
  ```
141
- <!--End PulumiCodeChooser -->
142
138
 
143
139
 
144
140
  :param str name: `(string)` - The name of the node pool to fetch.
@@ -84,14 +84,12 @@ def get_node_pools(filter: Optional[str] = None,
84
84
 
85
85
  ## Example Usage
86
86
 
87
- <!--Start PulumiCodeChooser -->
88
87
  ```python
89
88
  import pulumi
90
89
  import pulumi_nomad as nomad
91
90
 
92
91
  prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
93
92
  ```
94
- <!--End PulumiCodeChooser -->
95
93
 
96
94
 
97
95
  :param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
@@ -121,14 +119,12 @@ def get_node_pools_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
121
119
 
122
120
  ## Example Usage
123
121
 
124
- <!--Start PulumiCodeChooser -->
125
122
  ```python
126
123
  import pulumi
127
124
  import pulumi_nomad as nomad
128
125
 
129
126
  prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
130
127
  ```
131
- <!--End PulumiCodeChooser -->
132
128
 
133
129
 
134
130
  :param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
@@ -186,7 +186,6 @@ def get_plugin(plugin_id: Optional[str] = None,
186
186
 
187
187
  Check for the existence of a plugin:
188
188
 
189
- <!--Start PulumiCodeChooser -->
190
189
  ```python
191
190
  import pulumi
192
191
  import pulumi_nomad as nomad
@@ -194,7 +193,6 @@ def get_plugin(plugin_id: Optional[str] = None,
194
193
  ebs = nomad.get_plugin(plugin_id="aws-ebs0",
195
194
  wait_for_healthy=True)
196
195
  ```
197
- <!--End PulumiCodeChooser -->
198
196
 
199
197
  This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
200
198
  is healthy before returning.
@@ -245,7 +243,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
245
243
 
246
244
  Check for the existence of a plugin:
247
245
 
248
- <!--Start PulumiCodeChooser -->
249
246
  ```python
250
247
  import pulumi
251
248
  import pulumi_nomad as nomad
@@ -253,7 +250,6 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
253
250
  ebs = nomad.get_plugin(plugin_id="aws-ebs0",
254
251
  wait_for_healthy=True)
255
252
  ```
256
- <!--End PulumiCodeChooser -->
257
253
 
258
254
  This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
259
255
  is healthy before returning.
@@ -72,14 +72,12 @@ def get_plugins(type: Optional[str] = None,
72
72
 
73
73
  ## Example Usage
74
74
 
75
- <!--Start PulumiCodeChooser -->
76
75
  ```python
77
76
  import pulumi
78
77
  import pulumi_nomad as nomad
79
78
 
80
79
  example = nomad.get_plugins()
81
80
  ```
82
- <!--End PulumiCodeChooser -->
83
81
  """
84
82
  __args__ = dict()
85
83
  __args__['type'] = type
@@ -100,13 +98,11 @@ def get_plugins_output(type: Optional[pulumi.Input[Optional[str]]] = None,
100
98
 
101
99
  ## Example Usage
102
100
 
103
- <!--Start PulumiCodeChooser -->
104
101
  ```python
105
102
  import pulumi
106
103
  import pulumi_nomad as nomad
107
104
 
108
105
  example = nomad.get_plugins()
109
106
  ```
110
- <!--End PulumiCodeChooser -->
111
107
  """
112
108
  ...
@@ -59,6 +59,23 @@ class AwaitableGetRegionsResult(GetRegionsResult):
59
59
  def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegionsResult:
60
60
  """
61
61
  Retrieve a list of regions available in Nomad.
62
+
63
+ ## Example Usage
64
+
65
+ ```python
66
+ import pulumi
67
+ import pulumi_nomad as nomad
68
+
69
+
70
+ def not_implemented(msg):
71
+ raise NotImplementedError(msg)
72
+
73
+ my_regions = nomad.get_regions()
74
+ jobs = not_implemented("The template_file data resource is not yet supported.")
75
+ app = []
76
+ for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
77
+ app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
78
+ ```
62
79
  """
63
80
  __args__ = dict()
64
81
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -73,5 +90,22 @@ def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegi
73
90
  def get_regions_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRegionsResult]:
74
91
  """
75
92
  Retrieve a list of regions available in Nomad.
93
+
94
+ ## Example Usage
95
+
96
+ ```python
97
+ import pulumi
98
+ import pulumi_nomad as nomad
99
+
100
+
101
+ def not_implemented(msg):
102
+ raise NotImplementedError(msg)
103
+
104
+ my_regions = nomad.get_regions()
105
+ jobs = not_implemented("The template_file data resource is not yet supported.")
106
+ app = []
107
+ for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
108
+ app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
109
+ ```
76
110
  """
77
111
  ...
@@ -86,7 +86,6 @@ def get_scaling_policies(job_id: Optional[str] = None,
86
86
 
87
87
  ## Example Usage
88
88
 
89
- <!--Start PulumiCodeChooser -->
90
89
  ```python
91
90
  import pulumi
92
91
  import pulumi_nomad as nomad
@@ -94,7 +93,6 @@ def get_scaling_policies(job_id: Optional[str] = None,
94
93
  example = nomad.get_scaling_policies(job_id="webapp",
95
94
  type="horizontal")
96
95
  ```
97
- <!--End PulumiCodeChooser -->
98
96
 
99
97
 
100
98
  :param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
@@ -122,7 +120,6 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
122
120
 
123
121
  ## Example Usage
124
122
 
125
- <!--Start PulumiCodeChooser -->
126
123
  ```python
127
124
  import pulumi
128
125
  import pulumi_nomad as nomad
@@ -130,7 +127,6 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
130
127
  example = nomad.get_scaling_policies(job_id="webapp",
131
128
  type="horizontal")
132
129
  ```
133
- <!--End PulumiCodeChooser -->
134
130
 
135
131
 
136
132
  :param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
@@ -120,14 +120,12 @@ def get_scaling_policy(id: Optional[str] = None,
120
120
 
121
121
  ## Example Usage
122
122
 
123
- <!--Start PulumiCodeChooser -->
124
123
  ```python
125
124
  import pulumi
126
125
  import pulumi_nomad as nomad
127
126
 
128
127
  example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
129
128
  ```
130
- <!--End PulumiCodeChooser -->
131
129
 
132
130
 
133
131
  :param str id: `(string: <required>)` - The ID of the scaling policy.
@@ -155,14 +153,12 @@ def get_scaling_policy_output(id: Optional[pulumi.Input[str]] = None,
155
153
 
156
154
  ## Example Usage
157
155
 
158
- <!--Start PulumiCodeChooser -->
159
156
  ```python
160
157
  import pulumi
161
158
  import pulumi_nomad as nomad
162
159
 
163
160
  example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
164
161
  ```
165
- <!--End PulumiCodeChooser -->
166
162
 
167
163
 
168
164
  :param str id: `(string: <required>)` - The ID of the scaling policy.
@@ -86,14 +86,12 @@ def get_scheduler_policy(opts: Optional[pulumi.InvokeOptions] = None) -> Awaitab
86
86
 
87
87
  ## Example Usage
88
88
 
89
- <!--Start PulumiCodeChooser -->
90
89
  ```python
91
90
  import pulumi
92
91
  import pulumi_nomad as nomad
93
92
 
94
93
  global_ = nomad.get_scheduler_policy()
95
94
  ```
96
- <!--End PulumiCodeChooser -->
97
95
  """
98
96
  __args__ = dict()
99
97
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -113,13 +111,11 @@ def get_scheduler_policy_output(opts: Optional[pulumi.InvokeOptions] = None) ->
113
111
 
114
112
  ## Example Usage
115
113
 
116
- <!--Start PulumiCodeChooser -->
117
114
  ```python
118
115
  import pulumi
119
116
  import pulumi_nomad as nomad
120
117
 
121
118
  global_ = nomad.get_scheduler_policy()
122
119
  ```
123
- <!--End PulumiCodeChooser -->
124
120
  """
125
121
  ...
@@ -86,14 +86,12 @@ def get_variable(namespace: Optional[str] = None,
86
86
  """
87
87
  ## Example Usage
88
88
 
89
- <!--Start PulumiCodeChooser -->
90
89
  ```python
91
90
  import pulumi
92
91
  import pulumi_nomad as nomad
93
92
 
94
93
  example = nomad.Variable("example", path="path/of/existing/variable")
95
94
  ```
96
- <!--End PulumiCodeChooser -->
97
95
 
98
96
 
99
97
  :param str namespace: `(string: "default")` - The namepsace in which the variable exists.
@@ -119,14 +117,12 @@ def get_variable_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
119
117
  """
120
118
  ## Example Usage
121
119
 
122
- <!--Start PulumiCodeChooser -->
123
120
  ```python
124
121
  import pulumi
125
122
  import pulumi_nomad as nomad
126
123
 
127
124
  example = nomad.Variable("example", path="path/of/existing/variable")
128
125
  ```
129
- <!--End PulumiCodeChooser -->
130
126
 
131
127
 
132
128
  :param str namespace: `(string: "default")` - The namepsace in which the variable exists.
@@ -105,14 +105,12 @@ def get_volumes(namespace: Optional[str] = None,
105
105
 
106
106
  ## Example Usage
107
107
 
108
- <!--Start PulumiCodeChooser -->
109
108
  ```python
110
109
  import pulumi
111
110
  import pulumi_nomad as nomad
112
111
 
113
112
  example = nomad.get_volumes()
114
113
  ```
115
- <!--End PulumiCodeChooser -->
116
114
 
117
115
 
118
116
  :param str namespace: `(string: "default")` Nomad namespace.
@@ -148,14 +146,12 @@ def get_volumes_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
148
146
 
149
147
  ## Example Usage
150
148
 
151
- <!--Start PulumiCodeChooser -->
152
149
  ```python
153
150
  import pulumi
154
151
  import pulumi_nomad as nomad
155
152
 
156
153
  example = nomad.get_volumes()
157
154
  ```
158
- <!--End PulumiCodeChooser -->
159
155
 
160
156
 
161
157
  :param str namespace: `(string: "default")` Nomad namespace.
pulumi_nomad/job.py CHANGED
@@ -74,8 +74,8 @@ class JobArgs:
74
74
  if purge_on_destroy is not None:
75
75
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
76
76
  if read_allocation_ids is not None:
77
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
78
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
77
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
78
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
79
79
  if read_allocation_ids is not None:
80
80
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
81
81
  if rerun_if_dead is not None:
@@ -214,8 +214,8 @@ class JobArgs:
214
214
  @property
215
215
  @pulumi.getter(name="readAllocationIds")
216
216
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
217
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
218
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
217
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
218
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
219
219
 
220
220
  return pulumi.get(self, "read_allocation_ids")
221
221
 
@@ -313,8 +313,8 @@ class _JobState:
313
313
  Will fallback to the value declared in Nomad provider configuration, if any.
314
314
  """
315
315
  if allocation_ids is not None:
316
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
317
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
316
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
317
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
318
318
  if allocation_ids is not None:
319
319
  pulumi.set(__self__, "allocation_ids", allocation_ids)
320
320
  if consul_token is not None:
@@ -350,8 +350,8 @@ class _JobState:
350
350
  if purge_on_destroy is not None:
351
351
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
352
352
  if read_allocation_ids is not None:
353
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
354
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
353
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
354
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
355
355
  if read_allocation_ids is not None:
356
356
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
357
357
  if region is not None:
@@ -373,8 +373,8 @@ class _JobState:
373
373
  """
374
374
  The IDs for allocations associated with this job.
375
375
  """
376
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
377
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
376
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
377
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
378
378
 
379
379
  return pulumi.get(self, "allocation_ids")
380
380
 
@@ -585,8 +585,8 @@ class _JobState:
585
585
  @property
586
586
  @pulumi.getter(name="readAllocationIds")
587
587
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
588
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
589
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
588
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
589
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
590
590
 
591
591
  return pulumi.get(self, "read_allocation_ids")
592
592
 
@@ -895,8 +895,8 @@ class Job(pulumi.CustomResource):
895
895
  """
896
896
  The IDs for allocations associated with this job.
897
897
  """
898
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
899
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
898
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
899
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
900
900
 
901
901
  return pulumi.get(self, "allocation_ids")
902
902
 
@@ -1039,8 +1039,8 @@ class Job(pulumi.CustomResource):
1039
1039
  @property
1040
1040
  @pulumi.getter(name="readAllocationIds")
1041
1041
  def read_allocation_ids(self) -> pulumi.Output[Optional[bool]]:
1042
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
1043
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
1042
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
1043
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
1044
1044
 
1045
1045
  return pulumi.get(self, "read_allocation_ids")
1046
1046
 
pulumi_nomad/namespace.py CHANGED
@@ -249,29 +249,28 @@ class Namespace(pulumi.CustomResource):
249
249
 
250
250
  Registering a namespace:
251
251
 
252
- <!--Start PulumiCodeChooser -->
253
252
  ```python
254
253
  import pulumi
255
254
  import pulumi_nomad as nomad
256
255
 
257
256
  dev = nomad.Namespace("dev",
257
+ name="dev",
258
258
  description="Shared development environment.",
259
+ quota="dev",
259
260
  meta={
260
- "foo": "bar",
261
261
  "owner": "John Doe",
262
- },
263
- quota="dev")
262
+ "foo": "bar",
263
+ })
264
264
  ```
265
- <!--End PulumiCodeChooser -->
266
265
 
267
266
  Registering a namespace with a quota:
268
267
 
269
- <!--Start PulumiCodeChooser -->
270
268
  ```python
271
269
  import pulumi
272
270
  import pulumi_nomad as nomad
273
271
 
274
- web_team = nomad.QuoteSpecification("webTeam",
272
+ web_team = nomad.QuoteSpecification("web_team",
273
+ name="web-team",
275
274
  description="web team quota",
276
275
  limits=[nomad.QuoteSpecificationLimitArgs(
277
276
  region="global",
@@ -281,10 +280,10 @@ class Namespace(pulumi.CustomResource):
281
280
  ),
282
281
  )])
283
282
  web = nomad.Namespace("web",
283
+ name="web",
284
284
  description="Web team production environment.",
285
285
  quota=web_team.name)
286
286
  ```
287
- <!--End PulumiCodeChooser -->
288
287
 
289
288
  :param str resource_name: The name of the resource.
290
289
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -314,29 +313,28 @@ class Namespace(pulumi.CustomResource):
314
313
 
315
314
  Registering a namespace:
316
315
 
317
- <!--Start PulumiCodeChooser -->
318
316
  ```python
319
317
  import pulumi
320
318
  import pulumi_nomad as nomad
321
319
 
322
320
  dev = nomad.Namespace("dev",
321
+ name="dev",
323
322
  description="Shared development environment.",
323
+ quota="dev",
324
324
  meta={
325
- "foo": "bar",
326
325
  "owner": "John Doe",
327
- },
328
- quota="dev")
326
+ "foo": "bar",
327
+ })
329
328
  ```
330
- <!--End PulumiCodeChooser -->
331
329
 
332
330
  Registering a namespace with a quota:
333
331
 
334
- <!--Start PulumiCodeChooser -->
335
332
  ```python
336
333
  import pulumi
337
334
  import pulumi_nomad as nomad
338
335
 
339
- web_team = nomad.QuoteSpecification("webTeam",
336
+ web_team = nomad.QuoteSpecification("web_team",
337
+ name="web-team",
340
338
  description="web team quota",
341
339
  limits=[nomad.QuoteSpecificationLimitArgs(
342
340
  region="global",
@@ -346,10 +344,10 @@ class Namespace(pulumi.CustomResource):
346
344
  ),
347
345
  )])
348
346
  web = nomad.Namespace("web",
347
+ name="web",
349
348
  description="Web team production environment.",
350
349
  quota=web_team.name)
351
350
  ```
352
- <!--End PulumiCodeChooser -->
353
351
 
354
352
  :param str resource_name: The name of the resource.
355
353
  :param NamespaceArgs args: The arguments to use to populate this resource's properties.
pulumi_nomad/node_pool.py CHANGED
@@ -178,19 +178,18 @@ class NodePool(pulumi.CustomResource):
178
178
 
179
179
  Registering a node pool:
180
180
 
181
- <!--Start PulumiCodeChooser -->
182
181
  ```python
183
182
  import pulumi
184
183
  import pulumi_nomad as nomad
185
184
 
186
185
  dev = nomad.NodePool("dev",
186
+ name="dev",
187
187
  description="Nodes for the development environment.",
188
188
  meta={
189
189
  "department": "Engineering",
190
190
  "env": "dev",
191
191
  })
192
192
  ```
193
- <!--End PulumiCodeChooser -->
194
193
 
195
194
  :param str resource_name: The name of the resource.
196
195
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -213,19 +212,18 @@ class NodePool(pulumi.CustomResource):
213
212
 
214
213
  Registering a node pool:
215
214
 
216
- <!--Start PulumiCodeChooser -->
217
215
  ```python
218
216
  import pulumi
219
217
  import pulumi_nomad as nomad
220
218
 
221
219
  dev = nomad.NodePool("dev",
220
+ name="dev",
222
221
  description="Nodes for the development environment.",
223
222
  meta={
224
223
  "department": "Engineering",
225
224
  "env": "dev",
226
225
  })
227
226
  ```
228
- <!--End PulumiCodeChooser -->
229
227
 
230
228
  :param str resource_name: The name of the resource.
231
229
  :param NodePoolArgs args: The arguments to use to populate this resource's properties.