pulumi-consul 3.12.0a1710156214__py3-none-any.whl → 3.13.0a1736849276__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.
- pulumi_consul/__init__.py +10 -0
- pulumi_consul/_inputs.py +1592 -31
- pulumi_consul/_utilities.py +41 -5
- pulumi_consul/acl_auth_method.py +17 -22
- pulumi_consul/acl_binding_rule.py +12 -9
- pulumi_consul/acl_policy.py +7 -6
- pulumi_consul/acl_role.py +37 -32
- pulumi_consul/acl_role_policy_attachment.py +13 -10
- pulumi_consul/acl_token.py +34 -29
- pulumi_consul/acl_token_policy_attachment.py +5 -0
- pulumi_consul/acl_token_role_attachment.py +5 -0
- pulumi_consul/admin_partition.py +11 -6
- pulumi_consul/agent_service.py +7 -4
- pulumi_consul/autopilot_config.py +5 -4
- pulumi_consul/catalog_entry.py +16 -66
- pulumi_consul/certificate_authority.py +8 -49
- pulumi_consul/config/__init__.pyi +5 -0
- pulumi_consul/config/outputs.py +5 -0
- pulumi_consul/config/vars.py +5 -0
- pulumi_consul/config_entry.py +57 -46
- pulumi_consul/config_entry_service_defaults.py +54 -49
- pulumi_consul/config_entry_service_intentions.py +80 -75
- pulumi_consul/config_entry_service_resolver.py +94 -91
- pulumi_consul/config_entry_service_router.py +31 -66
- pulumi_consul/config_entry_service_splitter.py +102 -95
- pulumi_consul/config_entry_v2_exported_services.py +479 -0
- pulumi_consul/get_acl_auth_method.py +26 -12
- pulumi_consul/get_acl_policy.py +20 -9
- pulumi_consul/get_acl_role.py +24 -9
- pulumi_consul/get_acl_token.py +25 -9
- pulumi_consul/get_acl_token_secret_id.py +29 -15
- pulumi_consul/get_agent_config.py +17 -9
- pulumi_consul/get_agent_self.py +82 -5
- pulumi_consul/get_autopilot_health.py +16 -9
- pulumi_consul/get_catalog_nodes.py +21 -9
- pulumi_consul/get_catalog_service.py +56 -13
- pulumi_consul/get_catalog_services.py +53 -9
- pulumi_consul/get_config_entry.py +20 -5
- pulumi_consul/get_config_entry_v2_exported_services.py +232 -0
- pulumi_consul/get_datacenters.py +12 -5
- pulumi_consul/get_key_prefix.py +55 -46
- pulumi_consul/get_keys.py +44 -34
- pulumi_consul/get_network_area_members.py +26 -20
- pulumi_consul/get_network_segments.py +22 -18
- pulumi_consul/get_nodes.py +21 -9
- pulumi_consul/get_peering.py +22 -9
- pulumi_consul/get_peerings.py +14 -9
- pulumi_consul/get_service.py +56 -13
- pulumi_consul/get_service_health.py +28 -5
- pulumi_consul/get_services.py +53 -9
- pulumi_consul/intention.py +15 -18
- pulumi_consul/key_prefix.py +42 -50
- pulumi_consul/keys.py +26 -34
- pulumi_consul/license.py +9 -6
- pulumi_consul/namespace.py +7 -4
- pulumi_consul/namespace_policy_attachment.py +5 -0
- pulumi_consul/namespace_role_attachment.py +5 -0
- pulumi_consul/network_area.py +11 -19
- pulumi_consul/node.py +17 -21
- pulumi_consul/outputs.py +30 -27
- pulumi_consul/peering.py +13 -22
- pulumi_consul/peering_token.py +55 -15
- pulumi_consul/prepared_query.py +99 -103
- pulumi_consul/provider.py +11 -6
- pulumi_consul/pulumi-plugin.json +2 -1
- pulumi_consul/service.py +90 -29
- {pulumi_consul-3.12.0a1710156214.dist-info → pulumi_consul-3.13.0a1736849276.dist-info}/METADATA +7 -6
- pulumi_consul-3.13.0a1736849276.dist-info/RECORD +72 -0
- {pulumi_consul-3.12.0a1710156214.dist-info → pulumi_consul-3.13.0a1736849276.dist-info}/WHEEL +1 -1
- pulumi_consul-3.12.0a1710156214.dist-info/RECORD +0 -70
- {pulumi_consul-3.12.0a1710156214.dist-info → pulumi_consul-3.13.0a1736849276.dist-info}/top_level.txt +0 -0
pulumi_consul/get_peering.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -131,14 +136,12 @@ def get_peering(partition: Optional[str] = None,
|
|
|
131
136
|
"""
|
|
132
137
|
## Example Usage
|
|
133
138
|
|
|
134
|
-
<!--Start PulumiCodeChooser -->
|
|
135
139
|
```python
|
|
136
140
|
import pulumi
|
|
137
141
|
import pulumi_consul as consul
|
|
138
142
|
|
|
139
143
|
basic = consul.get_peering(peer_name="peered-cluster")
|
|
140
144
|
```
|
|
141
|
-
<!--End PulumiCodeChooser -->
|
|
142
145
|
"""
|
|
143
146
|
__args__ = dict()
|
|
144
147
|
__args__['partition'] = partition
|
|
@@ -157,22 +160,32 @@ def get_peering(partition: Optional[str] = None,
|
|
|
157
160
|
peer_server_addresses=pulumi.get(__ret__, 'peer_server_addresses'),
|
|
158
161
|
peer_server_name=pulumi.get(__ret__, 'peer_server_name'),
|
|
159
162
|
state=pulumi.get(__ret__, 'state'))
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@_utilities.lift_output_func(get_peering)
|
|
163
163
|
def get_peering_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
|
|
164
164
|
peer_name: Optional[pulumi.Input[str]] = None,
|
|
165
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPeeringResult]:
|
|
165
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPeeringResult]:
|
|
166
166
|
"""
|
|
167
167
|
## Example Usage
|
|
168
168
|
|
|
169
|
-
<!--Start PulumiCodeChooser -->
|
|
170
169
|
```python
|
|
171
170
|
import pulumi
|
|
172
171
|
import pulumi_consul as consul
|
|
173
172
|
|
|
174
173
|
basic = consul.get_peering(peer_name="peered-cluster")
|
|
175
174
|
```
|
|
176
|
-
<!--End PulumiCodeChooser -->
|
|
177
175
|
"""
|
|
178
|
-
|
|
176
|
+
__args__ = dict()
|
|
177
|
+
__args__['partition'] = partition
|
|
178
|
+
__args__['peerName'] = peer_name
|
|
179
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
180
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getPeering:getPeering', __args__, opts=opts, typ=GetPeeringResult)
|
|
181
|
+
return __ret__.apply(lambda __response__: GetPeeringResult(
|
|
182
|
+
deleted_at=pulumi.get(__response__, 'deleted_at'),
|
|
183
|
+
id=pulumi.get(__response__, 'id'),
|
|
184
|
+
meta=pulumi.get(__response__, 'meta'),
|
|
185
|
+
partition=pulumi.get(__response__, 'partition'),
|
|
186
|
+
peer_ca_pems=pulumi.get(__response__, 'peer_ca_pems'),
|
|
187
|
+
peer_id=pulumi.get(__response__, 'peer_id'),
|
|
188
|
+
peer_name=pulumi.get(__response__, 'peer_name'),
|
|
189
|
+
peer_server_addresses=pulumi.get(__response__, 'peer_server_addresses'),
|
|
190
|
+
peer_server_name=pulumi.get(__response__, 'peer_server_name'),
|
|
191
|
+
state=pulumi.get(__response__, 'state')))
|
pulumi_consul/get_peerings.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
|
|
@@ -68,14 +73,12 @@ def get_peerings(partition: Optional[str] = None,
|
|
|
68
73
|
"""
|
|
69
74
|
## Example Usage
|
|
70
75
|
|
|
71
|
-
<!--Start PulumiCodeChooser -->
|
|
72
76
|
```python
|
|
73
77
|
import pulumi
|
|
74
78
|
import pulumi_consul as consul
|
|
75
79
|
|
|
76
80
|
peers = consul.get_peerings()
|
|
77
81
|
```
|
|
78
|
-
<!--End PulumiCodeChooser -->
|
|
79
82
|
"""
|
|
80
83
|
__args__ = dict()
|
|
81
84
|
__args__['partition'] = partition
|
|
@@ -86,21 +89,23 @@ def get_peerings(partition: Optional[str] = None,
|
|
|
86
89
|
id=pulumi.get(__ret__, 'id'),
|
|
87
90
|
partition=pulumi.get(__ret__, 'partition'),
|
|
88
91
|
peers=pulumi.get(__ret__, 'peers'))
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
@_utilities.lift_output_func(get_peerings)
|
|
92
92
|
def get_peerings_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
|
|
93
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPeeringsResult]:
|
|
93
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPeeringsResult]:
|
|
94
94
|
"""
|
|
95
95
|
## Example Usage
|
|
96
96
|
|
|
97
|
-
<!--Start PulumiCodeChooser -->
|
|
98
97
|
```python
|
|
99
98
|
import pulumi
|
|
100
99
|
import pulumi_consul as consul
|
|
101
100
|
|
|
102
101
|
peers = consul.get_peerings()
|
|
103
102
|
```
|
|
104
|
-
<!--End PulumiCodeChooser -->
|
|
105
103
|
"""
|
|
106
|
-
|
|
104
|
+
__args__ = dict()
|
|
105
|
+
__args__['partition'] = partition
|
|
106
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
107
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getPeerings:getPeerings', __args__, opts=opts, typ=GetPeeringsResult)
|
|
108
|
+
return __ret__.apply(lambda __response__: GetPeeringsResult(
|
|
109
|
+
id=pulumi.get(__response__, 'id'),
|
|
110
|
+
partition=pulumi.get(__response__, 'partition'),
|
|
111
|
+
peers=pulumi.get(__response__, 'peers')))
|
pulumi_consul/get_service.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -117,7 +122,7 @@ class AwaitableGetServiceResult(GetServiceResult):
|
|
|
117
122
|
def get_service(datacenter: Optional[str] = None,
|
|
118
123
|
filter: Optional[str] = None,
|
|
119
124
|
name: Optional[str] = None,
|
|
120
|
-
query_options: Optional[Sequence[
|
|
125
|
+
query_options: Optional[Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']]] = None,
|
|
121
126
|
tag: Optional[str] = None,
|
|
122
127
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServiceResult:
|
|
123
128
|
"""
|
|
@@ -130,15 +135,28 @@ def get_service(datacenter: Optional[str] = None,
|
|
|
130
135
|
This data source is different from the `get_services` (plural) data
|
|
131
136
|
source, which provides a summary of the current Consul services.
|
|
132
137
|
|
|
138
|
+
## Example Usage
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
import pulumi
|
|
142
|
+
import pulumi_consul as consul
|
|
143
|
+
import pulumi_example as example
|
|
144
|
+
import pulumi_std as std
|
|
145
|
+
|
|
146
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
147
|
+
datacenter="dc1")
|
|
148
|
+
# Set the description to a whitespace delimited list of the node names
|
|
149
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
150
|
+
input=nodes).result)
|
|
151
|
+
```
|
|
152
|
+
|
|
133
153
|
|
|
134
154
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
135
155
|
same value found in `query_options` parameter specified below, or if that is
|
|
136
156
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
137
157
|
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
158
|
:param str name: The service name to select.
|
|
141
|
-
:param Sequence[
|
|
159
|
+
:param Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']] query_options: See below.
|
|
142
160
|
:param str tag: A single tag that can be used to filter the list of nodes
|
|
143
161
|
to return based on a single matching tag..
|
|
144
162
|
"""
|
|
@@ -159,15 +177,12 @@ def get_service(datacenter: Optional[str] = None,
|
|
|
159
177
|
query_options=pulumi.get(__ret__, 'query_options'),
|
|
160
178
|
services=pulumi.get(__ret__, 'services'),
|
|
161
179
|
tag=pulumi.get(__ret__, 'tag'))
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
@_utilities.lift_output_func(get_service)
|
|
165
180
|
def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
166
181
|
filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
167
182
|
name: Optional[pulumi.Input[str]] = None,
|
|
168
|
-
query_options: Optional[pulumi.Input[Optional[Sequence[
|
|
183
|
+
query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']]]]] = None,
|
|
169
184
|
tag: Optional[pulumi.Input[Optional[str]]] = None,
|
|
170
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServiceResult]:
|
|
185
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServiceResult]:
|
|
171
186
|
"""
|
|
172
187
|
`Service` provides details about a specific Consul service in a
|
|
173
188
|
given datacenter. The results include a list of nodes advertising the specified
|
|
@@ -178,16 +193,44 @@ def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
178
193
|
This data source is different from the `get_services` (plural) data
|
|
179
194
|
source, which provides a summary of the current Consul services.
|
|
180
195
|
|
|
196
|
+
## Example Usage
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
import pulumi
|
|
200
|
+
import pulumi_consul as consul
|
|
201
|
+
import pulumi_example as example
|
|
202
|
+
import pulumi_std as std
|
|
203
|
+
|
|
204
|
+
read_consul_dc1 = consul.get_service(name="consul",
|
|
205
|
+
datacenter="dc1")
|
|
206
|
+
# Set the description to a whitespace delimited list of the node names
|
|
207
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
208
|
+
input=nodes).result)
|
|
209
|
+
```
|
|
210
|
+
|
|
181
211
|
|
|
182
212
|
:param str datacenter: The Consul datacenter to query. Defaults to the
|
|
183
213
|
same value found in `query_options` parameter specified below, or if that is
|
|
184
214
|
empty, the `datacenter` value found in the Consul agent that this provider is
|
|
185
215
|
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
216
|
:param str name: The service name to select.
|
|
189
|
-
:param Sequence[
|
|
217
|
+
:param Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']] query_options: See below.
|
|
190
218
|
:param str tag: A single tag that can be used to filter the list of nodes
|
|
191
219
|
to return based on a single matching tag..
|
|
192
220
|
"""
|
|
193
|
-
|
|
221
|
+
__args__ = dict()
|
|
222
|
+
__args__['datacenter'] = datacenter
|
|
223
|
+
__args__['filter'] = filter
|
|
224
|
+
__args__['name'] = name
|
|
225
|
+
__args__['queryOptions'] = query_options
|
|
226
|
+
__args__['tag'] = tag
|
|
227
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
228
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getService:getService', __args__, opts=opts, typ=GetServiceResult)
|
|
229
|
+
return __ret__.apply(lambda __response__: GetServiceResult(
|
|
230
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
231
|
+
filter=pulumi.get(__response__, 'filter'),
|
|
232
|
+
id=pulumi.get(__response__, 'id'),
|
|
233
|
+
name=pulumi.get(__response__, 'name'),
|
|
234
|
+
query_options=pulumi.get(__response__, 'query_options'),
|
|
235
|
+
services=pulumi.get(__response__, 'services'),
|
|
236
|
+
tag=pulumi.get(__response__, 'tag')))
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
|
|
@@ -207,9 +212,6 @@ def get_service_health(datacenter: Optional[str] = None,
|
|
|
207
212
|
results=pulumi.get(__ret__, 'results'),
|
|
208
213
|
tag=pulumi.get(__ret__, 'tag'),
|
|
209
214
|
wait_for=pulumi.get(__ret__, 'wait_for'))
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
@_utilities.lift_output_func(get_service_health)
|
|
213
215
|
def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
214
216
|
filter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
215
217
|
name: Optional[pulumi.Input[str]] = None,
|
|
@@ -218,7 +220,7 @@ def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]]
|
|
|
218
220
|
passing: Optional[pulumi.Input[Optional[bool]]] = None,
|
|
219
221
|
tag: Optional[pulumi.Input[Optional[str]]] = None,
|
|
220
222
|
wait_for: Optional[pulumi.Input[Optional[str]]] = None,
|
|
221
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServiceHealthResult]:
|
|
223
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServiceHealthResult]:
|
|
222
224
|
"""
|
|
223
225
|
`get_service_health` can be used to get the list of the instances that
|
|
224
226
|
are currently healthy, according to their associated health-checks.
|
|
@@ -242,4 +244,25 @@ def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]]
|
|
|
242
244
|
:param str tag: A single tag that can be used to filter the list to return
|
|
243
245
|
based on a single matching tag.
|
|
244
246
|
"""
|
|
245
|
-
|
|
247
|
+
__args__ = dict()
|
|
248
|
+
__args__['datacenter'] = datacenter
|
|
249
|
+
__args__['filter'] = filter
|
|
250
|
+
__args__['name'] = name
|
|
251
|
+
__args__['near'] = near
|
|
252
|
+
__args__['nodeMeta'] = node_meta
|
|
253
|
+
__args__['passing'] = passing
|
|
254
|
+
__args__['tag'] = tag
|
|
255
|
+
__args__['waitFor'] = wait_for
|
|
256
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
257
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getServiceHealth:getServiceHealth', __args__, opts=opts, typ=GetServiceHealthResult)
|
|
258
|
+
return __ret__.apply(lambda __response__: GetServiceHealthResult(
|
|
259
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
260
|
+
filter=pulumi.get(__response__, 'filter'),
|
|
261
|
+
id=pulumi.get(__response__, 'id'),
|
|
262
|
+
name=pulumi.get(__response__, 'name'),
|
|
263
|
+
near=pulumi.get(__response__, 'near'),
|
|
264
|
+
node_meta=pulumi.get(__response__, 'node_meta'),
|
|
265
|
+
passing=pulumi.get(__response__, 'passing'),
|
|
266
|
+
results=pulumi.get(__response__, 'results'),
|
|
267
|
+
tag=pulumi.get(__response__, 'tag'),
|
|
268
|
+
wait_for=pulumi.get(__response__, 'wait_for')))
|
pulumi_consul/get_services.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -100,7 +105,7 @@ class AwaitableGetServicesResult(GetServicesResult):
|
|
|
100
105
|
tags=self.tags)
|
|
101
106
|
|
|
102
107
|
|
|
103
|
-
def get_services(query_options: Optional[Sequence[
|
|
108
|
+
def get_services(query_options: Optional[Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']]] = None,
|
|
104
109
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServicesResult:
|
|
105
110
|
"""
|
|
106
111
|
The `get_services` data source returns a list of Consul services that
|
|
@@ -111,8 +116,24 @@ def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQ
|
|
|
111
116
|
This data source is different from the `Service` (singular) data
|
|
112
117
|
source, which provides a detailed response about a specific Consul service.
|
|
113
118
|
|
|
119
|
+
## Example Usage
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
```python
|
|
122
|
+
import pulumi
|
|
123
|
+
import pulumi_consul as consul
|
|
124
|
+
import pulumi_example as example
|
|
125
|
+
import pulumi_std as std
|
|
126
|
+
|
|
127
|
+
read_dc1 = consul.get_services(query_options=[{
|
|
128
|
+
"datacenter": "dc1",
|
|
129
|
+
}])
|
|
130
|
+
# Set the description to a whitespace delimited list of the services
|
|
131
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
132
|
+
input=names).result)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
:param Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']] query_options: See below.
|
|
116
137
|
"""
|
|
117
138
|
__args__ = dict()
|
|
118
139
|
__args__['queryOptions'] = query_options
|
|
@@ -126,11 +147,8 @@ def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQ
|
|
|
126
147
|
query_options=pulumi.get(__ret__, 'query_options'),
|
|
127
148
|
services=pulumi.get(__ret__, 'services'),
|
|
128
149
|
tags=pulumi.get(__ret__, 'tags'))
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
@_utilities.lift_output_func(get_services)
|
|
132
|
-
def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetServicesQueryOptionArgs']]]]] = None,
|
|
133
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServicesResult]:
|
|
150
|
+
def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']]]]] = None,
|
|
151
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServicesResult]:
|
|
134
152
|
"""
|
|
135
153
|
The `get_services` data source returns a list of Consul services that
|
|
136
154
|
have been registered with the Consul cluster in a given datacenter. By
|
|
@@ -140,7 +158,33 @@ 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
|
|
143
162
|
|
|
144
|
-
|
|
163
|
+
```python
|
|
164
|
+
import pulumi
|
|
165
|
+
import pulumi_consul as consul
|
|
166
|
+
import pulumi_example as example
|
|
167
|
+
import pulumi_std as std
|
|
168
|
+
|
|
169
|
+
read_dc1 = consul.get_services(query_options=[{
|
|
170
|
+
"datacenter": "dc1",
|
|
171
|
+
}])
|
|
172
|
+
# Set the description to a whitespace delimited list of the services
|
|
173
|
+
app = example.index.Resource("app", description=std.join(separator= ,
|
|
174
|
+
input=names).result)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
:param Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']] query_options: See below.
|
|
145
179
|
"""
|
|
146
|
-
|
|
180
|
+
__args__ = dict()
|
|
181
|
+
__args__['queryOptions'] = query_options
|
|
182
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
183
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getServices:getServices', __args__, opts=opts, typ=GetServicesResult)
|
|
184
|
+
return __ret__.apply(lambda __response__: GetServicesResult(
|
|
185
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
186
|
+
id=pulumi.get(__response__, 'id'),
|
|
187
|
+
names=pulumi.get(__response__, 'names'),
|
|
188
|
+
query_options=pulumi.get(__response__, 'query_options'),
|
|
189
|
+
services=pulumi.get(__response__, 'services'),
|
|
190
|
+
tags=pulumi.get(__response__, 'tags')))
|
pulumi_consul/intention.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = ['IntentionArgs', 'Intention']
|
|
@@ -341,32 +346,28 @@ class Intention(pulumi.CustomResource):
|
|
|
341
346
|
|
|
342
347
|
Create a simplest intention with static service names:
|
|
343
348
|
|
|
344
|
-
<!--Start PulumiCodeChooser -->
|
|
345
349
|
```python
|
|
346
350
|
import pulumi
|
|
347
351
|
import pulumi_consul as consul
|
|
348
352
|
|
|
349
353
|
database = consul.Intention("database",
|
|
350
|
-
|
|
354
|
+
source_name="api",
|
|
351
355
|
destination_name="db",
|
|
352
|
-
|
|
356
|
+
action="allow")
|
|
353
357
|
```
|
|
354
|
-
<!--End PulumiCodeChooser -->
|
|
355
358
|
|
|
356
359
|
Referencing a known service via a datasource:
|
|
357
360
|
|
|
358
|
-
<!--Start PulumiCodeChooser -->
|
|
359
361
|
```python
|
|
360
362
|
import pulumi
|
|
361
363
|
import pulumi_consul as consul
|
|
362
364
|
|
|
363
365
|
database = consul.Intention("database",
|
|
364
|
-
|
|
365
|
-
destination_name=
|
|
366
|
-
|
|
366
|
+
source_name="api",
|
|
367
|
+
destination_name=pg_consul_service["name"],
|
|
368
|
+
action="allow")
|
|
367
369
|
pg = consul.get_service(name="postgresql")
|
|
368
370
|
```
|
|
369
|
-
<!--End PulumiCodeChooser -->
|
|
370
371
|
|
|
371
372
|
## Import
|
|
372
373
|
|
|
@@ -419,32 +420,28 @@ class Intention(pulumi.CustomResource):
|
|
|
419
420
|
|
|
420
421
|
Create a simplest intention with static service names:
|
|
421
422
|
|
|
422
|
-
<!--Start PulumiCodeChooser -->
|
|
423
423
|
```python
|
|
424
424
|
import pulumi
|
|
425
425
|
import pulumi_consul as consul
|
|
426
426
|
|
|
427
427
|
database = consul.Intention("database",
|
|
428
|
-
|
|
428
|
+
source_name="api",
|
|
429
429
|
destination_name="db",
|
|
430
|
-
|
|
430
|
+
action="allow")
|
|
431
431
|
```
|
|
432
|
-
<!--End PulumiCodeChooser -->
|
|
433
432
|
|
|
434
433
|
Referencing a known service via a datasource:
|
|
435
434
|
|
|
436
|
-
<!--Start PulumiCodeChooser -->
|
|
437
435
|
```python
|
|
438
436
|
import pulumi
|
|
439
437
|
import pulumi_consul as consul
|
|
440
438
|
|
|
441
439
|
database = consul.Intention("database",
|
|
442
|
-
|
|
443
|
-
destination_name=
|
|
444
|
-
|
|
440
|
+
source_name="api",
|
|
441
|
+
destination_name=pg_consul_service["name"],
|
|
442
|
+
action="allow")
|
|
445
443
|
pg = consul.get_service(name="postgresql")
|
|
446
444
|
```
|
|
447
|
-
<!--End PulumiCodeChooser -->
|
|
448
445
|
|
|
449
446
|
## Import
|
|
450
447
|
|