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_key_prefix.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 *
|
|
@@ -104,12 +109,9 @@ class GetKeyPrefixResult:
|
|
|
104
109
|
|
|
105
110
|
@property
|
|
106
111
|
@pulumi.getter
|
|
107
|
-
|
|
108
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
109
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
110
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
112
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
111
113
|
Please use the token argument in the provider configuration""")
|
|
112
|
-
|
|
114
|
+
def token(self) -> Optional[str]:
|
|
113
115
|
return pulumi.get(self, "token")
|
|
114
116
|
|
|
115
117
|
@property
|
|
@@ -139,44 +141,40 @@ def get_key_prefix(datacenter: Optional[str] = None,
|
|
|
139
141
|
namespace: Optional[str] = None,
|
|
140
142
|
partition: Optional[str] = None,
|
|
141
143
|
path_prefix: Optional[str] = None,
|
|
142
|
-
subkey_collection: Optional[Sequence[
|
|
144
|
+
subkey_collection: Optional[Sequence[Union['GetKeyPrefixSubkeyCollectionArgs', 'GetKeyPrefixSubkeyCollectionArgsDict']]] = None,
|
|
143
145
|
token: Optional[str] = None,
|
|
144
146
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKeyPrefixResult:
|
|
145
147
|
"""
|
|
146
148
|
## Example Usage
|
|
147
149
|
|
|
148
|
-
<!--Start PulumiCodeChooser -->
|
|
149
150
|
```python
|
|
150
151
|
import pulumi
|
|
151
152
|
import pulumi_aws as aws
|
|
152
153
|
import pulumi_consul as consul
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
app = consul.get_key_prefix(datacenter="nyc1",
|
|
156
|
+
token="abcd",
|
|
155
157
|
path_prefix="myapp/config/",
|
|
156
|
-
subkey_collection=[
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
)
|
|
161
|
-
token="abcd")
|
|
158
|
+
subkey_collection=[{
|
|
159
|
+
"name": "ami",
|
|
160
|
+
"path": "app/launch_ami",
|
|
161
|
+
"default": "ami-1234",
|
|
162
|
+
}])
|
|
162
163
|
# Start our instance with the dynamic ami value
|
|
163
|
-
app_instance = aws.
|
|
164
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
164
165
|
```
|
|
165
|
-
<!--End PulumiCodeChooser -->
|
|
166
166
|
|
|
167
|
-
<!--Start PulumiCodeChooser -->
|
|
168
167
|
```python
|
|
169
168
|
import pulumi
|
|
170
169
|
import pulumi_aws as aws
|
|
171
170
|
import pulumi_consul as consul
|
|
172
171
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
web = consul.get_key_prefix(datacenter="nyc1",
|
|
173
|
+
token="efgh",
|
|
174
|
+
path_prefix="myapp/config/")
|
|
176
175
|
# Start our instance with the dynamic ami value
|
|
177
|
-
web_instance = aws.
|
|
176
|
+
web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
|
|
178
177
|
```
|
|
179
|
-
<!--End PulumiCodeChooser -->
|
|
180
178
|
|
|
181
179
|
|
|
182
180
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -186,7 +184,7 @@ def get_key_prefix(datacenter: Optional[str] = None,
|
|
|
186
184
|
:param str path_prefix: Specifies the common prefix shared by all keys
|
|
187
185
|
that will be read by this data source instance. In most cases, this will
|
|
188
186
|
end with a slash to read a "folder" of subkeys.
|
|
189
|
-
:param Sequence[
|
|
187
|
+
:param Sequence[Union['GetKeyPrefixSubkeyCollectionArgs', 'GetKeyPrefixSubkeyCollectionArgsDict']] subkey_collection: Specifies a subkey in Consul to be read. Supported
|
|
190
188
|
values documented below. Multiple blocks supported.
|
|
191
189
|
:param str token: The ACL token to use. This overrides the
|
|
192
190
|
token that the agent provides by default.
|
|
@@ -211,51 +209,44 @@ def get_key_prefix(datacenter: Optional[str] = None,
|
|
|
211
209
|
subkeys=pulumi.get(__ret__, 'subkeys'),
|
|
212
210
|
token=pulumi.get(__ret__, 'token'),
|
|
213
211
|
var=pulumi.get(__ret__, 'var'))
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
@_utilities.lift_output_func(get_key_prefix)
|
|
217
212
|
def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
218
213
|
namespace: Optional[pulumi.Input[Optional[str]]] = None,
|
|
219
214
|
partition: Optional[pulumi.Input[Optional[str]]] = None,
|
|
220
215
|
path_prefix: Optional[pulumi.Input[str]] = None,
|
|
221
|
-
subkey_collection: Optional[pulumi.Input[Optional[Sequence[
|
|
216
|
+
subkey_collection: Optional[pulumi.Input[Optional[Sequence[Union['GetKeyPrefixSubkeyCollectionArgs', 'GetKeyPrefixSubkeyCollectionArgsDict']]]]] = None,
|
|
222
217
|
token: Optional[pulumi.Input[Optional[str]]] = None,
|
|
223
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetKeyPrefixResult]:
|
|
218
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeyPrefixResult]:
|
|
224
219
|
"""
|
|
225
220
|
## Example Usage
|
|
226
221
|
|
|
227
|
-
<!--Start PulumiCodeChooser -->
|
|
228
222
|
```python
|
|
229
223
|
import pulumi
|
|
230
224
|
import pulumi_aws as aws
|
|
231
225
|
import pulumi_consul as consul
|
|
232
226
|
|
|
233
|
-
|
|
227
|
+
app = consul.get_key_prefix(datacenter="nyc1",
|
|
228
|
+
token="abcd",
|
|
234
229
|
path_prefix="myapp/config/",
|
|
235
|
-
subkey_collection=[
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
)
|
|
240
|
-
token="abcd")
|
|
230
|
+
subkey_collection=[{
|
|
231
|
+
"name": "ami",
|
|
232
|
+
"path": "app/launch_ami",
|
|
233
|
+
"default": "ami-1234",
|
|
234
|
+
}])
|
|
241
235
|
# Start our instance with the dynamic ami value
|
|
242
|
-
app_instance = aws.
|
|
236
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
243
237
|
```
|
|
244
|
-
<!--End PulumiCodeChooser -->
|
|
245
238
|
|
|
246
|
-
<!--Start PulumiCodeChooser -->
|
|
247
239
|
```python
|
|
248
240
|
import pulumi
|
|
249
241
|
import pulumi_aws as aws
|
|
250
242
|
import pulumi_consul as consul
|
|
251
243
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
244
|
+
web = consul.get_key_prefix(datacenter="nyc1",
|
|
245
|
+
token="efgh",
|
|
246
|
+
path_prefix="myapp/config/")
|
|
255
247
|
# Start our instance with the dynamic ami value
|
|
256
|
-
web_instance = aws.
|
|
248
|
+
web_instance = aws.index.Instance("web", ami=web.subkeys.app_launch_ami)
|
|
257
249
|
```
|
|
258
|
-
<!--End PulumiCodeChooser -->
|
|
259
250
|
|
|
260
251
|
|
|
261
252
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -265,9 +256,27 @@ def get_key_prefix_output(datacenter: Optional[pulumi.Input[Optional[str]]] = No
|
|
|
265
256
|
:param str path_prefix: Specifies the common prefix shared by all keys
|
|
266
257
|
that will be read by this data source instance. In most cases, this will
|
|
267
258
|
end with a slash to read a "folder" of subkeys.
|
|
268
|
-
:param Sequence[
|
|
259
|
+
:param Sequence[Union['GetKeyPrefixSubkeyCollectionArgs', 'GetKeyPrefixSubkeyCollectionArgsDict']] subkey_collection: Specifies a subkey in Consul to be read. Supported
|
|
269
260
|
values documented below. Multiple blocks supported.
|
|
270
261
|
:param str token: The ACL token to use. This overrides the
|
|
271
262
|
token that the agent provides by default.
|
|
272
263
|
"""
|
|
273
|
-
|
|
264
|
+
__args__ = dict()
|
|
265
|
+
__args__['datacenter'] = datacenter
|
|
266
|
+
__args__['namespace'] = namespace
|
|
267
|
+
__args__['partition'] = partition
|
|
268
|
+
__args__['pathPrefix'] = path_prefix
|
|
269
|
+
__args__['subkeyCollection'] = subkey_collection
|
|
270
|
+
__args__['token'] = token
|
|
271
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
272
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getKeyPrefix:getKeyPrefix', __args__, opts=opts, typ=GetKeyPrefixResult)
|
|
273
|
+
return __ret__.apply(lambda __response__: GetKeyPrefixResult(
|
|
274
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
275
|
+
id=pulumi.get(__response__, 'id'),
|
|
276
|
+
namespace=pulumi.get(__response__, 'namespace'),
|
|
277
|
+
partition=pulumi.get(__response__, 'partition'),
|
|
278
|
+
path_prefix=pulumi.get(__response__, 'path_prefix'),
|
|
279
|
+
subkey_collection=pulumi.get(__response__, 'subkey_collection'),
|
|
280
|
+
subkeys=pulumi.get(__response__, 'subkeys'),
|
|
281
|
+
token=pulumi.get(__response__, 'token'),
|
|
282
|
+
var=pulumi.get(__response__, 'var')))
|
pulumi_consul/get_keys.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 *
|
|
@@ -99,15 +104,12 @@ class GetKeysResult:
|
|
|
99
104
|
|
|
100
105
|
@property
|
|
101
106
|
@pulumi.getter
|
|
107
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
108
|
+
Please use the token argument in the provider configuration""")
|
|
102
109
|
def token(self) -> Optional[str]:
|
|
103
110
|
"""
|
|
104
111
|
The ACL token to use. This overrides the token that the agent provides by default.
|
|
105
112
|
"""
|
|
106
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
107
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
108
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
109
|
-
Please use the token argument in the provider configuration""")
|
|
110
|
-
|
|
111
113
|
return pulumi.get(self, "token")
|
|
112
114
|
|
|
113
115
|
@property
|
|
@@ -137,7 +139,7 @@ class AwaitableGetKeysResult(GetKeysResult):
|
|
|
137
139
|
|
|
138
140
|
def get_keys(datacenter: Optional[str] = None,
|
|
139
141
|
error_on_missing_keys: Optional[bool] = None,
|
|
140
|
-
keys: Optional[Sequence[
|
|
142
|
+
keys: Optional[Sequence[Union['GetKeysKeyArgs', 'GetKeysKeyArgsDict']]] = None,
|
|
141
143
|
namespace: Optional[str] = None,
|
|
142
144
|
partition: Optional[str] = None,
|
|
143
145
|
token: Optional[str] = None,
|
|
@@ -147,28 +149,25 @@ def get_keys(datacenter: Optional[str] = None,
|
|
|
147
149
|
|
|
148
150
|
## Example Usage
|
|
149
151
|
|
|
150
|
-
<!--Start PulumiCodeChooser -->
|
|
151
152
|
```python
|
|
152
153
|
import pulumi
|
|
153
154
|
import pulumi_aws as aws
|
|
154
155
|
import pulumi_consul as consul
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
keys=[
|
|
158
|
-
name
|
|
159
|
-
path
|
|
160
|
-
default
|
|
161
|
-
|
|
157
|
+
app = consul.get_keys(datacenter="nyc1",
|
|
158
|
+
keys=[{
|
|
159
|
+
"name": "ami",
|
|
160
|
+
"path": "service/app/launch_ami",
|
|
161
|
+
"default": "ami-1234",
|
|
162
|
+
}])
|
|
162
163
|
# Start our instance with the dynamic ami value
|
|
163
|
-
app_instance = aws.
|
|
164
|
-
# ...
|
|
164
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
165
165
|
```
|
|
166
|
-
<!--End PulumiCodeChooser -->
|
|
167
166
|
|
|
168
167
|
|
|
169
168
|
:param str datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
170
169
|
:param bool error_on_missing_keys: Whether to return an error when a key is absent from the KV store and no default is configured. This defaults to `false`.
|
|
171
|
-
:param Sequence[
|
|
170
|
+
:param Sequence[Union['GetKeysKeyArgs', 'GetKeysKeyArgsDict']] keys: Specifies a key in Consul to be read. Supported values documented below. Multiple blocks supported.
|
|
172
171
|
:param str namespace: The namespace to lookup the keys.
|
|
173
172
|
:param str partition: The partition to lookup the keys.
|
|
174
173
|
:param str token: The ACL token to use. This overrides the token that the agent provides by default.
|
|
@@ -192,45 +191,56 @@ def get_keys(datacenter: Optional[str] = None,
|
|
|
192
191
|
partition=pulumi.get(__ret__, 'partition'),
|
|
193
192
|
token=pulumi.get(__ret__, 'token'),
|
|
194
193
|
var=pulumi.get(__ret__, 'var'))
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
@_utilities.lift_output_func(get_keys)
|
|
198
194
|
def get_keys_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
199
195
|
error_on_missing_keys: Optional[pulumi.Input[Optional[bool]]] = None,
|
|
200
|
-
keys: Optional[pulumi.Input[Optional[Sequence[
|
|
196
|
+
keys: Optional[pulumi.Input[Optional[Sequence[Union['GetKeysKeyArgs', 'GetKeysKeyArgsDict']]]]] = None,
|
|
201
197
|
namespace: Optional[pulumi.Input[Optional[str]]] = None,
|
|
202
198
|
partition: Optional[pulumi.Input[Optional[str]]] = None,
|
|
203
199
|
token: Optional[pulumi.Input[Optional[str]]] = None,
|
|
204
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetKeysResult]:
|
|
200
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeysResult]:
|
|
205
201
|
"""
|
|
206
202
|
The `Keys` datasource reads values from the Consul key/value store. This is a powerful way to dynamically set values in templates.
|
|
207
203
|
|
|
208
204
|
## Example Usage
|
|
209
205
|
|
|
210
|
-
<!--Start PulumiCodeChooser -->
|
|
211
206
|
```python
|
|
212
207
|
import pulumi
|
|
213
208
|
import pulumi_aws as aws
|
|
214
209
|
import pulumi_consul as consul
|
|
215
210
|
|
|
216
|
-
|
|
217
|
-
keys=[
|
|
218
|
-
name
|
|
219
|
-
path
|
|
220
|
-
default
|
|
221
|
-
|
|
211
|
+
app = consul.get_keys(datacenter="nyc1",
|
|
212
|
+
keys=[{
|
|
213
|
+
"name": "ami",
|
|
214
|
+
"path": "service/app/launch_ami",
|
|
215
|
+
"default": "ami-1234",
|
|
216
|
+
}])
|
|
222
217
|
# Start our instance with the dynamic ami value
|
|
223
|
-
app_instance = aws.
|
|
224
|
-
# ...
|
|
218
|
+
app_instance = aws.index.Instance("app", ami=app.var.ami)
|
|
225
219
|
```
|
|
226
|
-
<!--End PulumiCodeChooser -->
|
|
227
220
|
|
|
228
221
|
|
|
229
222
|
:param str datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
230
223
|
:param bool error_on_missing_keys: Whether to return an error when a key is absent from the KV store and no default is configured. This defaults to `false`.
|
|
231
|
-
:param Sequence[
|
|
224
|
+
:param Sequence[Union['GetKeysKeyArgs', 'GetKeysKeyArgsDict']] keys: Specifies a key in Consul to be read. Supported values documented below. Multiple blocks supported.
|
|
232
225
|
:param str namespace: The namespace to lookup the keys.
|
|
233
226
|
:param str partition: The partition to lookup the keys.
|
|
234
227
|
:param str token: The ACL token to use. This overrides the token that the agent provides by default.
|
|
235
228
|
"""
|
|
236
|
-
|
|
229
|
+
__args__ = dict()
|
|
230
|
+
__args__['datacenter'] = datacenter
|
|
231
|
+
__args__['errorOnMissingKeys'] = error_on_missing_keys
|
|
232
|
+
__args__['keys'] = keys
|
|
233
|
+
__args__['namespace'] = namespace
|
|
234
|
+
__args__['partition'] = partition
|
|
235
|
+
__args__['token'] = token
|
|
236
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
237
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getKeys:getKeys', __args__, opts=opts, typ=GetKeysResult)
|
|
238
|
+
return __ret__.apply(lambda __response__: GetKeysResult(
|
|
239
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
240
|
+
error_on_missing_keys=pulumi.get(__response__, 'error_on_missing_keys'),
|
|
241
|
+
id=pulumi.get(__response__, 'id'),
|
|
242
|
+
keys=pulumi.get(__response__, 'keys'),
|
|
243
|
+
namespace=pulumi.get(__response__, 'namespace'),
|
|
244
|
+
partition=pulumi.get(__response__, 'partition'),
|
|
245
|
+
token=pulumi.get(__response__, 'token'),
|
|
246
|
+
var=pulumi.get(__response__, 'var')))
|
|
@@ -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
|
|
|
@@ -65,12 +70,9 @@ class GetNetworkAreaMembersResult:
|
|
|
65
70
|
|
|
66
71
|
@property
|
|
67
72
|
@pulumi.getter
|
|
68
|
-
|
|
69
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
70
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
71
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
73
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
72
74
|
Please use the token argument in the provider configuration""")
|
|
73
|
-
|
|
75
|
+
def token(self) -> Optional[str]:
|
|
74
76
|
return pulumi.get(self, "token")
|
|
75
77
|
|
|
76
78
|
@property
|
|
@@ -107,19 +109,17 @@ def get_network_area_members(datacenter: Optional[str] = None,
|
|
|
107
109
|
|
|
108
110
|
## Example Usage
|
|
109
111
|
|
|
110
|
-
<!--Start PulumiCodeChooser -->
|
|
111
112
|
```python
|
|
112
113
|
import pulumi
|
|
113
114
|
import pulumi_consul as consul
|
|
114
115
|
|
|
115
|
-
dc2_network_area = consul.NetworkArea("
|
|
116
|
+
dc2_network_area = consul.NetworkArea("dc2",
|
|
116
117
|
peer_datacenter="dc2",
|
|
117
118
|
retry_joins=["1.2.3.4"],
|
|
118
119
|
use_tls=True)
|
|
119
|
-
|
|
120
|
-
pulumi.export("members",
|
|
120
|
+
dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
|
|
121
|
+
pulumi.export("members", dc2.members)
|
|
121
122
|
```
|
|
122
|
-
<!--End PulumiCodeChooser -->
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -141,13 +141,10 @@ def get_network_area_members(datacenter: Optional[str] = None,
|
|
|
141
141
|
members=pulumi.get(__ret__, 'members'),
|
|
142
142
|
token=pulumi.get(__ret__, 'token'),
|
|
143
143
|
uuid=pulumi.get(__ret__, 'uuid'))
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
@_utilities.lift_output_func(get_network_area_members)
|
|
147
144
|
def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
148
145
|
token: Optional[pulumi.Input[Optional[str]]] = None,
|
|
149
146
|
uuid: Optional[pulumi.Input[str]] = None,
|
|
150
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkAreaMembersResult]:
|
|
147
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkAreaMembersResult]:
|
|
151
148
|
"""
|
|
152
149
|
> **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html).
|
|
153
150
|
|
|
@@ -156,19 +153,17 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
|
|
|
156
153
|
|
|
157
154
|
## Example Usage
|
|
158
155
|
|
|
159
|
-
<!--Start PulumiCodeChooser -->
|
|
160
156
|
```python
|
|
161
157
|
import pulumi
|
|
162
158
|
import pulumi_consul as consul
|
|
163
159
|
|
|
164
|
-
dc2_network_area = consul.NetworkArea("
|
|
160
|
+
dc2_network_area = consul.NetworkArea("dc2",
|
|
165
161
|
peer_datacenter="dc2",
|
|
166
162
|
retry_joins=["1.2.3.4"],
|
|
167
163
|
use_tls=True)
|
|
168
|
-
|
|
169
|
-
pulumi.export("members",
|
|
164
|
+
dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
|
|
165
|
+
pulumi.export("members", dc2.members)
|
|
170
166
|
```
|
|
171
|
-
<!--End PulumiCodeChooser -->
|
|
172
167
|
|
|
173
168
|
|
|
174
169
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -177,4 +172,15 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
|
|
|
177
172
|
token that the agent provides by default.
|
|
178
173
|
:param str uuid: The UUID of the area to list.
|
|
179
174
|
"""
|
|
180
|
-
|
|
175
|
+
__args__ = dict()
|
|
176
|
+
__args__['datacenter'] = datacenter
|
|
177
|
+
__args__['token'] = token
|
|
178
|
+
__args__['uuid'] = uuid
|
|
179
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
180
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getNetworkAreaMembers:getNetworkAreaMembers', __args__, opts=opts, typ=GetNetworkAreaMembersResult)
|
|
181
|
+
return __ret__.apply(lambda __response__: GetNetworkAreaMembersResult(
|
|
182
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
183
|
+
id=pulumi.get(__response__, 'id'),
|
|
184
|
+
members=pulumi.get(__response__, 'members'),
|
|
185
|
+
token=pulumi.get(__response__, 'token'),
|
|
186
|
+
uuid=pulumi.get(__response__, 'uuid')))
|
|
@@ -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__ = [
|
|
@@ -61,12 +66,9 @@ class GetNetworkSegmentsResult:
|
|
|
61
66
|
|
|
62
67
|
@property
|
|
63
68
|
@pulumi.getter
|
|
64
|
-
|
|
65
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
66
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
67
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
69
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
68
70
|
Please use the token argument in the provider configuration""")
|
|
69
|
-
|
|
71
|
+
def token(self) -> Optional[str]:
|
|
70
72
|
return pulumi.get(self, "token")
|
|
71
73
|
|
|
72
74
|
|
|
@@ -93,15 +95,13 @@ def get_network_segments(datacenter: Optional[str] = None,
|
|
|
93
95
|
|
|
94
96
|
## Example Usage
|
|
95
97
|
|
|
96
|
-
<!--Start PulumiCodeChooser -->
|
|
97
98
|
```python
|
|
98
99
|
import pulumi
|
|
99
100
|
import pulumi_consul as consul
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
pulumi.export("segments",
|
|
102
|
+
segments = consul.get_network_segments()
|
|
103
|
+
pulumi.export("segments", segments.segments)
|
|
103
104
|
```
|
|
104
|
-
<!--End PulumiCodeChooser -->
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -120,12 +120,9 @@ def get_network_segments(datacenter: Optional[str] = None,
|
|
|
120
120
|
id=pulumi.get(__ret__, 'id'),
|
|
121
121
|
segments=pulumi.get(__ret__, 'segments'),
|
|
122
122
|
token=pulumi.get(__ret__, 'token'))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@_utilities.lift_output_func(get_network_segments)
|
|
126
123
|
def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
|
|
127
124
|
token: Optional[pulumi.Input[Optional[str]]] = None,
|
|
128
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkSegmentsResult]:
|
|
125
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkSegmentsResult]:
|
|
129
126
|
"""
|
|
130
127
|
> **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html).
|
|
131
128
|
|
|
@@ -134,15 +131,13 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
|
|
|
134
131
|
|
|
135
132
|
## Example Usage
|
|
136
133
|
|
|
137
|
-
<!--Start PulumiCodeChooser -->
|
|
138
134
|
```python
|
|
139
135
|
import pulumi
|
|
140
136
|
import pulumi_consul as consul
|
|
141
137
|
|
|
142
|
-
|
|
143
|
-
pulumi.export("segments",
|
|
138
|
+
segments = consul.get_network_segments()
|
|
139
|
+
pulumi.export("segments", segments.segments)
|
|
144
140
|
```
|
|
145
|
-
<!--End PulumiCodeChooser -->
|
|
146
141
|
|
|
147
142
|
|
|
148
143
|
:param str datacenter: The datacenter to use. This overrides the
|
|
@@ -150,4 +145,13 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
|
|
|
150
145
|
:param str token: The ACL token to use. This overrides the
|
|
151
146
|
token that the agent provides by default.
|
|
152
147
|
"""
|
|
153
|
-
|
|
148
|
+
__args__ = dict()
|
|
149
|
+
__args__['datacenter'] = datacenter
|
|
150
|
+
__args__['token'] = token
|
|
151
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
152
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getNetworkSegments:getNetworkSegments', __args__, opts=opts, typ=GetNetworkSegmentsResult)
|
|
153
|
+
return __ret__.apply(lambda __response__: GetNetworkSegmentsResult(
|
|
154
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
155
|
+
id=pulumi.get(__response__, 'id'),
|
|
156
|
+
segments=pulumi.get(__response__, 'segments'),
|
|
157
|
+
token=pulumi.get(__response__, 'token')))
|
pulumi_consul/get_nodes.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 *
|
|
@@ -104,7 +109,7 @@ class AwaitableGetNodesResult(GetNodesResult):
|
|
|
104
109
|
query_options=self.query_options)
|
|
105
110
|
|
|
106
111
|
|
|
107
|
-
def get_nodes(query_options: Optional[Sequence[
|
|
112
|
+
def get_nodes(query_options: Optional[Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']]] = None,
|
|
108
113
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodesResult:
|
|
109
114
|
"""
|
|
110
115
|
The `get_nodes` data source returns a list of Consul nodes that have
|
|
@@ -113,7 +118,7 @@ def get_nodes(query_options: Optional[Sequence[pulumi.InputType['GetNodesQueryOp
|
|
|
113
118
|
nodes from a different WAN-attached Consul datacenter.
|
|
114
119
|
|
|
115
120
|
|
|
116
|
-
:param Sequence[
|
|
121
|
+
:param Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']] query_options: See below.
|
|
117
122
|
"""
|
|
118
123
|
__args__ = dict()
|
|
119
124
|
__args__['queryOptions'] = query_options
|
|
@@ -127,11 +132,8 @@ def get_nodes(query_options: Optional[Sequence[pulumi.InputType['GetNodesQueryOp
|
|
|
127
132
|
node_names=pulumi.get(__ret__, 'node_names'),
|
|
128
133
|
nodes=pulumi.get(__ret__, 'nodes'),
|
|
129
134
|
query_options=pulumi.get(__ret__, 'query_options'))
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
@_utilities.lift_output_func(get_nodes)
|
|
133
|
-
def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNodesQueryOptionArgs']]]]] = None,
|
|
134
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodesResult]:
|
|
135
|
+
def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']]]]] = None,
|
|
136
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNodesResult]:
|
|
135
137
|
"""
|
|
136
138
|
The `get_nodes` data source returns a list of Consul nodes that have
|
|
137
139
|
been registered with the Consul cluster in a given datacenter. By specifying a
|
|
@@ -139,6 +141,16 @@ def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulu
|
|
|
139
141
|
nodes from a different WAN-attached Consul datacenter.
|
|
140
142
|
|
|
141
143
|
|
|
142
|
-
:param Sequence[
|
|
144
|
+
:param Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']] query_options: See below.
|
|
143
145
|
"""
|
|
144
|
-
|
|
146
|
+
__args__ = dict()
|
|
147
|
+
__args__['queryOptions'] = query_options
|
|
148
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
149
|
+
__ret__ = pulumi.runtime.invoke_output('consul:index/getNodes:getNodes', __args__, opts=opts, typ=GetNodesResult)
|
|
150
|
+
return __ret__.apply(lambda __response__: GetNodesResult(
|
|
151
|
+
datacenter=pulumi.get(__response__, 'datacenter'),
|
|
152
|
+
id=pulumi.get(__response__, 'id'),
|
|
153
|
+
node_ids=pulumi.get(__response__, 'node_ids'),
|
|
154
|
+
node_names=pulumi.get(__response__, 'node_names'),
|
|
155
|
+
nodes=pulumi.get(__response__, 'nodes'),
|
|
156
|
+
query_options=pulumi.get(__response__, 'query_options')))
|