pulumi-consul 3.12.0a1713331566__py3-none-any.whl → 3.12.0a1713461993__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.

Potentially problematic release.


This version of pulumi-consul might be problematic. Click here for more details.

Files changed (37) hide show
  1. pulumi_consul/acl_auth_method.py +4 -0
  2. pulumi_consul/acl_binding_rule.py +2 -0
  3. pulumi_consul/acl_policy.py +2 -2
  4. pulumi_consul/acl_role.py +4 -0
  5. pulumi_consul/acl_role_policy_attachment.py +8 -6
  6. pulumi_consul/acl_token.py +14 -10
  7. pulumi_consul/admin_partition.py +6 -2
  8. pulumi_consul/agent_service.py +2 -0
  9. pulumi_consul/catalog_entry.py +0 -46
  10. pulumi_consul/config_entry.py +52 -22
  11. pulumi_consul/config_entry_service_intentions.py +6 -2
  12. pulumi_consul/config_entry_service_resolver.py +36 -34
  13. pulumi_consul/config_entry_service_router.py +0 -40
  14. pulumi_consul/config_entry_service_splitter.py +8 -2
  15. pulumi_consul/get_acl_token_secret_id.py +8 -6
  16. pulumi_consul/get_catalog_service.py +34 -0
  17. pulumi_consul/get_catalog_services.py +36 -0
  18. pulumi_consul/get_key_prefix.py +18 -18
  19. pulumi_consul/get_keys.py +4 -6
  20. pulumi_consul/get_network_area_members.py +6 -6
  21. pulumi_consul/get_network_segments.py +4 -4
  22. pulumi_consul/get_service.py +34 -0
  23. pulumi_consul/get_services.py +36 -0
  24. pulumi_consul/intention.py +10 -10
  25. pulumi_consul/key_prefix.py +26 -26
  26. pulumi_consul/keys.py +6 -6
  27. pulumi_consul/license.py +4 -2
  28. pulumi_consul/namespace.py +2 -0
  29. pulumi_consul/node.py +6 -2
  30. pulumi_consul/peering.py +8 -18
  31. pulumi_consul/prepared_query.py +56 -52
  32. pulumi_consul/service.py +76 -2
  33. {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713461993.dist-info}/METADATA +1 -1
  34. pulumi_consul-3.12.0a1713461993.dist-info/RECORD +70 -0
  35. pulumi_consul-3.12.0a1713331566.dist-info/RECORD +0 -70
  36. {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713461993.dist-info}/WHEEL +0 -0
  37. {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713461993.dist-info}/top_level.txt +0 -0
@@ -407,33 +407,34 @@ class ConfigEntryServiceResolver(pulumi.CustomResource):
407
407
  import pulumi_consul as consul
408
408
 
409
409
  web = consul.ConfigEntryServiceResolver("web",
410
- connect_timeout="15s",
410
+ name="web",
411
411
  default_subset="v1",
412
+ connect_timeout="15s",
413
+ subsets=[
414
+ consul.ConfigEntryServiceResolverSubsetArgs(
415
+ name="v1",
416
+ filter="Service.Meta.version == v1",
417
+ ),
418
+ consul.ConfigEntryServiceResolverSubsetArgs(
419
+ name="v2",
420
+ filter="Service.Meta.version == v2",
421
+ ),
422
+ ],
423
+ redirects=[consul.ConfigEntryServiceResolverRedirectArgs(
424
+ service="web",
425
+ datacenter="dc2",
426
+ )],
412
427
  failovers=[
413
428
  consul.ConfigEntryServiceResolverFailoverArgs(
414
- datacenters=["dc2"],
415
429
  subset_name="v2",
430
+ datacenters=["dc2"],
416
431
  ),
417
432
  consul.ConfigEntryServiceResolverFailoverArgs(
433
+ subset_name="*",
418
434
  datacenters=[
419
435
  "dc3",
420
436
  "dc4",
421
437
  ],
422
- subset_name="*",
423
- ),
424
- ],
425
- redirects=[consul.ConfigEntryServiceResolverRedirectArgs(
426
- datacenter="dc2",
427
- service="web",
428
- )],
429
- subsets=[
430
- consul.ConfigEntryServiceResolverSubsetArgs(
431
- filter="Service.Meta.version == v1",
432
- name="v1",
433
- ),
434
- consul.ConfigEntryServiceResolverSubsetArgs(
435
- filter="Service.Meta.version == v2",
436
- name="v2",
437
438
  ),
438
439
  ])
