pulumi-consul 3.11.1__py3-none-any.whl → 3.11.3__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 (49) hide show
  1. pulumi_consul/_inputs.py +62 -26
  2. pulumi_consul/_utilities.py +2 -2
  3. pulumi_consul/acl_auth_method.py +4 -0
  4. pulumi_consul/acl_binding_rule.py +2 -0
  5. pulumi_consul/acl_policy.py +4 -4
  6. pulumi_consul/acl_role.py +13 -13
  7. pulumi_consul/acl_role_policy_attachment.py +10 -8
  8. pulumi_consul/acl_token.py +18 -14
  9. pulumi_consul/acl_token_policy_attachment.py +10 -6
  10. pulumi_consul/acl_token_role_attachment.py +6 -4
  11. pulumi_consul/admin_partition.py +8 -4
  12. pulumi_consul/agent_service.py +2 -0
  13. pulumi_consul/catalog_entry.py +0 -42
  14. pulumi_consul/certificate_authority.py +2 -28
  15. pulumi_consul/config/outputs.py +24 -0
  16. pulumi_consul/config_entry.py +76 -32
  17. pulumi_consul/config_entry_service_defaults.py +23 -23
  18. pulumi_consul/config_entry_service_intentions.py +27 -27
  19. pulumi_consul/config_entry_service_resolver.py +57 -59
  20. pulumi_consul/config_entry_service_router.py +21 -61
  21. pulumi_consul/config_entry_service_splitter.py +24 -22
  22. pulumi_consul/get_acl_role.py +2 -0
  23. pulumi_consul/get_acl_token_secret_id.py +8 -6
  24. pulumi_consul/get_catalog_service.py +30 -4
  25. pulumi_consul/get_catalog_services.py +32 -0
  26. pulumi_consul/get_key_prefix.py +18 -18
  27. pulumi_consul/get_keys.py +4 -6
  28. pulumi_consul/get_network_area_members.py +6 -6
  29. pulumi_consul/get_network_segments.py +4 -4
  30. pulumi_consul/get_service.py +30 -4
  31. pulumi_consul/get_services.py +32 -0
  32. pulumi_consul/intention.py +12 -12
  33. pulumi_consul/key_prefix.py +32 -30
  34. pulumi_consul/keys.py +6 -6
  35. pulumi_consul/license.py +4 -2
  36. pulumi_consul/namespace.py +8 -4
  37. pulumi_consul/namespace_policy_attachment.py +6 -4
  38. pulumi_consul/namespace_role_attachment.py +6 -4
  39. pulumi_consul/node.py +8 -4
  40. pulumi_consul/outputs.py +126 -24
  41. pulumi_consul/peering.py +8 -18
  42. pulumi_consul/prepared_query.py +65 -61
  43. pulumi_consul/pulumi-plugin.json +2 -1
  44. pulumi_consul/service.py +133 -7
  45. {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/METADATA +2 -2
  46. pulumi_consul-3.11.3.dist-info/RECORD +70 -0
  47. {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/WHEEL +1 -1
  48. pulumi_consul-3.11.1.dist-info/RECORD +0 -70
  49. {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/top_level.txt +0 -0
@@ -346,9 +346,9 @@ class Intention(pulumi.CustomResource):
346
346
  import pulumi_consul as consul
347
347
 
348
348
  database = consul.Intention("database",
349
- action="allow",
349
+ source_name="api",
350
350
  destination_name="db",
351
- source_name="api")
351
+ action="allow")
352
352
  ```
353
353
 
354
354
  Referencing a known service via a datasource:
@@ -358,9 +358,9 @@ class Intention(pulumi.CustomResource):
358
358
  import pulumi_consul as consul
359
359
 
360
360
  database = consul.Intention("database",
361
- action="allow",
362
- destination_name=consul_service["pg"]["name"],
363
- source_name="api")
361
+ source_name="api",
362
+ destination_name=pg_consul_service["name"],
363
+ action="allow")
364
364
  pg = consul.get_service(name="postgresql")
365
365
  ```
366
366
 
@@ -369,7 +369,7 @@ class Intention(pulumi.CustomResource):
369
369
  `consul_intention` can be imported:
370
370
 
371
371
  ```sh
372
- $ pulumi import consul:index/intention:Intention database 657a57d6-0d56-57e2-31cb-e9f1ed3c18dd
372
+ $ pulumi import consul:index/intention:Intention database 657a57d6-0d56-57e2-31cb-e9f1ed3c18dd
373
373
  ```
374
374
 
375
375
  :param str resource_name: The name of the resource.
@@ -420,9 +420,9 @@ class Intention(pulumi.CustomResource):
420
420
  import pulumi_consul as consul
421
421
 
422
422
  database = consul.Intention("database",
423
- action="allow",
423
+ source_name="api",
424
424
  destination_name="db",
425
- source_name="api")
425
+ action="allow")
426
426
  ```
427
427
 
428
428
  Referencing a known service via a datasource:
@@ -432,9 +432,9 @@ class Intention(pulumi.CustomResource):
432
432
  import pulumi_consul as consul
433
433
 
434
434
  database = consul.Intention("database",
435
- action="allow",
436
- destination_name=consul_service["pg"]["name"],
437
- source_name="api")
435
+ source_name="api",
436
+ destination_name=pg_consul_service["name"],
437
+ action="allow")
438
438
  pg = consul.get_service(name="postgresql")
439
439
  ```
440
440
 
@@ -443,7 +443,7 @@ class Intention(pulumi.CustomResource):
443
443
  `consul_intention` can be imported:
444
444
 
445
445
  ```sh
446
- $ pulumi import consul:index/intention:Intention database 657a57d6-0d56-57e2-31cb-e9f1ed3c18dd
446
+ $ pulumi import consul:index/intention:Intention database 657a57d6-0d56-57e2-31cb-e9f1ed3c18dd
447
447
  ```
448
448
 
449
449
  :param str resource_name: The name of the resource.
@@ -324,31 +324,32 @@ class KeyPrefix(pulumi.CustomResource):
324
324
  import pulumi
325
325
  import pulumi_consul as consul
326
326
 
327
- myapp_config = consul.KeyPrefix("myappConfig",
327
+ myapp_config = consul.KeyPrefix("myapp_config",
328
328
  datacenter="nyc1",
329
+ token="abcd",
329
330
  path_prefix="myapp/config/",
330
- subkey_collection=[consul.KeyPrefixSubkeyCollectionArgs(
331
- flags=2,
332
- path="database/password",
333
- value=aws_db_instance["app"]["password"],
334
- )],
335
331
  subkeys={
336
- "database/hostname": aws_db_instance["app"]["address"],
337
- "database/name": aws_db_instance["app"]["name"],
338
- "database/port": aws_db_instance["app"]["port"],
339
- "database/username": aws_db_instance["app"]["username"],
340
- "elb_cname": aws_elb["app"]["dns_name"],
341
- "s3_bucket_name": aws_s3_bucket["app"]["bucket"],
332
+ "elb_cname": app_aws_elb["dnsName"],
333
+ "s3_bucket_name": app_aws_s3_bucket["bucket"],
334
+ "database/hostname": app["address"],
335
+ "database/port": app["port"],
336
+ "database/username": app["username"],
337
+ "database/name": app["name"],
342
338
  },
343
- token="abcd")
339
+ subkey_collection=[consul.KeyPrefixSubkeyCollectionArgs(
340
+ path="database/password",
341
+ value=app["password"],
342
+ flags=2,
343
+ )])
344
344
  ```
345
345
 
346
346
  ## Import
347
347
 
348
- `consul_key_prefix` can be imported. This is useful when the path already exists and you know all keys in path should be managed by Terraform.
348
+ `consul_key_prefix` can be imported. This is useful when the path already exists and
349
+ you know all keys in path should be managed by Terraform.
349
350
 
350
351
  ```sh
351
- $ pulumi import consul:index/keyPrefix:KeyPrefix myapp_config myapp/config/
352
+ $ pulumi import consul:index/keyPrefix:KeyPrefix myapp_config myapp/config/
352
353
  ```
353
354
 
354
355
  :param str resource_name: The name of the resource.
@@ -382,31 +383,32 @@ class KeyPrefix(pulumi.CustomResource):
382
383
  import pulumi
383
384
  import pulumi_consul as consul
384
385
 
385
- myapp_config = consul.KeyPrefix("myappConfig",
386
+ myapp_config = consul.KeyPrefix("myapp_config",
386
387
  datacenter="nyc1",
388
+ token="abcd",
387
389
  path_prefix="myapp/config/",
388
- subkey_collection=[consul.KeyPrefixSubkeyCollectionArgs(
389
- flags=2,
390
- path="database/password",
391
- value=aws_db_instance["app"]["password"],
392
- )],
393
390
  subkeys={
394
- "database/hostname": aws_db_instance["app"]["address"],
395
- "database/name": aws_db_instance["app"]["name"],
396
- "database/port": aws_db_instance["app"]["port"],
397
- "database/username": aws_db_instance["app"]["username"],
398
- "elb_cname": aws_elb["app"]["dns_name"],
399
- "s3_bucket_name": aws_s3_bucket["app"]["bucket"],
391
+ "elb_cname": app_aws_elb["dnsName"],
392
+ "s3_bucket_name": app_aws_s3_bucket["bucket"],
393
+ "database/hostname": app["address"],
394
+ "database/port": app["port"],
395
+ "database/username": app["username"],
396
+ "database/name": app["name"],
400
397
  },
401
- token="abcd")
398
+ subkey_collection=[consul.KeyPrefixSubkeyCollectionArgs(
399
+ path="database/password",
400
+ value=app["password"],
401
+ flags=2,
402
+ )])
402
403
  ```
403
404
 
404
405
  ## Import
405
406
 
406
- `consul_key_prefix` can be imported. This is useful when the path already exists and you know all keys in path should be managed by Terraform.
407
+ `consul_key_prefix` can be imported. This is useful when the path already exists and
408
+ you know all keys in path should be managed by Terraform.
407
409
 
408
410
  ```sh
409
- $ pulumi import consul:index/keyPrefix:KeyPrefix myapp_config myapp/config/
411
+ $ pulumi import consul:index/keyPrefix:KeyPrefix myapp_config myapp/config/
410
412
  ```
411
413
 
412
414
  :param str resource_name: The name of the resource.
pulumi_consul/keys.py CHANGED
@@ -253,11 +253,11 @@ class Keys(pulumi.CustomResource):
253
253
 
254
254
  app = consul.Keys("app",
255
255
  datacenter="nyc1",
256
+ token="abcd",
256
257
  keys=[consul.KeysKeyArgs(
257
258
  path="service/app/elb_address",
258
- value=aws_elb["app"]["dns_name"],
259
- )],
260
- token="abcd")
259
+ value=app_aws_elb["dnsName"],
260
+ )])
261
261
  ```
262
262
 
263
263
  :param str resource_name: The name of the resource.
@@ -286,11 +286,11 @@ class Keys(pulumi.CustomResource):
286
286
 
287
287
  app = consul.Keys("app",
288
288
  datacenter="nyc1",
289
+ token="abcd",
289
290
  keys=[consul.KeysKeyArgs(
290
291
  path="service/app/elb_address",
291
- value=aws_elb["app"]["dns_name"],
292
- )],
293
- token="abcd")
292
+ value=app_aws_elb["dnsName"],
293
+ )])
294
294
  ```
