pulumi-nomad 2.5.0a1744783739__py3-none-any.whl → 2.5.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 (58) hide show
  1. pulumi_nomad/__init__.py +21 -2
  2. pulumi_nomad/_inputs.py +1151 -475
  3. pulumi_nomad/_utilities.py +1 -1
  4. pulumi_nomad/acl_auth_method.py +108 -108
  5. pulumi_nomad/acl_binding_rule.py +88 -88
  6. pulumi_nomad/acl_policy.py +71 -64
  7. pulumi_nomad/acl_role.py +40 -40
  8. pulumi_nomad/acl_token.py +127 -127
  9. pulumi_nomad/config/__init__.py +2 -2
  10. pulumi_nomad/config/__init__.pyi +2 -13
  11. pulumi_nomad/config/outputs.py +10 -11
  12. pulumi_nomad/config/vars.py +15 -30
  13. pulumi_nomad/csi_volume.py +298 -270
  14. pulumi_nomad/csi_volume_registration.py +278 -278
  15. pulumi_nomad/dynamic_host_volume.py +1005 -0
  16. pulumi_nomad/dynamic_host_volume_registration.py +740 -0
  17. pulumi_nomad/external_volume.py +257 -257
  18. pulumi_nomad/get_acl_policies.py +11 -12
  19. pulumi_nomad/get_acl_policy.py +14 -15
  20. pulumi_nomad/get_acl_role.py +13 -14
  21. pulumi_nomad/get_acl_roles.py +11 -12
  22. pulumi_nomad/get_acl_token.py +27 -28
  23. pulumi_nomad/get_acl_tokens.py +11 -12
  24. pulumi_nomad/get_allocations.py +23 -24
  25. pulumi_nomad/get_datacenters.py +18 -19
  26. pulumi_nomad/get_deployments.py +6 -7
  27. pulumi_nomad/get_dynamic_host_volume.py +352 -0
  28. pulumi_nomad/get_job.py +51 -52
  29. pulumi_nomad/get_job_parser.py +18 -19
  30. pulumi_nomad/get_jwks.py +7 -8
  31. pulumi_nomad/get_namespace.py +18 -19
  32. pulumi_nomad/get_namespaces.py +22 -17
  33. pulumi_nomad/get_node_pool.py +15 -16
  34. pulumi_nomad/get_node_pools.py +17 -18
  35. pulumi_nomad/get_plugin.py +37 -38
  36. pulumi_nomad/get_plugins.py +10 -11
  37. pulumi_nomad/get_regions.py +16 -11
  38. pulumi_nomad/get_scaling_policies.py +17 -18
  39. pulumi_nomad/get_scaling_policy.py +20 -21
  40. pulumi_nomad/get_scheduler_policy.py +10 -11
  41. pulumi_nomad/get_variable.py +18 -19
  42. pulumi_nomad/get_volumes.py +30 -31
  43. pulumi_nomad/job.py +247 -357
  44. pulumi_nomad/namespace.py +77 -77
  45. pulumi_nomad/node_pool.py +57 -57
  46. pulumi_nomad/outputs.py +1212 -635
  47. pulumi_nomad/provider.py +141 -180
  48. pulumi_nomad/pulumi-plugin.json +1 -1
  49. pulumi_nomad/quote_specification.py +40 -40
  50. pulumi_nomad/scheduler_config.py +54 -54
  51. pulumi_nomad/sentinel_policy.py +88 -88
  52. pulumi_nomad/variable.py +54 -54
  53. pulumi_nomad/volume.py +274 -274
  54. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/METADATA +3 -3
  55. pulumi_nomad-2.5.1.dist-info/RECORD +58 -0
  56. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/WHEEL +1 -1
  57. pulumi_nomad-2.5.0a1744783739.dist-info/RECORD +0 -55
  58. {pulumi_nomad-2.5.0a1744783739.dist-info → pulumi_nomad-2.5.1.dist-info}/top_level.txt +0 -0
pulumi_nomad/get_job.py CHANGED
@@ -1,9 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import builtins
6
- import copy
5
+ import builtins as _builtins
7
6
  import warnings
8
7
  import sys
9
8
  import pulumi
@@ -96,86 +95,86 @@ class GetJobResult:
96
95
  raise TypeError("Expected argument 'version' to be a int")
97
96
  pulumi.set(__self__, "version", version)
98
97
 
99
- @property
98
+ @_builtins.property
100
99
  @pulumi.getter(name="allAtOnce")