439
440
  ```
@@ -468,33 +469,34 @@ class ConfigEntryServiceResolver(pulumi.CustomResource):
468
469
  import pulumi_consul as consul
469
470
 
470
471
  web = consul.ConfigEntryServiceResolver("web",
471
- connect_timeout="15s",
472
+ name="web",
472
473
  default_subset="v1",
474
+ connect_timeout="15s",
475
+ subsets=[
476
+ consul.ConfigEntryServiceResolverSubsetArgs(
477
+ name="v1",
478
+ filter="Service.Meta.version == v1",
479
+ ),
480
+ consul.ConfigEntryServiceResolverSubsetArgs(
481
+ name="v2",
482
+ filter="Service.Meta.version == v2",
483
+ ),
484
+ ],
485
+ redirects=[consul.ConfigEntryServiceResolverRedirectArgs(
486
+ service="web",
487
+ datacenter="dc2",
488
+ )],
473
489
  failovers=[
474
490
  consul.ConfigEntryServiceResolverFailoverArgs(
475
- datacenters=["dc2"],
476
491
  subset_name="v2",
492
+ datacenters=["dc2"],
477
493
  ),
478
494
  consul.ConfigEntryServiceResolverFailoverArgs(
495
+ subset_name="*",
479
496
  datacenters=[
480
497
  "dc3",
481
498
  "dc4",
482
499
  ],
483
- subset_name="*",
484
- ),
485
- ],
486
- redirects=[consul.ConfigEntryServiceResolverRedirectArgs(
487
- datacenter="dc2",
488
- service="web",
489
- )],
490
- subsets=[
491
- consul.ConfigEntryServiceResolverSubsetArgs(
492
- filter="Service.Meta.version == v1",
493
- name="v1",
494
- ),
495
- consul.ConfigEntryServiceResolverSubsetArgs(
496
- filter="Service.Meta.version == v2",
497
- name="v2",
498
500
  ),
499
501
  ])
500
502
  ```
@@ -203,26 +203,6 @@ class ConfigEntryServiceRouter(pulumi.CustomResource):
203
203
  """
204
204
  ## Example Usage
205
205
 
206
- <!--Start PulumiCodeChooser -->
207
- ```python
208
- import pulumi
209
- import pulumi_consul as consul
210
-
211
- admin_service_defaults_config_entry_service_defaults = consul.ConfigEntryServiceDefaults("adminServiceDefaultsConfigEntryServiceDefaults", protocol="http")
212
- admin_service_defaults_index_config_entry_service_defaults_config_entry_service_defaults = consul.ConfigEntryServiceDefaults("adminServiceDefaultsIndex/configEntryServiceDefaultsConfigEntryServiceDefaults", protocol="http")
213
- foo = consul.ConfigEntryServiceRouter("foo", routes=[consul.ConfigEntryServiceRouterRouteArgs(
214
- match=consul.ConfigEntryServiceRouterRouteMatchArgs(
215
- http=consul.ConfigEntryServiceRouterRouteMatchHttpArgs(
216
- path_prefix="/admin",
217
- ),
218
- ),
219
- destination=consul.ConfigEntryServiceRouterRouteDestinationArgs(
220
- service=consul_config_entry["admin_service"]["name"],
221
- ),
222
- )])
223
- ```
224
- <!--End PulumiCodeChooser -->
225
-
226
206
  :param str resource_name: The name of the resource.
227
207
  :param pulumi.ResourceOptions opts: Options for the resource.
228
208
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies key-value pairs to add to the KV store.
@@ -240,26 +220,6 @@ class ConfigEntryServiceRouter(pulumi.CustomResource):
240
220
  """
241
221
  ## Example Usage
242
222
 