295
295
 
296
296
  :param str resource_name: The name of the resource.
pulumi_consul/license.py CHANGED
@@ -274,8 +274,9 @@ class License(pulumi.CustomResource):
274
274
  ```python
275
275
  import pulumi
276
276
  import pulumi_consul as consul
277
+ import pulumi_std as std
277
278
 
278
- license = consul.License("license", license=(lambda path: open(path).read())("license.hclic"))
279
+ license = consul.License("license", license=std.file(input="license.hclic").result)
279
280
  ```
280
281
 
281
282
  :param str resource_name: The name of the resource.
@@ -302,8 +303,9 @@ class License(pulumi.CustomResource):
302
303
  ```python
303
304
  import pulumi
304
305
  import pulumi_consul as consul
306
+ import pulumi_std as std
305
307
 
306
- license = consul.License("license", license=(lambda path: open(path).read())("license.hclic"))
308
+ license = consul.License("license", license=std.file(input="license.hclic").result)
307
309
  ```
308
310
 
309
311
  :param str resource_name: The name of the resource.
@@ -243,6 +243,7 @@ class Namespace(pulumi.CustomResource):
243
243
  import pulumi_consul as consul
244
244
 
245
245
  production = consul.Namespace("production",
246
+ name="production",
246
247
  description="Production namespace",
247
248
  meta={
248
249
  "foo": "bar",
@@ -251,10 +252,11 @@ class Namespace(pulumi.CustomResource):
251
252
 
252
253
  ## Import
253
254
 
254
- `consul_namespace` can be imported. This is useful to manage attributes of the default namespace that is created automatically:
255
+ `consul_namespace` can be imported. This is useful to manage attributes of the
256
+ default namespace that is created automatically:
255
257
 
256
258
  ```sh
257
- $ pulumi import consul:index/namespace:Namespace default default
259
+ $ pulumi import consul:index/namespace:Namespace default default
258
260
  ```
259
261
 
260
262
  :param str resource_name: The name of the resource.
@@ -284,6 +286,7 @@ class Namespace(pulumi.CustomResource):
284
286
  import pulumi_consul as consul
285
287
 
286
288
  production = consul.Namespace("production",
289
+ name="production",
287
290
  description="Production namespace",
288
291
  meta={
289
292
  "foo": "bar",
@@ -292,10 +295,11 @@ class Namespace(pulumi.CustomResource):
292
295
 
293
296
  ## Import
294
297
 
295
- `consul_namespace` can be imported. This is useful to manage attributes of the default namespace that is created automatically:
298
+ `consul_namespace` can be imported. This is useful to manage attributes of the
299
+ default namespace that is created automatically:
296
300
 
297
301
  ```sh
298
- $ pulumi import consul:index/namespace:Namespace default default
302
+ $ pulumi import consul:index/namespace:Namespace default default
299
303
  ```
300
304
 
301
305
  :param str resource_name: The name of the resource.
@@ -100,10 +100,11 @@ class NamespacePolicyAttachment(pulumi.CustomResource):
100
100
  """
101
101
  ## Import
102
102
 
103
- `consul_namespace_policy_attachment` can be imported. This is especially useful to manage the policies attached to the `default` namespace:
103
+ `consul_namespace_policy_attachment` can be imported. This is especially useful
104
+ to manage the policies attached to the `default` namespace:
104
105
 
105
106
  ```sh
106
- $ pulumi import consul:index/namespacePolicyAttachment:NamespacePolicyAttachment default default:policy_name
107
+ $ pulumi import consul:index/namespacePolicyAttachment:NamespacePolicyAttachment default default:policy_name
107
108
  ```
108
109
 
109
110
  :param str resource_name: The name of the resource.
@@ -120,10 +121,11 @@ class NamespacePolicyAttachment(pulumi.CustomResource):
120
121
  """
121
122
  ## Import
122
123
 
123
- `consul_namespace_policy_attachment` can be imported. This is especially useful to manage the policies attached to the `default` namespace:
124
+ `consul_namespace_policy_attachment` can be imported. This is especially useful
125
+ to manage the policies attached to the `default` namespace:
124
126
 
125
127
  ```sh
126
- $ pulumi import consul:index/namespacePolicyAttachment:NamespacePolicyAttachment default default:policy_name
128
+ $ pulumi import consul:index/namespacePolicyAttachment:NamespacePolicyAttachment default default:policy_name
127
129
  ```
128
130
 
129
131
  :param str resource_name: The name of the resource.
@@ -100,10 +100,11 @@ class NamespaceRoleAttachment(pulumi.CustomResource):
100
100
  """
101
101
  ## Import
102
102
 
103
- `consul_namespace_role_attachment` can be imported. This is especially useful to manage the policies attached to the `default` namespace:
103
+ `consul_namespace_role_attachment` can be imported. This is especially useful
104
+ to manage the policies attached to the `default` namespace:
104
105
 
105
106
  ```sh
106
- $ pulumi import consul:index/namespaceRoleAttachment:NamespaceRoleAttachment default default:role_name
107
+ $ pulumi import consul:index/namespaceRoleAttachment:NamespaceRoleAttachment default default:role_name
107
108
  ```
108
109
 
109
110
  :param str resource_name: The name of the resource.
@@ -120,10 +121,11 @@ class NamespaceRoleAttachment(pulumi.CustomResource):
120
121
  """
121
122
  ## Import
122
123
 
123
- `consul_namespace_role_attachment` can be imported. This is especially useful to manage the policies attached to the `default` namespace:
124
+ `consul_namespace_role_attachment` can be imported. This is especially useful
125
+ to manage the policies attached to the `default` namespace:
124
126
 
125
127
  ```sh
126
- $ pulumi import consul:index/namespaceRoleAttachment:NamespaceRoleAttachment default default:role_name
128
+ $ pulumi import consul:index/namespaceRoleAttachment:NamespaceRoleAttachment default default:role_name
127
129
  ```
128
130
 
129
131
  :param str resource_name: The name of the resource.
pulumi_consul/node.py CHANGED
@@ -252,7 +252,9 @@ class Node(pulumi.CustomResource):
252
252
  import pulumi
253
253
  import pulumi_consul as consul
254
254
 
255
- foobar = consul.Node("foobar", address="192.168.10.10")
255
+ foobar = consul.Node("foobar",
256
+ address="192.168.10.10",
257
+ name="foobar")
256
258
  ```
257
259
 
258
260
  ## Import
@@ -260,7 +262,7 @@ class Node(pulumi.CustomResource):
260
262
  The `consul_node` resource can be imported:
261
263
 
262
264
  ```sh
263
- $ pulumi import consul:index/node:Node example node-name
265
+ $ pulumi import consul:index/node:Node example node-name
264
266
  ```
265
267
 
266
268
  :param str resource_name: The name of the resource.
@@ -287,7 +289,9 @@ class Node(pulumi.CustomResource):
287
289
  import pulumi
288
290
  import pulumi_consul as consul
289
291
 
290
- foobar = consul.Node("foobar", address="192.168.10.10")
292
+ foobar = consul.Node("foobar",
293
+ address="192.168.10.10",
294
+ name="foobar")
291
295
  ```
292
296
 
293
297
  ## Import
@@ -295,7 +299,7 @@ class Node(pulumi.CustomResource):
295
299
  The `consul_node` resource can be imported:
296
300
 
297
301
  ```sh
298
- $ pulumi import consul:index/node:Node example node-name
302
+ $ pulumi import consul:index/node:Node example node-name
299
303
  ```
300
304
 
301
305
  :param str resource_name: The name of the resource.