101
- def all_at_once(self) -> builtins.bool:
100
+ def all_at_once(self) -> _builtins.bool:
102
101
  """
103
102
  `(boolean)` If the scheduler can make partial placements on oversubscribed nodes.
104
103
  """
105
104
  return pulumi.get(self, "all_at_once")
106
105
 
107
- @property
106
+ @_builtins.property
108
107
  @pulumi.getter
109
108
  def constraints(self) -> Sequence['outputs.GetJobConstraintResult']:
110
109
  return pulumi.get(self, "constraints")
111
110
 
112
- @property
111
+ @_builtins.property
113
112
  @pulumi.getter(name="createIndex")
114
- def create_index(self) -> builtins.int:
113
+ def create_index(self) -> _builtins.int:
115
114
  """
116
115
  `(integer)` Creation Index.
117
116
  """
118
117
  return pulumi.get(self, "create_index")
119
118
 
120
- @property
119
+ @_builtins.property
121
120
  @pulumi.getter
122
- def datacenters(self) -> Sequence[builtins.str]:
121
+ def datacenters(self) -> Sequence[_builtins.str]:
123
122
  """
124
123
  `(list of strings)` Datacenters allowed to run the specified job.
125
124
  """
126
125
  return pulumi.get(self, "datacenters")
127
126
 
128
- @property
127
+ @_builtins.property
129
128
  @pulumi.getter
130
- def id(self) -> builtins.str:
129
+ def id(self) -> _builtins.str:
131
130
  """
132
131
  The provider-assigned unique ID for this managed resource.
133
132
  """
134
133
  return pulumi.get(self, "id")
135
134
 
136
- @property
135
+ @_builtins.property
137
136
  @pulumi.getter(name="jobId")
138
- def job_id(self) -> builtins.str:
137
+ def job_id(self) -> _builtins.str:
139
138
  return pulumi.get(self, "job_id")
140
139
 
141
- @property
140
+ @_builtins.property
142
141
  @pulumi.getter(name="jobModifyIndex")
143
- def job_modify_index(self) -> builtins.int:
142
+ def job_modify_index(self) -> _builtins.int:
144
143
  """
145
144
  `(integer)` Job modify index (used for version verification).
146
145
  """
147
146
  return pulumi.get(self, "job_modify_index")
148
147
 
149
- @property
148
+ @_builtins.property
150
149
  @pulumi.getter(name="modifyIndex")
151
- def modify_index(self) -> builtins.int:
150
+ def modify_index(self) -> _builtins.int:
152
151
  """
153
152
  `(integer)` Modification Index.
154
153
  """
155
154
  return pulumi.get(self, "modify_index")
156
155
 
157
- @property
156
+ @_builtins.property
158
157
  @pulumi.getter
159
- def name(self) -> builtins.str:
158
+ def name(self) -> _builtins.str:
160
159
  """
161
160
  `(string)` Name of the job.
162
161
  """
163
162
  return pulumi.get(self, "name")
164
163
 
165
- @property
164
+ @_builtins.property
166
165
  @pulumi.getter
167
- def namespace(self) -> Optional[builtins.str]:
166
+ def namespace(self) -> Optional[_builtins.str]:
168
167
  return pulumi.get(self, "namespace")
169
168
 
170
- @property
169
+ @_builtins.property
171
170
  @pulumi.getter(name="parentId")
172
- def parent_id(self) -> builtins.str:
171
+ def parent_id(self) -> _builtins.str:
173
172
  """
174
173
  `(string)` Job's parent ID.
175
174
  """
176
175
  return pulumi.get(self, "parent_id")
177
176
 
178
- @property
177
+ @_builtins.property
179
178
  @pulumi.getter(name="periodicConfigs")
180
179
  def periodic_configs(self) -> Sequence['outputs.GetJobPeriodicConfigResult']:
181
180
  """
@@ -183,63 +182,63 @@ class GetJobResult:
183
182
  """
184
183
  return pulumi.get(self, "periodic_configs")
185
184
 
186
- @property
185
+ @_builtins.property
187
186
  @pulumi.getter
188
- def priority(self) -> builtins.int:
187
+ def priority(self) -> _builtins.int:
189
188
  """
190
189
  `(integer)` Used for the prioritization of scheduling and resource access.
191
190
  """
192
191
  return pulumi.get(self, "priority")
193
192
 
194
- @property
193
+ @_builtins.property
195
194
  @pulumi.getter