243
- <!--Start PulumiCodeChooser -->
244
- ```python
245
- import pulumi
246
- import pulumi_consul as consul
247
-
248
- admin_service_defaults_config_entry_service_defaults = consul.ConfigEntryServiceDefaults("adminServiceDefaultsConfigEntryServiceDefaults", protocol="http")
249
- admin_service_defaults_index_config_entry_service_defaults_config_entry_service_defaults = consul.ConfigEntryServiceDefaults("adminServiceDefaultsIndex/configEntryServiceDefaultsConfigEntryServiceDefaults", protocol="http")
250
- foo = consul.ConfigEntryServiceRouter("foo", routes=[consul.ConfigEntryServiceRouterRouteArgs(
251
- match=consul.ConfigEntryServiceRouterRouteMatchArgs(
252
- http=consul.ConfigEntryServiceRouterRouteMatchHttpArgs(
253
- path_prefix="/admin",
254
- ),
255
- ),
256
- destination=consul.ConfigEntryServiceRouterRouteDestinationArgs(
257
- service=consul_config_entry["admin_service"]["name"],
258
- ),
259
- )])
260
- ```
261
- <!--End PulumiCodeChooser -->
262
-
263
223
  :param str resource_name: The name of the resource.
264
224
  :param ConfigEntryServiceRouterArgs args: The arguments to use to populate this resource's properties.
265
225
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -209,6 +209,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
209
209
  import pulumi_consul as consul
210
210
 
211
211
  web = consul.ConfigEntry("web",
212
+ name="web",
212
213
  kind="service-defaults",
213
214
  config_json=json.dumps({
214
215
  "Protocol": "http",
@@ -216,7 +217,8 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
216
217
  "MeshGateway": {},
217
218
  "TransparentProxy": {},
218
219
  }))
