pulumi-consul 3.12.0a1710156214__py3-none-any.whl → 3.13.0a1736832526__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.0a1736832526.dist-info}/METADATA +7 -6
- pulumi_consul-3.13.0a1736832526.dist-info/RECORD +72 -0
- {pulumi_consul-3.12.0a1710156214.dist-info → pulumi_consul-3.13.0a1736832526.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.0a1736832526.dist-info}/top_level.txt +0 -0
pulumi_consul/node.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__ = ['NodeArgs', 'Node']
|
|
@@ -107,12 +112,9 @@ Please use the token argument in the provider configuration""")
|
|
|
107
112
|
|
|
108
113
|
@property
|
|
109
114
|
@pulumi.getter
|
|
110
|
-
|
|
111
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
112
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
113
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
115
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
114
116
|
Please use the token argument in the provider configuration""")
|
|
115
|
-
|
|
117
|
+
def token(self) -> Optional[pulumi.Input[str]]:
|
|
116
118
|
return pulumi.get(self, "token")
|
|
117
119
|
|
|
118
120
|
@token.setter
|
|
@@ -217,12 +219,9 @@ Please use the token argument in the provider configuration""")
|
|
|
217
219
|
|
|
218
220
|
@property
|
|
219
221
|
@pulumi.getter
|
|
220
|
-
|
|
221
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
222
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
223
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
222
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
224
223
|
Please use the token argument in the provider configuration""")
|
|
225
|
-
|
|
224
|
+
def token(self) -> Optional[pulumi.Input[str]]:
|
|
226
225
|
return pulumi.get(self, "token")
|
|
227
226
|
|
|
228
227
|
@token.setter
|
|
@@ -248,14 +247,14 @@ class Node(pulumi.CustomResource):
|
|
|
248
247
|
|
|
249
248
|
## Example Usage
|
|
250
249
|
|
|
251
|
-
<!--Start PulumiCodeChooser -->
|
|
252
250
|
```python
|
|
253
251
|
import pulumi
|
|
254
252
|
import pulumi_consul as consul
|
|
255
253
|
|
|
256
|
-
foobar = consul.Node("foobar",
|
|
254
|
+
foobar = consul.Node("foobar",
|
|
255
|
+
address="192.168.10.10",
|
|
256
|
+
name="foobar")
|
|
257
257
|
```
|
|
258
|
-
<!--End PulumiCodeChooser -->
|
|
259
258
|
|
|
260
259
|
## Import
|
|
261
260
|
|
|
@@ -285,14 +284,14 @@ class Node(pulumi.CustomResource):
|
|
|
285
284
|
|
|
286
285
|
## Example Usage
|
|
287
286
|
|
|
288
|
-
<!--Start PulumiCodeChooser -->
|
|
289
287
|
```python
|
|
290
288
|
import pulumi
|
|
291
289
|
import pulumi_consul as consul
|
|
292
290
|
|
|
293
|
-
foobar = consul.Node("foobar",
|
|
291
|
+
foobar = consul.Node("foobar",
|
|
292
|
+
address="192.168.10.10",
|
|
293
|
+
name="foobar")
|
|
294
294
|
```
|
|
295
|
-
<!--End PulumiCodeChooser -->
|
|
296
295
|
|
|
297
296
|
## Import
|
|
298
297
|
|
|
@@ -425,11 +424,8 @@ class Node(pulumi.CustomResource):
|
|
|
425
424
|
|
|
426
425
|
@property
|
|
427
426
|
@pulumi.getter
|
|
428
|
-
|
|
429
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
430
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
431
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
427
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
432
428
|
Please use the token argument in the provider configuration""")
|
|
433
|
-
|
|
429
|
+
def token(self) -> pulumi.Output[Optional[str]]:
|
|
434
430
|
return pulumi.get(self, "token")
|
|
435
431
|
|
pulumi_consul/outputs.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
|
|
|
@@ -1664,7 +1669,7 @@ class ConfigEntryServiceIntentionsSourcePermission(dict):
|
|
|
1664
1669
|
action: str,
|
|
1665
1670
|
https: Sequence['outputs.ConfigEntryServiceIntentionsSourcePermissionHttp']):
|
|
1666
1671
|
"""
|
|
1667
|
-
:param str action: Specifies the action to take when the source sends traffic to the destination service.
|
|
1672
|
+
:param str action: Specifies the action to take when the source sends traffic to the destination service. The value is either allow or deny.
|
|
1668
1673
|
:param Sequence['ConfigEntryServiceIntentionsSourcePermissionHttpArgs'] https: Specifies a set of HTTP-specific match criteria.
|
|
1669
1674
|
"""
|
|
1670
1675
|
pulumi.set(__self__, "action", action)
|
|
@@ -1674,7 +1679,7 @@ class ConfigEntryServiceIntentionsSourcePermission(dict):
|
|
|
1674
1679
|
@pulumi.getter
|
|
1675
1680
|
def action(self) -> str:
|
|
1676
1681
|
"""
|
|
1677
|
-
Specifies the action to take when the source sends traffic to the destination service.
|
|
1682
|
+
Specifies the action to take when the source sends traffic to the destination service. The value is either allow or deny.
|
|
1678
1683
|
"""
|
|
1679
1684
|
return pulumi.get(self, "action")
|
|
1680
1685
|
|
|
@@ -1786,7 +1791,7 @@ class ConfigEntryServiceIntentionsSourcePermissionHttpHeader(dict):
|
|
|
1786
1791
|
regex: Optional[str] = None,
|
|
1787
1792
|
suffix: Optional[str] = None):
|
|
1788
1793
|
"""
|
|
1789
|
-
:param str name: Specifies the name of
|
|
1794
|
+
:param str name: Specifies the name of the header to match.
|
|
1790
1795
|
:param str exact: Specifies a value for the header key set in the Name field. If the request header value matches the Exact value, Consul applies the permission.
|
|
1791
1796
|
:param bool invert: Inverts the matching logic configured in the Header.
|
|
1792
1797
|
:param str prefix: Specifies a prefix value for the header key set in the Name field.
|
|
@@ -1812,7 +1817,7 @@ class ConfigEntryServiceIntentionsSourcePermissionHttpHeader(dict):
|
|
|
1812
1817
|
@pulumi.getter
|
|
1813
1818
|
def name(self) -> str:
|
|
1814
1819
|
"""
|
|
1815
|
-
Specifies the name of
|
|
1820
|
+
Specifies the name of the header to match.
|
|
1816
1821
|
"""
|
|
1817
1822
|
return pulumi.get(self, "name")
|
|
1818
1823
|
|
|
@@ -2004,11 +2009,11 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2004
2009
|
service_subset: Optional[str] = None):
|
|
2005
2010
|
"""
|
|
2006
2011
|
:param str datacenter: Specifies the WAN federated datacenter to use for the failover target. If empty, the current datacenter is used.
|
|
2007
|
-
:param str namespace: Specifies the namespace
|
|
2012
|
+
:param str namespace: Specifies the namespace to use for the failover target. If empty, the default namespace is used.
|
|
2008
2013
|
:param str partition: Specifies the admin partition within the same datacenter to use for the failover target. If empty, the default partition is used.
|
|
2009
2014
|
:param str peer: Specifies the destination cluster peer to resolve the target service name from.
|
|
2010
|
-
:param str service: Specifies the name
|
|
2011
|
-
:param str service_subset: Specifies the
|
|
2015
|
+
:param str service: Specifies the service name to use for the failover target. If empty, the current service name is used.
|
|
2016
|
+
:param str service_subset: Specifies the named subset to use for the failover target. If empty, the default subset for the requested service name is used.
|
|
2012
2017
|
"""
|
|
2013
2018
|
if datacenter is not None:
|
|
2014
2019
|
pulumi.set(__self__, "datacenter", datacenter)
|
|
@@ -2035,7 +2040,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2035
2040
|
@pulumi.getter
|
|
2036
2041
|
def namespace(self) -> Optional[str]:
|
|
2037
2042
|
"""
|
|
2038
|
-
Specifies the namespace
|
|
2043
|
+
Specifies the namespace to use for the failover target. If empty, the default namespace is used.
|
|
2039
2044
|
"""
|
|
2040
2045
|
return pulumi.get(self, "namespace")
|
|
2041
2046
|
|
|
@@ -2059,7 +2064,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2059
2064
|
@pulumi.getter
|
|
2060
2065
|
def service(self) -> Optional[str]:
|
|
2061
2066
|
"""
|
|
2062
|
-
Specifies the name
|
|
2067
|
+
Specifies the service name to use for the failover target. If empty, the current service name is used.
|
|
2063
2068
|
"""
|
|
2064
2069
|
return pulumi.get(self, "service")
|
|
2065
2070
|
|
|
@@ -2067,7 +2072,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2067
2072
|
@pulumi.getter(name="serviceSubset")
|
|
2068
2073
|
def service_subset(self) -> Optional[str]:
|
|
2069
2074
|
"""
|
|
2070
|
-
Specifies the
|
|
2075
|
+
Specifies the named subset to use for the failover target. If empty, the default subset for the requested service name is used.
|
|
2071
2076
|
"""
|
|
2072
2077
|
return pulumi.get(self, "service_subset")
|
|
2073
2078
|
|
|
@@ -2805,9 +2810,9 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2805
2810
|
removes: Optional[Sequence[str]] = None,
|
|
2806
2811
|
set: Optional[Mapping[str, str]] = None):
|
|
2807
2812
|
"""
|
|
2808
|
-
:param Mapping[str, str] add: Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2813
|
+
:param Mapping[str, str] add: Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2809
2814
|
:param Sequence[str] removes: Defines a list of headers to remove.
|
|
2810
|
-
:param Mapping[str, str] set: Defines a set of key-value pairs to add to the
|
|
2815
|
+
:param Mapping[str, str] set: Defines a set of key-value pairs to add to the response header or to replace existing header values with
|
|
2811
2816
|
"""
|
|
2812
2817
|
if add is not None:
|
|
2813
2818
|
pulumi.set(__self__, "add", add)
|
|
@@ -2820,7 +2825,7 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2820
2825
|
@pulumi.getter
|
|
2821
2826
|
def add(self) -> Optional[Mapping[str, str]]:
|
|
2822
2827
|
"""
|
|
2823
|
-
Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2828
|
+
Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2824
2829
|
"""
|
|
2825
2830
|
return pulumi.get(self, "add")
|
|
2826
2831
|
|
|
@@ -2836,7 +2841,7 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2836
2841
|
@pulumi.getter
|
|
2837
2842
|
def set(self) -> Optional[Mapping[str, str]]:
|
|
2838
2843
|
"""
|
|
2839
|
-
Defines a set of key-value pairs to add to the
|
|
2844
|
+
Defines a set of key-value pairs to add to the response header or to replace existing header values with
|
|
2840
2845
|
"""
|
|
2841
2846
|
return pulumi.get(self, "set")
|
|
2842
2847
|
|
|
@@ -3061,10 +3066,10 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3061
3066
|
present: Optional[bool] = None,
|
|
3062
3067
|
regex: Optional[str] = None):
|
|
3063
3068
|
"""
|
|
3064
|
-
:param str exact: Specifies that a request matches when the
|
|
3065
|
-
:param str name: Specifies the name of the HTTP
|
|
3066
|
-
:param bool present: Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP
|
|
3067
|
-
:param str regex: Specifies that a request matches when the
|
|
3069
|
+
:param str exact: Specifies that a request matches when the query parameter with the given name is this exact value.
|
|
3070
|
+
:param str name: Specifies the name of the HTTP query parameter to match.
|
|
3071
|
+
:param bool present: Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP query parameter.
|
|
3072
|
+
:param str regex: Specifies that a request matches when the query parameter with the given name matches this regular expression.
|
|
3068
3073
|
"""
|
|
3069
3074
|
if exact is not None:
|
|
3070
3075
|
pulumi.set(__self__, "exact", exact)
|
|
@@ -3079,7 +3084,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3079
3084
|
@pulumi.getter
|
|
3080
3085
|
def exact(self) -> Optional[str]:
|
|
3081
3086
|
"""
|
|
3082
|
-
Specifies that a request matches when the
|
|
3087
|
+
Specifies that a request matches when the query parameter with the given name is this exact value.
|
|
3083
3088
|
"""
|
|
3084
3089
|
return pulumi.get(self, "exact")
|
|
3085
3090
|
|
|
@@ -3087,7 +3092,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3087
3092
|
@pulumi.getter
|
|
3088
3093
|
def name(self) -> Optional[str]:
|
|
3089
3094
|
"""
|
|
3090
|
-
Specifies the name of the HTTP
|
|
3095
|
+
Specifies the name of the HTTP query parameter to match.
|
|
3091
3096
|
"""
|
|
3092
3097
|
return pulumi.get(self, "name")
|
|
3093
3098
|
|
|
@@ -3095,7 +3100,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3095
3100
|
@pulumi.getter
|
|
3096
3101
|
def present(self) -> Optional[bool]:
|
|
3097
3102
|
"""
|
|
3098
|
-
Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP
|
|
3103
|
+
Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP query parameter.
|
|
3099
3104
|
"""
|
|
3100
3105
|
return pulumi.get(self, "present")
|
|
3101
3106
|
|
|
@@ -3103,7 +3108,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3103
3108
|
@pulumi.getter
|
|
3104
3109
|
def regex(self) -> Optional[str]:
|
|
3105
3110
|
"""
|
|
3106
|
-
Specifies that a request matches when the
|
|
3111
|
+
Specifies that a request matches when the query parameter with the given name matches this regular expression.
|
|
3107
3112
|
"""
|
|
3108
3113
|
return pulumi.get(self, "regex")
|
|
3109
3114
|
|
|
@@ -3415,10 +3420,8 @@ class KeysKey(dict):
|
|
|
3415
3420
|
|
|
3416
3421
|
@property
|
|
3417
3422
|
@pulumi.getter
|
|
3423
|
+
@_utilities.deprecated("""Using Keys resource to *read* is deprecated; please use Keys data source instead""")
|
|
3418
3424
|
def name(self) -> Optional[str]:
|
|
3419
|
-
warnings.warn("""Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead""", DeprecationWarning)
|
|
3420
|
-
pulumi.log.warn("""name is deprecated: Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead""")
|
|
3421
|
-
|
|
3422
3425
|
return pulumi.get(self, "name")
|
|
3423
3426
|
|
|
3424
3427
|
@property
|
|
@@ -3639,7 +3642,7 @@ class ServiceCheck(dict):
|
|
|
3639
3642
|
:param str interval: The interval to wait between each health-check invocation.
|
|
3640
3643
|
:param str name: The name of the health-check.
|
|
3641
3644
|
:param str timeout: Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.
|
|
3642
|
-
:param str deregister_critical_service_after: The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`.
|
|
3645
|
+
:param str deregister_critical_service_after: The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`. Setting to `0` will disable.
|
|
3643
3646
|
:param Sequence['ServiceCheckHeaderArgs'] headers: The headers to send for an HTTP check. The attributes of each header is given below.
|
|
3644
3647
|
:param str http: The HTTP endpoint to call for an HTTP check.
|
|
3645
3648
|
:param str method: The method to use for HTTP health-checks. Defaults to `GET`.
|
|
@@ -3705,7 +3708,7 @@ class ServiceCheck(dict):
|
|
|
3705
3708
|
@pulumi.getter(name="deregisterCriticalServiceAfter")
|
|
3706
3709
|
def deregister_critical_service_after(self) -> Optional[str]:
|
|
3707
3710
|
"""
|
|
3708
|
-
The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`.
|
|
3711
|
+
The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`. Setting to `0` will disable.
|
|
3709
3712
|
"""
|
|
3710
3713
|
return pulumi.get(self, "deregister_critical_service_after")
|
|
3711
3714
|
|
pulumi_consul/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__ = ['PeeringArgs', 'Peering']
|
|
@@ -238,25 +243,18 @@ class Peering(pulumi.CustomResource):
|
|
|
238
243
|
|
|
239
244
|
## Example Usage
|
|
240
245
|
|
|
241
|
-
<!--Start PulumiCodeChooser -->
|
|
242
246
|
```python
|
|
243
247
|
import pulumi
|
|
244
248
|
import pulumi_consul as consul
|
|
245
249
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
us = consul.Provider("us", address="us-cluster:8500")
|
|
249
|
-
eu_us_peering_token = consul.PeeringToken("eu-usPeeringToken", peer_name="eu-cluster",
|
|
250
|
-
opts=pulumi.ResourceOptions(provider=consul["us"]))
|
|
251
|
-
eu_us_peering = consul.Peering("eu-usPeering",
|
|
250
|
+
eu_us = consul.PeeringToken("eu-us", peer_name="eu-cluster")
|
|
251
|
+
eu_us_peering = consul.Peering("eu-us",
|
|
252
252
|
peer_name="eu-cluster",
|
|
253
|
-
peering_token=
|
|
253
|
+
peering_token=token["peeringToken"],
|
|
254
254
|
meta={
|
|
255
255
|
"hello": "world",
|
|
256
|
-
}
|
|
257
|
-
opts=pulumi.ResourceOptions(provider=consul["eu"]))
|
|
256
|
+
})
|
|
258
257
|
```
|
|
259
|
-
<!--End PulumiCodeChooser -->
|
|
260
258
|
|
|
261
259
|
:param str resource_name: The name of the resource.
|
|
262
260
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -281,25 +279,18 @@ class Peering(pulumi.CustomResource):
|
|
|
281
279
|
|
|
282
280
|
## Example Usage
|
|
283
281
|
|
|
284
|
-
<!--Start PulumiCodeChooser -->
|
|
285
282
|
```python
|
|
286
283
|
import pulumi
|
|
287
284
|
import pulumi_consul as consul
|
|
288
285
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
us = consul.Provider("us", address="us-cluster:8500")
|
|
292
|
-
eu_us_peering_token = consul.PeeringToken("eu-usPeeringToken", peer_name="eu-cluster",
|
|
293
|
-
opts=pulumi.ResourceOptions(provider=consul["us"]))
|
|
294
|
-
eu_us_peering = consul.Peering("eu-usPeering",
|
|
286
|
+
eu_us = consul.PeeringToken("eu-us", peer_name="eu-cluster")
|
|
287
|
+
eu_us_peering = consul.Peering("eu-us",
|
|
295
288
|
peer_name="eu-cluster",
|
|
296
|
-
peering_token=
|
|
289
|
+
peering_token=token["peeringToken"],
|
|
297
290
|
meta={
|
|
298
291
|
"hello": "world",
|
|
299
|
-
}
|
|
300
|
-
opts=pulumi.ResourceOptions(provider=consul["eu"]))
|
|
292
|
+
})
|
|
301
293
|
```
|
|
302
|
-
<!--End PulumiCodeChooser -->
|
|
303
294
|
|
|
304
295
|
:param str resource_name: The name of the resource.
|
|
305
296
|
:param PeeringArgs args: The arguments to use to populate this resource's properties.
|
pulumi_consul/peering_token.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__ = ['PeeringTokenArgs', 'PeeringToken']
|
|
@@ -16,17 +21,21 @@ class PeeringTokenArgs:
|
|
|
16
21
|
def __init__(__self__, *,
|
|
17
22
|
peer_name: pulumi.Input[str],
|
|
18
23
|
meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
19
|
-
partition: Optional[pulumi.Input[str]] = None
|
|
24
|
+
partition: Optional[pulumi.Input[str]] = None,
|
|
25
|
+
server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
20
26
|
"""
|
|
21
27
|
The set of arguments for constructing a PeeringToken resource.
|
|
22
28
|
:param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
|
|
23
29
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
|
|
30
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
24
31
|
"""
|
|
25
32
|
pulumi.set(__self__, "peer_name", peer_name)
|
|
26
33
|
if meta is not None:
|
|
27
34
|
pulumi.set(__self__, "meta", meta)
|
|
28
35
|
if partition is not None:
|
|
29
36
|
pulumi.set(__self__, "partition", partition)
|
|
37
|
+
if server_external_addresses is not None:
|
|
38
|
+
pulumi.set(__self__, "server_external_addresses", server_external_addresses)
|
|
30
39
|
|
|
31
40
|
@property
|
|
32
41
|
@pulumi.getter(name="peerName")
|
|
@@ -61,6 +70,18 @@ class PeeringTokenArgs:
|
|
|
61
70
|
def partition(self, value: Optional[pulumi.Input[str]]):
|
|
62
71
|
pulumi.set(self, "partition", value)
|
|
63
72
|
|
|
73
|
+
@property
|
|
74
|
+
@pulumi.getter(name="serverExternalAddresses")
|
|
75
|
+
def server_external_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
76
|
+
"""
|
|
77
|
+
The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
78
|
+
"""
|
|
79
|
+
return pulumi.get(self, "server_external_addresses")
|
|
80
|
+
|
|
81
|
+
@server_external_addresses.setter
|
|
82
|
+
def server_external_addresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
83
|
+
pulumi.set(self, "server_external_addresses", value)
|
|
84
|
+
|
|
64
85
|
|
|
65
86
|
@pulumi.input_type
|
|
66
87
|
class _PeeringTokenState:
|
|
@@ -68,12 +89,14 @@ class _PeeringTokenState:
|
|
|
68
89
|
meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
69
90
|
partition: Optional[pulumi.Input[str]] = None,
|
|
70
91
|
peer_name: Optional[pulumi.Input[str]] = None,
|
|
71
|
-
peering_token: Optional[pulumi.Input[str]] = None
|
|
92
|
+
peering_token: Optional[pulumi.Input[str]] = None,
|
|
93
|
+
server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
72
94
|
"""
|
|
73
95
|
Input properties used for looking up and filtering PeeringToken resources.
|
|
74
96
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
|
|
75
97
|
:param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
|
|
76
98
|
:param pulumi.Input[str] peering_token: The generated peering token
|
|
99
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
77
100
|
"""
|
|
78
101
|
if meta is not None:
|
|
79
102
|
pulumi.set(__self__, "meta", meta)
|
|
@@ -83,6 +106,8 @@ class _PeeringTokenState:
|
|
|
83
106
|
pulumi.set(__self__, "peer_name", peer_name)
|
|
84
107
|
if peering_token is not None:
|
|
85
108
|
pulumi.set(__self__, "peering_token", peering_token)
|
|
109
|
+
if server_external_addresses is not None:
|
|
110
|
+
pulumi.set(__self__, "server_external_addresses", server_external_addresses)
|
|
86
111
|
|
|
87
112
|
@property
|
|
88
113
|
@pulumi.getter
|
|
@@ -129,6 +154,18 @@ class _PeeringTokenState:
|
|
|
129
154
|
def peering_token(self, value: Optional[pulumi.Input[str]]):
|
|
130
155
|
pulumi.set(self, "peering_token", value)
|
|
131
156
|
|
|
157
|
+
@property
|
|
158
|
+
@pulumi.getter(name="serverExternalAddresses")
|
|
159
|
+
def server_external_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
160
|
+
"""
|
|
161
|
+
The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
162
|
+
"""
|
|
163
|
+
return pulumi.get(self, "server_external_addresses")
|
|
164
|
+
|
|
165
|
+
@server_external_addresses.setter
|
|
166
|
+
def server_external_addresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
167
|
+
pulumi.set(self, "server_external_addresses", value)
|
|
168
|
+
|
|
132
169
|
|
|
133
170
|
class PeeringToken(pulumi.CustomResource):
|
|
134
171
|
@overload
|
|
@@ -138,31 +175,27 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
138
175
|
meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
139
176
|
partition: Optional[pulumi.Input[str]] = None,
|
|
140
177
|
peer_name: Optional[pulumi.Input[str]] = None,
|
|
178
|
+
server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
141
179
|
__props__=None):
|
|
142
180
|
"""
|
|
143
181
|
[Cluster Peering](https://www.consul.io/docs/connect/cluster-peering) can be used to create connections between two or more independent clusters so that services deployed to different partitions or datacenters can communicate.
|
|
144
182
|
|
|
145
183
|
The `cluster_peering_token` resource can be used to generate a peering token that can later be used to establish a peering connection.
|
|
146
184
|
|
|
147
|
-
> **Cluster peering is currently in technical preview:** Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
|
|
148
|
-
|
|
149
|
-
The functionality described here is available only in Consul version 1.13.0 and later.
|
|
150
|
-
|
|
151
185
|
## Example Usage
|
|
152
186
|
|
|
153
|
-
<!--Start PulumiCodeChooser -->
|
|
154
187
|
```python
|
|
155
188
|
import pulumi
|
|
156
189
|
import pulumi_consul as consul
|
|
157
190
|
|
|
158
191
|
token = consul.PeeringToken("token", peer_name="eu-cluster")
|
|
159
192
|
```
|
|
160
|
-
<!--End PulumiCodeChooser -->
|
|
161
193
|
|
|
162
194
|
:param str resource_name: The name of the resource.
|
|
163
195
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
164
196
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
|
|
165
197
|
:param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
|
|
198
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
166
199
|
"""
|
|
167
200
|
...
|
|
168
201
|
@overload
|
|
@@ -175,20 +208,14 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
175
208
|
|
|
176
209
|
The `cluster_peering_token` resource can be used to generate a peering token that can later be used to establish a peering connection.
|
|
177
210
|
|
|
178
|
-
> **Cluster peering is currently in technical preview:** Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
|
|
179
|
-
|
|
180
|
-
The functionality described here is available only in Consul version 1.13.0 and later.
|
|
181
|
-
|
|
182
211
|
## Example Usage
|
|
183
212
|
|
|
184
|
-
<!--Start PulumiCodeChooser -->
|
|
185
213
|
```python
|
|
186
214
|
import pulumi
|
|
187
215
|
import pulumi_consul as consul
|
|
188
216
|
|
|
189
217
|
token = consul.PeeringToken("token", peer_name="eu-cluster")
|
|
190
218
|
```
|
|
191
|
-
<!--End PulumiCodeChooser -->
|
|
192
219
|
|
|
193
220
|
:param str resource_name: The name of the resource.
|
|
194
221
|
:param PeeringTokenArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -208,6 +235,7 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
208
235
|
meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
209
236
|
partition: Optional[pulumi.Input[str]] = None,
|
|
210
237
|
peer_name: Optional[pulumi.Input[str]] = None,
|
|
238
|
+
server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
211
239
|
__props__=None):
|
|
212
240
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
213
241
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -222,6 +250,7 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
222
250
|
if peer_name is None and not opts.urn:
|
|
223
251
|
raise TypeError("Missing required property 'peer_name'")
|
|
224
252
|
__props__.__dict__["peer_name"] = peer_name
|
|
253
|
+
__props__.__dict__["server_external_addresses"] = server_external_addresses
|
|
225
254
|
__props__.__dict__["peering_token"] = None
|
|
226
255
|
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["peeringToken"])
|
|
227
256
|
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
|
@@ -238,7 +267,8 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
238
267
|
meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
239
268
|
partition: Optional[pulumi.Input[str]] = None,
|
|
240
269
|
peer_name: Optional[pulumi.Input[str]] = None,
|
|
241
|
-
peering_token: Optional[pulumi.Input[str]] = None
|
|
270
|
+
peering_token: Optional[pulumi.Input[str]] = None,
|
|
271
|
+
server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'PeeringToken':
|
|
242
272
|
"""
|
|
243
273
|
Get an existing PeeringToken resource's state with the given name, id, and optional extra
|
|
244
274
|
properties used to qualify the lookup.
|
|
@@ -249,6 +279,7 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
249
279
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
|
|
250
280
|
:param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
|
|
251
281
|
:param pulumi.Input[str] peering_token: The generated peering token
|
|
282
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
252
283
|
"""
|
|
253
284
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
254
285
|
|
|
@@ -258,6 +289,7 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
258
289
|
__props__.__dict__["partition"] = partition
|
|
259
290
|
__props__.__dict__["peer_name"] = peer_name
|
|
260
291
|
__props__.__dict__["peering_token"] = peering_token
|
|
292
|
+
__props__.__dict__["server_external_addresses"] = server_external_addresses
|
|
261
293
|
return PeeringToken(resource_name, opts=opts, __props__=__props__)
|
|
262
294
|
|
|
263
295
|
@property
|
|
@@ -289,3 +321,11 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
289
321
|
"""
|
|
290
322
|
return pulumi.get(self, "peering_token")
|
|
291
323
|
|
|
324
|
+
@property
|
|
325
|
+
@pulumi.getter(name="serverExternalAddresses")
|
|
326
|
+
def server_external_addresses(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
327
|
+
"""
|
|
328
|
+
The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
|
|
329
|
+
"""
|
|
330
|
+
return pulumi.get(self, "server_external_addresses")
|
|
331
|
+
|