196
- def region(self) -> builtins.str:
195
+ def region(self) -> _builtins.str:
197
196
  """
198
197
  `(string)` Region where the Nomad cluster resides.
199
198
  """
200
199
  return pulumi.get(self, "region")
201
200
 
202
- @property
201
+ @_builtins.property
203
202
  @pulumi.getter
204
- def stable(self) -> builtins.bool:
203
+ def stable(self) -> _builtins.bool:
205
204
  """
206
205
  `(boolean)` Job stability status.
207
206
  """
208
207
  return pulumi.get(self, "stable")
209
208
 
210
- @property
209
+ @_builtins.property
211
210
  @pulumi.getter
212
- def status(self) -> builtins.str:
211
+ def status(self) -> _builtins.str:
213
212
  """
214
213
  `(string)` Execution status of the specified job.
215
214
  """
216
215
  return pulumi.get(self, "status")
217
216
 
218
- @property
217
+ @_builtins.property
219
218
  @pulumi.getter(name="statusDescription")
220
- def status_description(self) -> builtins.str:
219
+ def status_description(self) -> _builtins.str:
221
220
  """
222
221
  `(string)` Status description of the specified job.
223
222
  """
224
223
  return pulumi.get(self, "status_description")
225
224
 
226
- @property
225
+ @_builtins.property
227
226
  @pulumi.getter
228
- def stop(self) -> builtins.bool:
227
+ def stop(self) -> _builtins.bool:
229
228
  """
230
229
  `(boolean)` Job enabled status.
231
230
  """
232
231
  return pulumi.get(self, "stop")
233
232
 
234
- @property
233
+ @_builtins.property
235
234
  @pulumi.getter(name="submitTime")
236
- def submit_time(self) -> builtins.int:
235
+ def submit_time(self) -> _builtins.int:
237
236
  """
238
237
  `(integer)` Job submission date.
239
238
  """
240
239
  return pulumi.get(self, "submit_time")
241
240
 
242
- @property
241
+ @_builtins.property
243
242
  @pulumi.getter(name="taskGroups")
244
243
  def task_groups(self) -> Sequence['outputs.GetJobTaskGroupResult']:
245
244
  """
@@ -247,17 +246,17 @@ class GetJobResult:
247
246
  """
248
247
  return pulumi.get(self, "task_groups")
249
248
 
250
- @property
249
+ @_builtins.property
251
250
  @pulumi.getter
252
- def type(self) -> builtins.str:
251
+ def type(self) -> _builtins.str:
253
252
  """
254
253
  `(string)` Scheduler type used during job creation.
255
254
  """
256
255
  return pulumi.get(self, "type")
257
256
 
258
- @property
257
+ @_builtins.property
259
258
  @pulumi.getter
260
- def version(self) -> builtins.int:
259
+ def version(self) -> _builtins.int:
261
260
  """
262
261
  `(integer)` Version of the specified job.
263
262
  """
@@ -294,8 +293,8 @@ class AwaitableGetJobResult(GetJobResult):
294
293
  version=self.version)
295
294
 
296
295
 