219
- service_resolver = consul.ConfigEntryServiceResolver("serviceResolver",
220
+ service_resolver = consul.ConfigEntryServiceResolver("service_resolver",
221
+ name="service-resolver",
220
222
  default_subset="v1",
221
223
  subsets=[
222
224
  consul.ConfigEntryServiceResolverSubsetArgs(
@@ -229,6 +231,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
229
231
  ),
230
232
  ])
231
233
  foo = consul.ConfigEntryServiceSplitter("foo",
234
+ name=service_resolver.name,
232
235
  meta={
233
236
  "key": "value",
234
237
  },
@@ -302,6 +305,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
302
305
  import pulumi_consul as consul
303
306
 
304
307
  web = consul.ConfigEntry("web",
308
+ name="web",
305
309
  kind="service-defaults",
306
310
  config_json=json.dumps({
307
311
  "Protocol": "http",
@@ -309,7 +313,8 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
309
313
  "MeshGateway": {},
310
314
  "TransparentProxy": {},
311
315
  }))
312
- service_resolver = consul.ConfigEntryServiceResolver("serviceResolver",
316
+ service_resolver = consul.ConfigEntryServiceResolver("service_resolver",
317
+ name="service-resolver",
313
318
  default_subset="v1",
314
319
  subsets=[
315
320
  consul.ConfigEntryServiceResolverSubsetArgs(
@@ -322,6 +327,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
322
327
  ),
323
328
  ])
324
329
  foo = consul.ConfigEntryServiceSplitter("foo",
330
+ name=service_resolver.name,
325
331
  meta={
326
332
  "key": "value",
327
333
  },
@@ -114,12 +114,13 @@ def get_acl_token_secret_id(accessor_id: Optional[str] = None,
114
114
  import pulumi
115
115
  import pulumi_consul as consul
116
116
 
117
- test_acl_policy = consul.AclPolicy("testAclPolicy",
117
+ test = consul.AclPolicy("test",
118
+ name="test",
118
119
  rules="node \\"\\" { policy = \\"read\\" }",
119
120
  datacenters=["dc1"])
120
- test_acl_token = consul.AclToken("testAclToken",
121
+ test_acl_token = consul.AclToken("test",
121
122
  description="test",
122
- policies=[test_acl_policy.name],
123
+ policies=[test.name],
123
124
  local=True)
124
125
  read = consul.get_acl_token_secret_id_output(accessor_id=test_acl_token.id,
125
126
  pgp_key="keybase:my_username")
@@ -164,12 +165,13 @@ def get_acl_token_secret_id_output(accessor_id: Optional[pulumi.Input[str]] = No
164
165
  import pulumi
165
166
  import pulumi_consul as consul
166
167
 
167
- test_acl_policy = consul.AclPolicy("testAclPolicy",
168
+ test = consul.AclPolicy("test",
169
+ name="test",
168
170
  rules="node \\"\\" { policy = \\"read\\" }",
169
171
  datacenters=["dc1"])
170
- test_acl_token = consul.AclToken("testAclToken",
172
+ test_acl_token = consul.AclToken("test",
171
173
  description="test",
172
- policies=[test_acl_policy.name],
174
+ policies=[test.name],
173
175
  local=True)
174
176
  read = consul.get_acl_token_secret_id_output(accessor_id=test_acl_token.id,
175
177
  pgp_key="keybase:my_username")
@@ -132,6 +132,23 @@ def get_catalog_service(datacenter: Optional[str] = None,
132
132
  This data source is different from the `get_services` (plural) data
133
133
  source, which provides a summary of the current Consul services.
134
134
 
135
+ ## Example Usage
136
+
137
+ <!--Start PulumiCodeChooser -->
138
+ ```python
139
+ import pulumi
140
+ import pulumi_consul as consul
141
+ import pulumi_example as example
142
+ import pulumi_std as std
143
+
144
+ read_consul_dc1 = consul.get_service(name="consul",
145
+ datacenter="dc1")
146
+ # Set the description to a whitespace delimited list of the node names
147
+ app = example.index.Resource("app", description=std.join(separator= ,
148
+ input=nodes).result)
149
+ ```
150
+ <!--End PulumiCodeChooser -->
151
+
135
152
 
136
153
  :param str datacenter: The Consul datacenter to query. Defaults to the
137
154
  same value found in `query_options` parameter specified below, or if that is
@@ -181,6 +198,23 @@ def get_catalog_service_output(datacenter: Optional[pulumi.Input[Optional[str]]]
181
198
  This data source is different from the `get_services` (plural) data
182
199
  source, which provides a summary of the current Consul services.
183
200
 
201
+ ## Example Usage
202
+
203
+ <!--Start PulumiCodeChooser -->
204
+ ```python
205
+ import pulumi
206
+ import pulumi_consul as consul
207
+ import pulumi_example as example
208
+ import pulumi_std as std
209
+
210
+ read_consul_dc1 = consul.get_service(name="consul",
211
+ datacenter="dc1")
212
+ # Set the description to a whitespace delimited list of the node names
213
+ app = example.index.Resource("app", description=std.join(separator= ,
214
+ input=nodes).result)
215
+ ```
216
+ <!--End PulumiCodeChooser -->
217
+
184
218
 
185
219
  :param str datacenter: The Consul datacenter to query. Defaults to the
186
220
  same value found in `query_options` parameter specified below, or if that is
@@ -113,6 +113,24 @@ def get_catalog_services(query_options: Optional[Sequence[pulumi.InputType['GetC
113
113
  This data source is different from the `Service` (singular) data
114
114
  source, which provides a detailed response about a specific Consul service.
115
115
 
116
+ ## Example Usage
117
+
118
+ <!--Start PulumiCodeChooser -->
119
+ ```python
120
+ import pulumi
121
+ import pulumi_consul as consul
122
+ import pulumi_example as example
123
+ import pulumi_std as std
124
+
125
+ read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
126
+ datacenter="dc1",
127
+ )])
128
+ # Set the description to a whitespace delimited list of the services
129
+ app = example.index.Resource("app", description=std.join(separator= ,
130
+ input=names).result)
131
+ ```
132
+ <!--End PulumiCodeChooser -->
133
+
116
134
 
117
135
  :param Sequence[pulumi.InputType['GetCatalogServicesQueryOptionArgs']] query_options: See below.
118
136
  """
@@ -143,6 +161,24 @@ def get_catalog_services_output(query_options: Optional[pulumi.Input[Optional[Se
143
161
  This data source is different from the `Service` (singular) data
144
162
  source, which provides a detailed response about a specific Consul service.
145
163
 
164
+ ## Example Usage
165
+
166
+ <!--Start PulumiCodeChooser -->
167
+ ```python
168
+ import pulumi
169
+ import pulumi_consul as consul
170
+ import pulumi_example as example
171
+ import pulumi_std as std
172
+
173
+ read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
174
+ datacenter="dc1",
175
+ )])
176
+ # Set the description to a whitespace delimited list of the services
177
+ app = example.index.Resource("app", description=std.join(separator= ,
178
+ input=names).result)
179
+ ```
180
+ <!--End PulumiCodeChooser -->
181
+
146
182
 
147
183
  :param Sequence[pulumi.InputType['GetCatalogServicesQueryOptionArgs']] query_options: See below.
148
184
  """
@@ -151,16 +151,16 @@ def get_key_prefix(datacenter: Optional[str] = None,
151
151
  import pulumi_aws as aws
152
152
  import pulumi_consul as consul
153
153
 
154
- app_key_prefix = consul.get_key_prefix(datacenter="nyc1",
154
+ app = consul.get_key_prefix(datacenter="nyc1",
155
+ token="abcd",
155
156
  path_prefix="myapp/config/",
156
157
  subkey_collection=[consul.GetKeyPrefixSubkeyCollectionArgs(
157
- default="ami-1234",
158
158
  name="ami",
159
159
  path="app/launch_ami",
160
- )],
161
- token="abcd")
160
+ default="ami-1234",
161
+ )])
162
162
  # Start our instance with the dynamic ami value
163
- app_instance = aws.ec2.Instance("appInstance", ami=app_key_prefix.var["ami"])
163
+ app_instance = aws.index.Instance("app", ami=app.var.ami)
164
164
  ```
165
165
  <!--End PulumiCodeChooser -->
166
166
 
@@ -170,11 +170,11 @@ def get_key_prefix(datacenter: Optional[str] = None,
170
170
  import pulumi_aws as aws
171
171
  import pulumi_consul as consul
172
172
 
173
- web_key_prefix = consul.get_key_prefix(datacenter="nyc1",
174
- path_prefix="myapp/config/",
175
- token="efgh")
173
+ web = consul.get_key_prefix(datacenter="nyc1",
174
+ token="efgh",
175
+ path_prefix="myapp/config/")
176
176
  # Start our instance with the dynamic ami value
177
- web_instance = aws.ec2.Instance("webInstance", ami=web_key_prefix.subkeys["app/launch_ami"])
177
+ web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
178
178
  ```
179
179
  <!--End PulumiCodeChooser -->
180
180
 
@@ -230,16 +230,16 @@ def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = No
230
230
  import pulumi_aws as aws
231
231
  import pulumi_consul as consul
232
232
 
233
- app_key_prefix = consul.get_key_prefix(datacenter="nyc1",
233
+ app = consul.get_key_prefix(datacenter="nyc1",
234
+ token="abcd",
234
235
  path_prefix="myapp/config/",
235
236
  subkey_collection=[consul.GetKeyPrefixSubkeyCollectionArgs(
236
- default="ami-1234",
237
237
  name="ami",
238
238
  path="app/launch_ami",
239
- )],
240
- token="abcd")
239
+ default="ami-1234",
240
+ )])
241
241
  # Start our instance with the dynamic ami value
242
- app_instance = aws.ec2.Instance("appInstance", ami=app_key_prefix.var["ami"])
242
+ app_instance = aws.index.Instance("app", ami=app.var.ami)
243
243
  ```
244
244
  <!--End PulumiCodeChooser -->
245
245
 
@@ -249,11 +249,11 @@ def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = No
249
249
  import pulumi_aws as aws
250
250
  import pulumi_consul as consul
251
251
 
252
- web_key_prefix = consul.get_key_prefix(datacenter="nyc1",
253
- path_prefix="myapp/config/",
254
- token="efgh")
252
+ web = consul.get_key_prefix(datacenter="nyc1",
253
+ token="efgh",
254
+ path_prefix="myapp/config/")
255
255
  # Start our instance with the dynamic ami value
256
- web_instance = aws.ec2.Instance("webInstance", ami=web_key_prefix.subkeys["app/launch_ami"])
256
+ web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
257
257
  ```
258
258
  <!--End PulumiCodeChooser -->
259
259
 
pulumi_consul/get_keys.py CHANGED
@@ -153,15 +153,14 @@ def get_keys(datacenter: Optional[str] = None,
153
153
  import pulumi_aws as aws
154
154
  import pulumi_consul as consul
155
155
 
156
- app_keys = consul.get_keys(datacenter="nyc1",
156
+ app = consul.get_keys(datacenter="nyc1",
157
157
  keys=[consul.GetKeysKeyArgs(
158
158
  name="ami",
159
159
  path="service/app/launch_ami",
160
160
  default="ami-1234",
161
161
  )])
162
162
  # Start our instance with the dynamic ami value
163
- app_instance = aws.ec2.Instance("appInstance", ami=app_keys.var["ami"])
164
- # ...
163
+ app_instance = aws.index.Instance("app", ami=app.var.ami)
165
164
  ```
166
165
  <!--End PulumiCodeChooser -->
167
166
 
@@ -213,15 +212,14 @@ def get_keys_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
213
212
  import pulumi_aws as aws
214
213
  import pulumi_consul as consul
215
214
 
216
- app_keys = consul.get_keys(datacenter="nyc1",
215
+ app = consul.get_keys(datacenter="nyc1",
217
216
  keys=[consul.GetKeysKeyArgs(
218
217
  name="ami",
219
218
  path="service/app/launch_ami",
220
219
  default="ami-1234",
221
220
  )])
222
221
  # Start our instance with the dynamic ami value
223
- app_instance = aws.ec2.Instance("appInstance", ami=app_keys.var["ami"])
224
- # ...
222
+ app_instance = aws.index.Instance("app", ami=app.var.ami)
225
223
  ```
226
224
  <!--End PulumiCodeChooser -->
227
225
 
@@ -112,12 +112,12 @@ def get_network_area_members(datacenter: Optional[str] = None,
112
112
  import pulumi
113
113
  import pulumi_consul as consul
114
114
 
115
- dc2_network_area = consul.NetworkArea("dc2NetworkArea",
115
+ dc2_network_area = consul.NetworkArea("dc2",
116
116
  peer_datacenter="dc2",
117
117
  retry_joins=["1.2.3.4"],
118
118
  use_tls=True)
119
- dc2_network_area_members = consul.get_network_area_members_output(uuid=dc2_network_area.id)
120
- pulumi.export("members", dc2_network_area_members.members)
119
+ dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
120
+ pulumi.export("members", dc2.members)
121
121
  ```
122
122
  <!--End PulumiCodeChooser -->
123
123
 
@@ -161,12 +161,12 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
161
161
  import pulumi
162
162
  import pulumi_consul as consul
163
163
 
164
- dc2_network_area = consul.NetworkArea("dc2NetworkArea",
164
+ dc2_network_area = consul.NetworkArea("dc2",
165
165
  peer_datacenter="dc2",
166
166
  retry_joins=["1.2.3.4"],
167
167
  use_tls=True)
168
- dc2_network_area_members = consul.get_network_area_members_output(uuid=dc2_network_area.id)
169
- pulumi.export("members", dc2_network_area_members.members)
168
+ dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
169
+ pulumi.export("members", dc2.members)
170
170
  ```
171
171
  <!--End PulumiCodeChooser -->
172
172
 
@@ -98,8 +98,8 @@ def get_network_segments(datacenter: Optional[str] = None,
98
98
  import pulumi
99
99
  import pulumi_consul as consul
100
100
 
101
- segments_network_segments = consul.get_network_segments()
102
- pulumi.export("segments", segments_network_segments.segments)
101
+ segments = consul.get_network_segments()
102
+ pulumi.export("segments", segments.segments)
103
103
  ```
104
104
  <!--End PulumiCodeChooser -->
105
105
 
@@ -139,8 +139,8 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
139
139
  import pulumi
140
140
  import pulumi_consul as consul
141
141
 
142
- segments_network_segments = consul.get_network_segments()
143
- pulumi.export("segments", segments_network_segments.segments)
142
+ segments = consul.get_network_segments()
143
+ pulumi.export("segments", segments.segments)
144
144
  ```
145
145
  <!--End PulumiCodeChooser -->
146
146
 
@@ -130,6 +130,23 @@ def get_service(datacenter: Optional[str] = None,
130
130
  This data source is different from the `get_services` (plural) data
131
131
  source, which provides a summary of the current Consul services.
132
132
 
133
+ ## Example Usage
134
+
135
+ <!--Start PulumiCodeChooser -->
136
+ ```python
137
+ import pulumi
138
+ import pulumi_consul as consul
139
+ import pulumi_example as example
140
+ import pulumi_std as std
141
+
142
+ read_consul_dc1 = consul.get_service(name="consul",
143
+ datacenter="dc1")
144
+ # Set the description to a whitespace delimited list of the node names
145
+ app = example.index.Resource("app", description=std.join(separator= ,
146
+ input=nodes).result)
147
+ ```
148
+ <!--End PulumiCodeChooser -->
149
+
133
150
 
134
151
  :param str datacenter: The Consul datacenter to query. Defaults to the
135
152
  same value found in `query_options` parameter specified below, or if that is
@@ -178,6 +195,23 @@ def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
178
195
  This data source is different from the `get_services` (plural) data
179
196
  source, which provides a summary of the current Consul services.
180
197
 
198
+ ## Example Usage
199
+
200
+ <!--Start PulumiCodeChooser -->
201
+ ```python
202
+ import pulumi
203
+ import pulumi_consul as consul
204
+ import pulumi_example as example
205
+ import pulumi_std as std
206
+
207
+ read_consul_dc1 = consul.get_service(name="consul",
208
+ datacenter="dc1")
209
+ # Set the description to a whitespace delimited list of the node names
210
+ app = example.index.Resource("app", description=std.join(separator= ,
211
+ input=nodes).result)
212
+ ```
213
+ <!--End PulumiCodeChooser -->
214
+
181
215
 
182
216
  :param str datacenter: The Consul datacenter to query. Defaults to the
183
217
  same value found in `query_options` parameter specified below, or if that is
@@ -111,6 +111,24 @@ def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQ
111
111
  This data source is different from the `Service` (singular) data
112
112
  source, which provides a detailed response about a specific Consul service.
113
113
 
114
+ ## Example Usage
115
+
116
+ <!--Start PulumiCodeChooser -->
117
+ ```python
118
+ import pulumi
119
+ import pulumi_consul as consul
120
+ import pulumi_example as example
121
+ import pulumi_std as std
122
+
123
+ read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
124
+ datacenter="dc1",
125
+ )])
126
+ # Set the description to a whitespace delimited list of the services
127
+ app = example.index.Resource("app", description=std.join(separator= ,
128
+ input=names).result)
129
+ ```
130
+ <!--End PulumiCodeChooser -->
131
+
114
132
 
115
133
  :param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
116
134
  """
@@ -140,6 +158,24 @@ def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[p
140
158
  This data source is different from the `Service` (singular) data
141
159
  source, which provides a detailed response about a specific Consul service.
142
160
 
161
+ ## Example Usage
162
+
163
+ <!--Start PulumiCodeChooser -->
164
+ ```python
165
+ import pulumi
166
+ import pulumi_consul as consul
167
+ import pulumi_example as example
168
+ import pulumi_std as std
169
+
170
+ read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
171
+ datacenter="dc1",
172
+ )])
173
+ # Set the description to a whitespace delimited list of the services
174
+ app = example.index.Resource("app", description=std.join(separator= ,
175
+ input=names).result)
176
+ ```
177
+ <!--End PulumiCodeChooser -->
178
+
143
179
 
144
180
  :param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
145
181
  """
@@ -347,9 +347,9 @@ class Intention(pulumi.CustomResource):
347
347
  import pulumi_consul as consul
348
348
 
349
349
  database = consul.Intention("database",
350
- action="allow",
350
+ source_name="api",
351
351
  destination_name="db",
352
- source_name="api")
352
+ action="allow")
353
353
  ```
354
354
  <!--End PulumiCodeChooser -->
355
355
 
@@ -361,9 +361,9 @@ class Intention(pulumi.CustomResource):
361
361
  import pulumi_consul as consul
362
362
 
363
363
  database = consul.Intention("database",
364
- action="allow",
365
- destination_name=consul_service["pg"]["name"],
366
- source_name="api")
364
+ source_name="api",
365
+ destination_name=pg_consul_service["name"],
366
+ action="allow")
367
367
  pg = consul.get_service(name="postgresql")
368
368
  ```
369
369
  <!--End PulumiCodeChooser -->
@@ -425,9 +425,9 @@ class Intention(pulumi.CustomResource):
425
425
  import pulumi_consul as consul
426
426
 
427
427
  database = consul.Intention("database",
428
- action="allow",
428
+ source_name="api",
429
429
  destination_name="db",
430
- source_name="api")
430
+ action="allow")
431
431
  ```
432
432
  <!--End PulumiCodeChooser -->
433
433
 
@@ -439,9 +439,9 @@ class Intention(pulumi.CustomResource):
439
439
  import pulumi_consul as consul
440
440
 
441
441
  database = consul.Intention("database",
442
- action="allow",
443
- destination_name=consul_service["pg"]["name"],
444
- source_name="api")
442
+ source_name="api",
443
+ destination_name=pg_consul_service["name"],
444
+ action="allow")
445
445
  pg = consul.get_service(name="postgresql")
446
446
  ```
447
447
  <!--End PulumiCodeChooser -->