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.
- pulumi_consul/_inputs.py +62 -26
- pulumi_consul/_utilities.py +2 -2
- pulumi_consul/acl_auth_method.py +4 -0
- pulumi_consul/acl_binding_rule.py +2 -0
- pulumi_consul/acl_policy.py +4 -4
- pulumi_consul/acl_role.py +13 -13
- pulumi_consul/acl_role_policy_attachment.py +10 -8
- pulumi_consul/acl_token.py +18 -14
- pulumi_consul/acl_token_policy_attachment.py +10 -6
- pulumi_consul/acl_token_role_attachment.py +6 -4
- pulumi_consul/admin_partition.py +8 -4
- pulumi_consul/agent_service.py +2 -0
- pulumi_consul/catalog_entry.py +0 -42
- pulumi_consul/certificate_authority.py +2 -28
- pulumi_consul/config/outputs.py +24 -0
- pulumi_consul/config_entry.py +76 -32
- pulumi_consul/config_entry_service_defaults.py +23 -23
- pulumi_consul/config_entry_service_intentions.py +27 -27
- pulumi_consul/config_entry_service_resolver.py +57 -59
- pulumi_consul/config_entry_service_router.py +21 -61
- pulumi_consul/config_entry_service_splitter.py +24 -22
- pulumi_consul/get_acl_role.py +2 -0
- pulumi_consul/get_acl_token_secret_id.py +8 -6
- pulumi_consul/get_catalog_service.py +30 -4
- pulumi_consul/get_catalog_services.py +32 -0
- pulumi_consul/get_key_prefix.py +18 -18
- pulumi_consul/get_keys.py +4 -6
- pulumi_consul/get_network_area_members.py +6 -6
- pulumi_consul/get_network_segments.py +4 -4
- pulumi_consul/get_service.py +30 -4
- pulumi_consul/get_services.py +32 -0
- pulumi_consul/intention.py +12 -12
- pulumi_consul/key_prefix.py +32 -30
- pulumi_consul/keys.py +6 -6
- pulumi_consul/license.py +4 -2
- pulumi_consul/namespace.py +8 -4
- pulumi_consul/namespace_policy_attachment.py +6 -4
- pulumi_consul/namespace_role_attachment.py +6 -4
- pulumi_consul/node.py +8 -4
- pulumi_consul/outputs.py +126 -24
- pulumi_consul/peering.py +8 -18
- pulumi_consul/prepared_query.py +65 -61
- pulumi_consul/pulumi-plugin.json +2 -1
- pulumi_consul/service.py +133 -7
- {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/METADATA +2 -2
- pulumi_consul-3.11.3.dist-info/RECORD +70 -0
- {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/WHEEL +1 -1
- pulumi_consul-3.11.1.dist-info/RECORD +0 -70
- {pulumi_consul-3.11.1.dist-info → pulumi_consul-3.11.3.dist-info}/top_level.txt +0 -0
|
@@ -26,8 +26,8 @@ class ConfigEntryServiceSplitterArgs:
|
|
|
26
26
|
:param pulumi.Input[Sequence[pulumi.Input['ConfigEntryServiceSplitterSplitArgs']]] splits: Defines how much traffic to send to sets of service instances during a traffic split.
|
|
27
27
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies key-value pairs to add to the KV store.
|
|
28
28
|
:param pulumi.Input[str] name: Specifies a name for the configuration entry.
|
|
29
|
-
:param pulumi.Input[str] namespace: Specifies the namespace to
|
|
30
|
-
:param pulumi.Input[str] partition: Specifies the admin partition to
|
|
29
|
+
:param pulumi.Input[str] namespace: Specifies the namespace to apply the configuration entry.
|
|
30
|
+
:param pulumi.Input[str] partition: Specifies the admin partition to apply the configuration entry.
|
|
31
31
|
"""
|
|
32
32
|
pulumi.set(__self__, "splits", splits)
|
|
33
33
|
if meta is not None:
|
|
@@ -79,7 +79,7 @@ class ConfigEntryServiceSplitterArgs:
|
|
|
79
79
|
@pulumi.getter
|
|
80
80
|
def namespace(self) -> Optional[pulumi.Input[str]]:
|
|
81
81
|
"""
|
|
82
|
-
Specifies the namespace to
|
|
82
|
+
Specifies the namespace to apply the configuration entry.
|
|
83
83
|
"""
|
|
84
84
|
return pulumi.get(self, "namespace")
|
|
85
85
|
|
|
@@ -91,7 +91,7 @@ class ConfigEntryServiceSplitterArgs:
|
|
|
91
91
|
@pulumi.getter
|
|
92
92
|
def partition(self) -> Optional[pulumi.Input[str]]:
|
|
93
93
|
"""
|
|
94
|
-
Specifies the admin partition to
|
|
94
|
+
Specifies the admin partition to apply the configuration entry.
|
|
95
95
|
"""
|
|
96
96
|
return pulumi.get(self, "partition")
|
|
97
97
|
|
|
@@ -112,8 +112,8 @@ class _ConfigEntryServiceSplitterState:
|
|
|
112
112
|
Input properties used for looking up and filtering ConfigEntryServiceSplitter resources.
|
|
113
113
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies key-value pairs to add to the KV store.
|
|
114
114
|
:param pulumi.Input[str] name: Specifies a name for the configuration entry.
|
|
115
|
-
:param pulumi.Input[str] namespace: Specifies the namespace to
|
|
116
|
-
:param pulumi.Input[str] partition: Specifies the admin partition to
|
|
115
|
+
:param pulumi.Input[str] namespace: Specifies the namespace to apply the configuration entry.
|
|
116
|
+
:param pulumi.Input[str] partition: Specifies the admin partition to apply the configuration entry.
|
|
117
117
|
:param pulumi.Input[Sequence[pulumi.Input['ConfigEntryServiceSplitterSplitArgs']]] splits: Defines how much traffic to send to sets of service instances during a traffic split.
|
|
118
118
|
"""
|
|
119
119
|
if meta is not None:
|
|
@@ -155,7 +155,7 @@ class _ConfigEntryServiceSplitterState:
|
|
|
155
155
|
@pulumi.getter
|
|
156
156
|
def namespace(self) -> Optional[pulumi.Input[str]]:
|
|
157
157
|
"""
|
|
158
|
-
Specifies the namespace to
|
|
158
|
+
Specifies the namespace to apply the configuration entry.
|
|
159
159
|
"""
|
|
160
160
|
return pulumi.get(self, "namespace")
|
|
161
161
|
|
|
@@ -167,7 +167,7 @@ class _ConfigEntryServiceSplitterState:
|
|
|
167
167
|
@pulumi.getter
|
|
168
168
|
def partition(self) -> Optional[pulumi.Input[str]]:
|
|
169
169
|
"""
|
|
170
|
-
Specifies the admin partition to
|
|
170
|
+
Specifies the admin partition to apply the configuration entry.
|
|
171
171
|
"""
|
|
172
172
|
return pulumi.get(self, "partition")
|
|
173
173
|
|
|
@@ -200,8 +200,6 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
200
200
|
splits: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConfigEntryServiceSplitterSplitArgs']]]]] = None,
|
|
201
201
|
__props__=None):
|
|
202
202
|
"""
|
|
203
|
-
The `ConfigEntryServiceSplitter` resource configures a [service splitter](https://developer.hashicorp.com/consul/docs/connect/config-entries/service-splitter) that will redirect a percentage of incoming traffic requests for a service to one or more specific service instances.
|
|
204
|
-
|
|
205
203
|
## Example Usage
|
|
206
204
|
|
|
207
205
|
```python
|
|
@@ -210,6 +208,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
210
208
|
import pulumi_consul as consul
|
|
211
209
|
|
|
212
210
|
web = consul.ConfigEntry("web",
|
|
211
|
+
name="web",
|
|
213
212
|
kind="service-defaults",
|
|
214
213
|
config_json=json.dumps({
|
|
215
214
|
"Protocol": "http",
|
|
@@ -217,7 +216,8 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
217
216
|
"MeshGateway": {},
|
|
218
217
|
"TransparentProxy": {},
|
|
219
218
|
}))
|
|
220
|
-
service_resolver = consul.ConfigEntryServiceResolver("
|
|
219
|
+
service_resolver = consul.ConfigEntryServiceResolver("service_resolver",
|
|
220
|
+
name="service-resolver",
|
|
221
221
|
default_subset="v1",
|
|
222
222
|
subsets=[
|
|
223
223
|
consul.ConfigEntryServiceResolverSubsetArgs(
|
|
@@ -230,6 +230,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
230
230
|
),
|
|
231
231
|
])
|
|
232
232
|
foo = consul.ConfigEntryServiceSplitter("foo",
|
|
233
|
+
name=service_resolver.name,
|
|
233
234
|
meta={
|
|
234
235
|
"key": "value",
|
|
235
236
|
},
|
|
@@ -275,15 +276,15 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
275
276
|
## Import
|
|
276
277
|
|
|
277
278
|
```sh
|
|
278
|
-
|
|
279
|
+
$ pulumi import consul:index/configEntryServiceSplitter:ConfigEntryServiceSplitter foo web
|
|
279
280
|
```
|
|
280
281
|
|
|
281
282
|
:param str resource_name: The name of the resource.
|
|
282
283
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
283
284
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies key-value pairs to add to the KV store.
|
|
284
285
|
:param pulumi.Input[str] name: Specifies a name for the configuration entry.
|
|
285
|
-
:param pulumi.Input[str] namespace: Specifies the namespace to
|
|
286
|
-
:param pulumi.Input[str] partition: Specifies the admin partition to
|
|
286
|
+
:param pulumi.Input[str] namespace: Specifies the namespace to apply the configuration entry.
|
|
287
|
+
:param pulumi.Input[str] partition: Specifies the admin partition to apply the configuration entry.
|
|
287
288
|
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConfigEntryServiceSplitterSplitArgs']]]] splits: Defines how much traffic to send to sets of service instances during a traffic split.
|
|
288
289
|
"""
|
|
289
290
|
...
|
|
@@ -293,8 +294,6 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
293
294
|
args: ConfigEntryServiceSplitterArgs,
|
|
294
295
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
295
296
|
"""
|
|
296
|
-
The `ConfigEntryServiceSplitter` resource configures a [service splitter](https://developer.hashicorp.com/consul/docs/connect/config-entries/service-splitter) that will redirect a percentage of incoming traffic requests for a service to one or more specific service instances.
|
|
297
|
-
|
|
298
297
|
## Example Usage
|
|
299
298
|
|
|
300
299
|
```python
|
|
@@ -303,6 +302,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
303
302
|
import pulumi_consul as consul
|
|
304
303
|
|
|
305
304
|
web = consul.ConfigEntry("web",
|
|
305
|
+
name="web",
|
|
306
306
|
kind="service-defaults",
|
|
307
307
|
config_json=json.dumps({
|
|
308
308
|
"Protocol": "http",
|
|
@@ -310,7 +310,8 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
310
310
|
"MeshGateway": {},
|
|
311
311
|
"TransparentProxy": {},
|
|
312
312
|
}))
|
|
313
|
-
service_resolver = consul.ConfigEntryServiceResolver("
|
|
313
|
+
service_resolver = consul.ConfigEntryServiceResolver("service_resolver",
|
|
314
|
+
name="service-resolver",
|
|
314
315
|
default_subset="v1",
|
|
315
316
|
subsets=[
|
|
316
317
|
consul.ConfigEntryServiceResolverSubsetArgs(
|
|
@@ -323,6 +324,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
323
324
|
),
|
|
324
325
|
])
|
|
325
326
|
foo = consul.ConfigEntryServiceSplitter("foo",
|
|
327
|
+
name=service_resolver.name,
|
|
326
328
|
meta={
|
|
327
329
|
"key": "value",
|
|
328
330
|
},
|
|
@@ -368,7 +370,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
368
370
|
## Import
|
|
369
371
|
|
|
370
372
|
```sh
|
|
371
|
-
|
|
373
|
+
$ pulumi import consul:index/configEntryServiceSplitter:ConfigEntryServiceSplitter foo web
|
|
372
374
|
```
|
|
373
375
|
|
|
374
376
|
:param str resource_name: The name of the resource.
|
|
@@ -431,8 +433,8 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
431
433
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
432
434
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies key-value pairs to add to the KV store.
|
|
433
435
|
:param pulumi.Input[str] name: Specifies a name for the configuration entry.
|
|
434
|
-
:param pulumi.Input[str] namespace: Specifies the namespace to
|
|
435
|
-
:param pulumi.Input[str] partition: Specifies the admin partition to
|
|
436
|
+
:param pulumi.Input[str] namespace: Specifies the namespace to apply the configuration entry.
|
|
437
|
+
:param pulumi.Input[str] partition: Specifies the admin partition to apply the configuration entry.
|
|
436
438
|
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConfigEntryServiceSplitterSplitArgs']]]] splits: Defines how much traffic to send to sets of service instances during a traffic split.
|
|
437
439
|
"""
|
|
438
440
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -466,7 +468,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
466
468
|
@pulumi.getter
|
|
467
469
|
def namespace(self) -> pulumi.Output[Optional[str]]:
|
|
468
470
|
"""
|
|
469
|
-
Specifies the namespace to
|
|
471
|
+
Specifies the namespace to apply the configuration entry.
|
|
470
472
|
"""
|
|
471
473
|
return pulumi.get(self, "namespace")
|
|
472
474
|
|
|
@@ -474,7 +476,7 @@ class ConfigEntryServiceSplitter(pulumi.CustomResource):
|
|
|
474
476
|
@pulumi.getter
|
|
475
477
|
def partition(self) -> pulumi.Output[Optional[str]]:
|
|
476
478
|
"""
|
|
477
|
-
Specifies the admin partition to
|
|
479
|
+
Specifies the admin partition to apply the configuration entry.
|
|
478
480
|
"""
|
|
479
481
|
return pulumi.get(self, "partition")
|
|
480
482
|
|
pulumi_consul/get_acl_role.py
CHANGED
|
@@ -159,6 +159,7 @@ def get_acl_role(name: Optional[str] = None,
|
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
|
|
162
|
+
:param str name: The name of the ACL Role.
|
|
162
163
|
:param str namespace: The namespace to lookup the role.
|
|
163
164
|
:param str partition: The partition to lookup the role.
|
|
164
165
|
"""
|
|
@@ -200,6 +201,7 @@ def get_acl_role_output(name: Optional[pulumi.Input[str]] = None,
|
|
|
200
201
|
```
|
|
201
202
|
|
|
202
203
|
|
|
204
|
+
:param str name: The name of the ACL Role.
|
|
203
205
|
:param str namespace: The namespace to lookup the role.
|
|
204
206
|
:param str partition: The partition to lookup the role.
|
|
205
207
|
"""
|
|
@@ -113,12 +113,13 @@ def get_acl_token_secret_id(accessor_id: Optional[str] = None,
|
|
|
113
113
|
import pulumi
|
|
114
114
|
import pulumi_consul as consul
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
test = consul.AclPolicy("test",
|
|
117
|
+
name="test",
|
|
117
118
|
rules="node \\"\\" { policy = \\"read\\" }",
|
|
118
119
|
datacenters=["dc1"])
|
|
119
|
-
test_acl_token = consul.AclToken("
|
|
120
|
+
test_acl_token = consul.AclToken("test",
|
|
120
121
|
description="test",
|
|
121
|
-
policies=[
|
|
122
|
+
policies=[test.name],
|
|
122
123
|
local=True)
|
|
123
124
|
read = consul.get_acl_token_secret_id_output(accessor_id=test_acl_token.id,
|
|
124
125
|
pgp_key="keybase:my_username")
|
|
@@ -161,12 +162,13 @@ def get_acl_token_secret_id_output(accessor_id: Optional[pulumi.Input[str]] = No
|
|
|
161
162
|
import pulumi
|
|
162
163
|
import pulumi_consul as consul
|
|
163
164
|
|
|
164
|
-
|
|
165
|
+
test = consul.AclPolicy("test",
|
|
166
|
+
name="test",
|
|
165
167
|
rules="node \\"\\" { policy = \\"read\\" }",
|
|
166
168
|
datacenters=["dc1"])
|
|
167
|
-
test_acl_token = consul.AclToken("
|
|
169
|
+
test_acl_token = consul.AclToken("test",
|
|
168
170
|
description="test",
|
|
169
|
-
policies=[
|
|
171
|
+
policies=[test.name],
|
|
170
172
|
local=True)
|
|
171
173
|
read = consul.get_acl_token_secret_id_output(accessor_id=test_acl_token.id,
|
|
172
174
|
pgp_key="keybase:my_username")
|
|
@@ -132,13 +132,26 @@ 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
|
+
```python
|
|
138
|
+
import pulumi
|
|
139
|
+
import pulumi_consul as consul
|
|
140
|
+
import pulumi_example as example
|
|
141
|
+
import pulumi_std as std
|
|
142
|
+
|
|
143
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
144
|
+
datacenter="dc1")
|
|
145
|
+
# Set the description to a whitespace delimited list of the node names
|
|
146
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
147
|
+
input=nodes).result)
|
|
148
|
+
```
|
|
149
|
+
|
|
135
150
|
|
|
136
151
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
137
152
|
same value found in `query_options` parameter specified below, or if that is
|
|
138
153
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
139
154
|
configured to talk to.
|
|
140
|
-
:param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
|
|
141
|
-
and https://www.consul.io/api-docs/catalog#filtering-1.
|
|
142
155
|
:param str name: The service name to select.
|
|
143
156
|
:param Sequence[pulumi.InputType['GetCatalogServiceQueryOptionArgs']] query_options: See below.
|
|
144
157
|
:param str tag: A single tag that can be used to filter the list of nodes
|
|
@@ -181,13 +194,26 @@ def get_catalog_service_output(datacenter: Optional[pulumi.Input[Optional[str]]]
|
|
|
181
194
|
This data source is different from the `get_services` (plural) data
|
|
182
195
|
source, which provides a summary of the current Consul services.
|
|
183
196
|
|
|
197
|
+
## Example Usage
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
import pulumi
|
|
201
|
+
import pulumi_consul as consul
|
|
202
|
+
import pulumi_example as example
|
|
203
|
+
import pulumi_std as std
|
|
204
|
+
|
|
205
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
206
|
+
datacenter="dc1")
|
|
207
|
+
# Set the description to a whitespace delimited list of the node names
|
|
208
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
209
|
+
input=nodes).result)
|
|
210
|
+
```
|
|
211
|
+
|
|
184
212
|
|
|
185
213
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
186
214
|
same value found in `query_options` parameter specified below, or if that is
|
|
187
215
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
188
216
|
configured to talk to.
|
|
189
|
-
:param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
|
|
190
|
-
and https://www.consul.io/api-docs/catalog#filtering-1.
|
|
191
217
|
:param str name: The service name to select.
|
|
192
218
|
:param Sequence[pulumi.InputType['GetCatalogServiceQueryOptionArgs']] query_options: See below.
|
|
193
219
|
:param str tag: A single tag that can be used to filter the list of nodes
|
|
@@ -113,6 +113,22 @@ 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
|
+
```python
|
|
119
|
+
import pulumi
|
|
120
|
+
import pulumi_consul as consul
|
|
121
|
+
import pulumi_example as example
|
|
122
|
+
import pulumi_std as std
|
|
123
|
+
|
|
124
|
+
read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
|
|
125
|
+
datacenter="dc1",
|
|
126
|
+
)])
|
|
127
|
+
# Set the description to a whitespace delimited list of the services
|
|
128
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
129
|
+
input=names).result)
|
|
130
|
+
```
|
|
131
|
+
|
|
116
132
|
|
|
117
133
|
:param Sequence[pulumi.InputType['GetCatalogServicesQueryOptionArgs']] query_options: See below.
|
|
118
134
|
"""
|
|
@@ -143,6 +159,22 @@ def get_catalog_services_output(query_options: Optional[pulumi.Input[Optional[Se
|
|
|
143
159
|
This data source is different from the `Service` (singular) data
|
|
144
160
|
source, which provides a detailed response about a specific Consul service.
|
|
145
161
|
|
|
162
|
+
## Example Usage
|
|
163
|
+
|
|
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
|
+
|
|
146
178
|
|
|
147
179
|
:param Sequence[pulumi.InputType['GetCatalogServicesQueryOptionArgs']] query_options: See below.
|
|
148
180
|
"""
|
pulumi_consul/get_key_prefix.py
CHANGED
|
@@ -150,16 +150,16 @@ def get_key_prefix(datacenter: Optional[str] = None,
|
|
|
150
150
|
import pulumi_aws as aws
|
|
151
151
|
import pulumi_consul as consul
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
app = consul.get_key_prefix(datacenter="nyc1",
|
|
154
|
+
token="abcd",
|
|
154
155
|
path_prefix="myapp/config/",
|
|
155
156
|
subkey_collection=[consul.GetKeyPrefixSubkeyCollectionArgs(
|
|
156
|
-
default="ami-1234",
|
|
157
157
|
name="ami",
|
|
158
158
|
path="app/launch_ami",
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
default="ami-1234",
|
|
160
|
+
)])
|
|
161
161
|
# Start our instance with the dynamic ami value
|
|
162
|
-
app_instance = aws.
|
|
162
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
```python
|
|
@@ -167,11 +167,11 @@ def get_key_prefix(datacenter: Optional[str] = None,
|
|
|
167
167
|
import pulumi_aws as aws
|
|
168
168
|
import pulumi_consul as consul
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
web = consul.get_key_prefix(datacenter="nyc1",
|
|
171
|
+
token="efgh",
|
|
172
|
+
path_prefix="myapp/config/")
|
|
173
173
|
# Start our instance with the dynamic ami value
|
|
174
|
-
web_instance = aws.
|
|
174
|
+
web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
|
|
@@ -225,16 +225,16 @@ def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = No
|
|
|
225
225
|
import pulumi_aws as aws
|
|
226
226
|
import pulumi_consul as consul
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
app = consul.get_key_prefix(datacenter="nyc1",
|
|
229
|
+
token="abcd",
|
|
229
230
|
path_prefix="myapp/config/",
|
|
230
231
|
subkey_collection=[consul.GetKeyPrefixSubkeyCollectionArgs(
|
|
231
|
-
default="ami-1234",
|
|
232
232
|
name="ami",
|
|
233
233
|
path="app/launch_ami",
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
default="ami-1234",
|
|
235
|
+
)])
|
|
236
236
|
# Start our instance with the dynamic ami value
|
|
237
|
-
app_instance = aws.
|
|
237
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
```python
|
|
@@ -242,11 +242,11 @@ def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = No
|
|
|
242
242
|
import pulumi_aws as aws
|
|
243
243
|
import pulumi_consul as consul
|
|
244
244
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
web = consul.get_key_prefix(datacenter="nyc1",
|
|
246
|
+
token="efgh",
|
|
247
|
+
path_prefix="myapp/config/")
|
|
248
248
|
# Start our instance with the dynamic ami value
|
|
249
|
-
web_instance = aws.
|
|
249
|
+
web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
|
pulumi_consul/get_keys.py
CHANGED
|
@@ -152,15 +152,14 @@ def get_keys(datacenter: Optional[str] = None,
|
|
|
152
152
|
import pulumi_aws as aws
|
|
153
153
|
import pulumi_consul as consul
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
app = consul.get_keys(datacenter="nyc1",
|
|
156
156
|
keys=[consul.GetKeysKeyArgs(
|
|
157
157
|
name="ami",
|
|
158
158
|
path="service/app/launch_ami",
|
|
159
159
|
default="ami-1234",
|
|
160
160
|
)])
|
|
161
161
|
# Start our instance with the dynamic ami value
|
|
162
|
-
app_instance = aws.
|
|
163
|
-
# ...
|
|
162
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
164
163
|
```
|
|
165
164
|
|
|
166
165
|
|
|
@@ -210,15 +209,14 @@ def get_keys_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
210
209
|
import pulumi_aws as aws
|
|
211
210
|
import pulumi_consul as consul
|
|
212
211
|
|
|
213
|
-
|
|
212
|
+
app = consul.get_keys(datacenter="nyc1",
|
|
214
213
|
keys=[consul.GetKeysKeyArgs(
|
|
215
214
|
name="ami",
|
|
216
215
|
path="service/app/launch_ami",
|
|
217
216
|
default="ami-1234",
|
|
218
217
|
)])
|
|
219
218
|
# Start our instance with the dynamic ami value
|
|
220
|
-
app_instance = aws.
|
|
221
|
-
# ...
|
|
219
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
222
220
|
```
|
|
223
221
|
|
|
224
222
|
|
|
@@ -111,12 +111,12 @@ def get_network_area_members(datacenter: Optional[str] = None,
|
|
|
111
111
|
import pulumi
|
|
112
112
|
import pulumi_consul as consul
|
|
113
113
|
|
|
114
|
-
dc2_network_area = consul.NetworkArea("
|
|
114
|
+
dc2_network_area = consul.NetworkArea("dc2",
|
|
115
115
|
peer_datacenter="dc2",
|
|
116
116
|
retry_joins=["1.2.3.4"],
|
|
117
117
|
use_tls=True)
|
|
118
|
-
|
|
119
|
-
pulumi.export("members",
|
|
118
|
+
dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
|
|
119
|
+
pulumi.export("members", dc2.members)
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
|
|
@@ -158,12 +158,12 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
|
|
|
158
158
|
import pulumi
|
|
159
159
|
import pulumi_consul as consul
|
|
160
160
|
|
|
161
|
-
dc2_network_area = consul.NetworkArea("
|
|
161
|
+
dc2_network_area = consul.NetworkArea("dc2",
|
|
162
162
|
peer_datacenter="dc2",
|
|
163
163
|
retry_joins=["1.2.3.4"],
|
|
164
164
|
use_tls=True)
|
|
165
|
-
|
|
166
|
-
pulumi.export("members",
|
|
165
|
+
dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
|
|
166
|
+
pulumi.export("members", dc2.members)
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
|
|
@@ -97,8 +97,8 @@ def get_network_segments(datacenter: Optional[str] = None,
|
|
|
97
97
|
import pulumi
|
|
98
98
|
import pulumi_consul as consul
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
pulumi.export("segments",
|
|
100
|
+
segments = consul.get_network_segments()
|
|
101
|
+
pulumi.export("segments", segments.segments)
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
|
|
@@ -136,8 +136,8 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
|
|
|
136
136
|
import pulumi
|
|
137
137
|
import pulumi_consul as consul
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
pulumi.export("segments",
|
|
139
|
+
segments = consul.get_network_segments()
|
|
140
|
+
pulumi.export("segments", segments.segments)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
|
pulumi_consul/get_service.py
CHANGED
|
@@ -130,13 +130,26 @@ 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
|
+
```python
|
|
136
|
+
import pulumi
|
|
137
|
+
import pulumi_consul as consul
|
|
138
|
+
import pulumi_example as example
|
|
139
|
+
import pulumi_std as std
|
|
140
|
+
|
|
141
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
142
|
+
datacenter="dc1")
|
|
143
|
+
# Set the description to a whitespace delimited list of the node names
|
|
144
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
145
|
+
input=nodes).result)
|
|
146
|
+
```
|
|
147
|
+
|
|
133
148
|
|
|
134
149
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
135
150
|
same value found in `query_options` parameter specified below, or if that is
|
|
136
151
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
137
152
|
configured to talk to.
|
|
138
|
-
:param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
|
|
139
|
-
and https://www.consul.io/api-docs/catalog#filtering-1.
|
|
140
153
|
:param str name: The service name to select.
|
|
141
154
|
:param Sequence[pulumi.InputType['GetServiceQueryOptionArgs']] query_options: See below.
|
|
142
155
|
:param str tag: A single tag that can be used to filter the list of nodes
|
|
@@ -178,13 +191,26 @@ def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
178
191
|
This data source is different from the `get_services` (plural) data
|
|
179
192
|
source, which provides a summary of the current Consul services.
|
|
180
193
|
|
|
194
|
+
## Example Usage
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
import pulumi
|
|
198
|
+
import pulumi_consul as consul
|
|
199
|
+
import pulumi_example as example
|
|
200
|
+
import pulumi_std as std
|
|
201
|
+
|
|
202
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
203
|
+
datacenter="dc1")
|
|
204
|
+
# Set the description to a whitespace delimited list of the node names
|
|
205
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
206
|
+
input=nodes).result)
|
|
207
|
+
```
|
|
208
|
+
|
|
181
209
|
|
|
182
210
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
183
211
|
same value found in `query_options` parameter specified below, or if that is
|
|
184
212
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
185
213
|
configured to talk to.
|
|
186
|
-
:param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
|
|
187
|
-
and https://www.consul.io/api-docs/catalog#filtering-1.
|
|
188
214
|
:param str name: The service name to select.
|
|
189
215
|
:param Sequence[pulumi.InputType['GetServiceQueryOptionArgs']] query_options: See below.
|
|
190
216
|
:param str tag: A single tag that can be used to filter the list of nodes
|
pulumi_consul/get_services.py
CHANGED
|
@@ -111,6 +111,22 @@ 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
|
+
```python
|
|
117
|
+
import pulumi
|
|
118
|
+
import pulumi_consul as consul
|
|
119
|
+
import pulumi_example as example
|
|
120
|
+
import pulumi_std as std
|
|
121
|
+
|
|
122
|
+
read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
|
|
123
|
+
datacenter="dc1",
|
|
124
|
+
)])
|
|
125
|
+
# Set the description to a whitespace delimited list of the services
|
|
126
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
127
|
+
input=names).result)
|
|
128
|
+
```
|
|
129
|
+
|
|
114
130
|
|
|
115
131
|
:param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
|
|
116
132
|
"""
|
|
@@ -140,6 +156,22 @@ def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[p
|
|
|
140
156
|
This data source is different from the `Service` (singular) data
|
|
141
157
|
source, which provides a detailed response about a specific Consul service.
|
|
142
158
|
|
|
159
|
+
## Example Usage
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
import pulumi
|
|
163
|
+
import pulumi_consul as consul
|
|
164
|
+
import pulumi_example as example
|
|
165
|
+
import pulumi_std as std
|
|
166
|
+
|
|
167
|
+
read_dc1 = consul.get_services(query_options=[consul.GetServicesQueryOptionArgs(
|
|
168
|
+
datacenter="dc1",
|
|
169
|
+
)])
|
|
170
|
+
# Set the description to a whitespace delimited list of the services
|
|
171
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
172
|
+
input=names).result)
|
|
173
|
+
```
|
|
174
|
+
|
|
143
175
|
|
|
144
176
|
:param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
|
|
145
177
|
"""
|