297
- def get_job(job_id: Optional[builtins.str] = None,
298
- namespace: Optional[builtins.str] = None,
296
+ def get_job(job_id: Optional[_builtins.str] = None,
297
+ namespace: Optional[_builtins.str] = None,
299
298
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJobResult:
300
299
  """
301
300
  Get information on a job ID. The aim of this datasource is to enable
@@ -316,8 +315,8 @@ def get_job(job_id: Optional[builtins.str] = None,
316
315
  ```
317
316
 
318
317
 
319
- :param builtins.str job_id: `(string)` ID of the job.
320
- :param builtins.str namespace: `(string)` Namespace of the specified job.
318
+ :param _builtins.str job_id: `(string)` ID of the job.
319
+ :param _builtins.str namespace: `(string)` Namespace of the specified job.
321
320
  """
322
321
  __args__ = dict()
323
322
  __args__['jobId'] = job_id
@@ -348,8 +347,8 @@ def get_job(job_id: Optional[builtins.str] = None,
348
347
  task_groups=pulumi.get(__ret__, 'task_groups'),
349
348
  type=pulumi.get(__ret__, 'type'),
350
349
  version=pulumi.get(__ret__, 'version'))
351
- def get_job_output(job_id: Optional[pulumi.Input[builtins.str]] = None,
352
- namespace: Optional[pulumi.Input[Optional[builtins.str]]] = None,
350
+ def get_job_output(job_id: Optional[pulumi.Input[_builtins.str]] = None,
351
+ namespace: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
353
352
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetJobResult]:
354
353
  """
355
354
  Get information on a job ID. The aim of this datasource is to enable
@@ -370,8 +369,8 @@ def get_job_output(job_id: Optional[pulumi.Input[builtins.str]] = None,
370
369
  ```
371
370
 
372
371
 
373
- :param builtins.str job_id: `(string)` ID of the job.
374
- :param builtins.str namespace: `(string)` Namespace of the specified job.
372
+ :param _builtins.str job_id: `(string)` ID of the job.
373
+ :param _builtins.str namespace: `(string)` Namespace of the specified job.
375
374
  """
376
375
  __args__ = dict()
377
376
  __args__['jobId'] = job_id
@@ -1,9 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import builtins
6
- import copy
5
+ import builtins as _builtins
7
6
  import warnings
8
7
  import sys
9
8
  import pulumi
@@ -41,33 +40,33 @@ class GetJobParserResult:
41
40
  raise TypeError("Expected argument 'json' to be a str")
42
41
  pulumi.set(__self__, "json", json)
43
42
 
44
- @property
43
+ @_builtins.property
45
44
  @pulumi.getter
46
- def canonicalize(self) -> Optional[builtins.bool]:
45
+ def canonicalize(self) -> Optional[_builtins.bool]:
47
46
  """
48
47
  `(boolean: true)` - flag to enable setting any unset fields to their default values.
49
48
  """
50
49
  return pulumi.get(self, "canonicalize")
51
50
 
52
- @property
51
+ @_builtins.property
53
52
  @pulumi.getter
54
- def hcl(self) -> builtins.str:
53
+ def hcl(self) -> _builtins.str:
55
54
  """
56
55
  `(string)` - the HCL definition of the job.
57
56
  """
58
57
  return pulumi.get(self, "hcl")
59
58
 
60
- @property
59
+ @_builtins.property
61
60
  @pulumi.getter
62
- def id(self) -> builtins.str:
61
+ def id(self) -> _builtins.str:
63
62
  """
64
63
  The provider-assigned unique ID for this managed resource.
65
64
  """
66
65
  return pulumi.get(self, "id")
67
66
 
68
- @property
67
+ @_builtins.property
69
68
  @pulumi.getter
70
- def json(self) -> builtins.str:
69
+ def json(self) -> _builtins.str:
71
70
  """
72
71
  `(string)` - the parsed job as JSON string.
73
72
  """
@@ -86,15 +85,15 @@ class AwaitableGetJobParserResult(GetJobParserResult):
86
85
  json=self.json)
87
86
 
88
87
 
89
- def get_job_parser(canonicalize: Optional[builtins.bool] = None,
90
- hcl: Optional[builtins.str] = None,
88
+ def get_job_parser(canonicalize: Optional[_builtins.bool] = None,
89
+ hcl: Optional[_builtins.str] = None,
91
90
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJobParserResult:
92
91
  """
93
92
  Parse a HCL jobspec and produce the equivalent JSON encoded job.
94
93
 
95
94
 
96
- :param builtins.bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
97
- :param builtins.str hcl: `(string)` - the HCL definition of the job.
95
+ :param _builtins.bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
96
+ :param _builtins.str hcl: `(string)` - the HCL definition of the job.
98
97
  """
99
98
  __args__ = dict()
100
99
  __args__['canonicalize'] = canonicalize
@@ -107,15 +106,15 @@ def get_job_parser(canonicalize: Optional[builtins.bool] = None,
107
106
  hcl=pulumi.get(__ret__, 'hcl'),
108
107
  id=pulumi.get(__ret__, 'id'),
109
108
  json=pulumi.get(__ret__, 'json'))
110
- def get_job_parser_output(canonicalize: Optional[pulumi.Input[Optional[builtins.bool]]] = None,
111
- hcl: Optional[pulumi.Input[builtins.str]] = None,
109
+ def get_job_parser_output(canonicalize: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
110
+ hcl: Optional[pulumi.Input[_builtins.str]] = None,
112
111
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetJobParserResult]:
113
112
  """
114
113
  Parse a HCL jobspec and produce the equivalent JSON encoded job.
115
114
 
116
115
 
117
- :param builtins.bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
118
- :param builtins.str hcl: `(string)` - the HCL definition of the job.
116
+ :param _builtins.bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
117
+ :param _builtins.str hcl: `(string)` - the HCL definition of the job.
119
118
  """
120
119
  __args__ = dict()
121
120
  __args__['canonicalize'] = canonicalize
pulumi_nomad/get_jwks.py CHANGED
@@ -1,9 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import builtins
6
- import copy
5
+ import builtins as _builtins
7
6
  import warnings
8
7
  import sys
9
8
  import pulumi
@@ -39,15 +38,15 @@ class GetJwksResult:
39
38
  raise TypeError("Expected argument 'pem_keys' to be a list")
40
39
  pulumi.set(__self__, "pem_keys", pem_keys)
41
40
 
42
- @property
41
+ @_builtins.property
43
42
  @pulumi.getter
44
- def id(self) -> builtins.str:
43
+ def id(self) -> _builtins.str:
45
44
  """
46
45
  The provider-assigned unique ID for this managed resource.
47
46
  """
48
47
  return pulumi.get(self, "id")
49
48
 
50
- @property
49
+ @_builtins.property
51
50
  @pulumi.getter
52
51
  def keys(self) -> Sequence['outputs.GetJwksKeyResult']:
53
52
  """
@@ -56,9 +55,9 @@ class GetJwksResult:
56
55
  """
57
56
  return pulumi.get(self, "keys")
58
57
 
59
- @property
58
+ @_builtins.property
60
59
  @pulumi.getter(name="pemKeys")
61
- def pem_keys(self) -> Sequence[builtins.str]:
60
+ def pem_keys(self) -> Sequence[_builtins.str]:
62
61
  """
63
62
  `list of strings` a list JWK keys rendered as PEM-encoded X.509 keys
64
63
  """
@@ -1,9 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import builtins
6
- import copy
5
+ import builtins as _builtins
7
6
  import warnings
8
7
  import sys
9
8
  import pulumi
@@ -51,7 +50,7 @@ class GetNamespaceResult:
51
50
  raise TypeError("Expected argument 'quota' to be a str")
52
51
  pulumi.set(__self__, "quota", quota)
53
52
 
54
- @property
53
+ @_builtins.property
55
54
  @pulumi.getter
56
55
  def capabilities(self) -> Sequence['outputs.GetNamespaceCapabilityResult']:
57
56
  """
@@ -59,43 +58,43 @@ class GetNamespaceResult:
59
58
  """
60
59
  return pulumi.get(self, "capabilities")
61
60
 
62
- @property
61
+ @_builtins.property
63
62
  @pulumi.getter
64
- def description(self) -> builtins.str:
63
+ def description(self) -> _builtins.str:
65
64
  """
66
65
  `(string)` - The description of the namespace.
67
66
  """
68
67
  return pulumi.get(self, "description")
69
68
 
70
- @property
69
+ @_builtins.property
71
70
  @pulumi.getter
72
- def id(self) -> builtins.str:
71
+ def id(self) -> _builtins.str:
73
72
  """
74
73
  The provider-assigned unique ID for this managed resource.
75
74
  """
76
75
  return pulumi.get(self, "id")
77
76
 
78
- @property
77
+ @_builtins.property
79
78
  @pulumi.getter
80
- def meta(self) -> Mapping[str, builtins.str]:
79
+ def meta(self) -> Mapping[str, _builtins.str]:
81
80
  """
82
81
  `(map[string]string)` - Arbitrary KV metadata associated with the namespace.
83
82
  """
84
83
  return pulumi.get(self, "meta")
85
84
 
86
- @property
85
+ @_builtins.property
87
86
  @pulumi.getter
88
- def name(self) -> builtins.str:
87
+ def name(self) -> _builtins.str:
89
88
  return pulumi.get(self, "name")
90
89
 
91
- @property
90
+ @_builtins.property
92
91
  @pulumi.getter(name="nodePoolConfigs")
93
92
  def node_pool_configs(self) -> Sequence['outputs.GetNamespaceNodePoolConfigResult']:
94
93
  return pulumi.get(self, "node_pool_configs")
95
94
 
96
- @property
95
+ @_builtins.property
97
96
  @pulumi.getter
98
- def quota(self) -> builtins.str:
97
+ def quota(self) -> _builtins.str:
99
98
  """
100
99
  `(string)` - The quota associated with the namespace.
101
100
  """
@@ -117,7 +116,7 @@ class AwaitableGetNamespaceResult(GetNamespaceResult):
117
116
  quota=self.quota)
118
117
 
119
118
 
120
- def get_namespace(name: Optional[builtins.str] = None,
119
+ def get_namespace(name: Optional[_builtins.str] = None,
121
120
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNamespaceResult:
122
121
  """
123
122
  Get information about a namespace in Nomad.
@@ -132,7 +131,7 @@ def get_namespace(name: Optional[builtins.str] = None,
132
131
  ```
133
132
 
134
133
 
135
- :param builtins.str name: `(string)` - The name of the namespace.
134
+ :param _builtins.str name: `(string)` - The name of the namespace.
136
135
  """
137
136
  __args__ = dict()
138
137
  __args__['name'] = name
@@ -147,7 +146,7 @@ def get_namespace(name: Optional[builtins.str] = None,
147
146
  name=pulumi.get(__ret__, 'name'),
148
147
  node_pool_configs=pulumi.get(__ret__, 'node_pool_configs'),
149
148
  quota=pulumi.get(__ret__, 'quota'))
150
- def get_namespace_output(name: Optional[pulumi.Input[builtins.str]] = None,
149
+ def get_namespace_output(name: Optional[pulumi.Input[_builtins.str]] = None,
151
150
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNamespaceResult]:
152
151
  """
153
152
  Get information about a namespace in Nomad.
@@ -162,7 +161,7 @@ def get_namespace_output(name: Optional[pulumi.Input[builtins.str]] = None,
162
161
  ```
163
162
 
164
163
 
165
- :param builtins.str name: `(string)` - The name of the namespace.
164
+ :param _builtins.str name: `(string)` - The name of the namespace.
166
165
  """
167
166
  __args__ = dict()
168
167
  __args__['name'] = name
@@ -1,9 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import builtins
6
- import copy
5
+ import builtins as _builtins
7
6
  import warnings
8
7
  import sys
9
8
  import pulumi
@@ -35,17 +34,17 @@ class GetNamespacesResult:
35
34
  raise TypeError("Expected argument 'namespaces' to be a list")
36
35
  pulumi.set(__self__, "namespaces", namespaces)
37
36
 
38
- @property
37
+ @_builtins.property
39
38
  @pulumi.getter
40
- def id(self) -> builtins.str:
39
+ def id(self) -> _builtins.str:
41
40
  """
42
41
  The provider-assigned unique ID for this managed resource.
43
42
  """
44
43
  return pulumi.get(self, "id")
45
44
 
46
- @property
45
+ @_builtins.property
47
46
  @pulumi.getter
48
- def namespaces(self) -> Sequence[builtins.str]:
47
+ def namespaces(self) -> Sequence[_builtins.str]:
49
48
  """
50
49
  `(list of strings)` - a list of namespaces available in the cluster.
51
50
  """
@@ -74,14 +73,17 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
74
73
 
75
74
  namespaces = nomad.get_namespaces()
76
75
  namespace = []
77
- for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
78
- namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
79
- name=f"namespace-{namespaces[range['value']]}",
80
- description=f"Write to the namespace {namespaces[range['value']]}",
81
- rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
76
+ def create_namespace(range_body):
77
+ for range in [{"value": i} for i in range(0, range_body)]:
78
+ namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
79
+ name=f"namespace-{namespaces[range['value']]}",
80
+ description=f"Write to the namespace {namespaces[range['value']]}",
81
+ rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
82
82
  policy = "write"
83
83
  }}
84
84
  \"\"\"))
85
+
86
+ (len(namespaces.namespaces)).apply(create_namespace)
85
87
  ```
86
88
  """
87
89
  __args__ = dict()
@@ -103,14 +105,17 @@ def get_namespaces_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.Invo
103
105
 
104
106
  namespaces = nomad.get_namespaces()
105
107
  namespace = []
106
- for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
107
- namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
108
- name=f"namespace-{namespaces[range['value']]}",
109
- description=f"Write to the namespace {namespaces[range['value']]}",
110
- rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
108
+ def create_namespace(range_body):
109
+ for range in [{"value": i} for i in range(0, range_body)]:
110
+ namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
111
+ name=f"namespace-{namespaces[range['value']]}",
112
+ description=f"Write to the namespace {namespaces[range['value']]}",
113
+ rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
111
114
  policy = "write"
112
115
  }}
113
116
  \"\"\"))
117
+
118
+ (len(namespaces.namespaces)).apply(create_namespace)
114
119
  ```
115
120
  """
116
121
  __args__ = dict()