pulumi-consul 3.12.0a1713331566__py3-none-any.whl → 3.12.0a1713897703__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_consul/_inputs.py +22 -22
- pulumi_consul/acl_auth_method.py +4 -8
- pulumi_consul/acl_binding_rule.py +2 -4
- pulumi_consul/acl_policy.py +2 -6
- pulumi_consul/acl_role.py +11 -11
- pulumi_consul/acl_role_policy_attachment.py +8 -10
- pulumi_consul/acl_token.py +14 -14
- pulumi_consul/admin_partition.py +6 -6
- pulumi_consul/agent_service.py +2 -4
- pulumi_consul/autopilot_config.py +0 -4
- pulumi_consul/catalog_entry.py +0 -46
- pulumi_consul/config_entry.py +52 -46
- pulumi_consul/config_entry_service_defaults.py +21 -21
- pulumi_consul/config_entry_service_intentions.py +27 -27
- pulumi_consul/config_entry_service_resolver.py +57 -59
- pulumi_consul/config_entry_service_router.py +21 -61
- pulumi_consul/config_entry_service_splitter.py +22 -20
- pulumi_consul/get_acl_auth_method.py +0 -4
- pulumi_consul/get_acl_policy.py +0 -4
- pulumi_consul/get_acl_role.py +2 -4
- pulumi_consul/get_acl_token.py +0 -4
- pulumi_consul/get_acl_token_secret_id.py +8 -10
- pulumi_consul/get_agent_config.py +0 -4
- pulumi_consul/get_autopilot_health.py +0 -4
- pulumi_consul/get_catalog_service.py +30 -4
- pulumi_consul/get_catalog_services.py +32 -0
- pulumi_consul/get_key_prefix.py +18 -26
- pulumi_consul/get_keys.py +4 -10
- pulumi_consul/get_network_area_members.py +6 -10
- pulumi_consul/get_network_segments.py +4 -8
- pulumi_consul/get_peering.py +0 -4
- pulumi_consul/get_peerings.py +0 -4
- pulumi_consul/get_service.py +30 -4
- pulumi_consul/get_services.py +32 -0
- pulumi_consul/intention.py +10 -18
- pulumi_consul/key_prefix.py +26 -30
- pulumi_consul/keys.py +6 -10
- pulumi_consul/license.py +4 -6
- pulumi_consul/namespace.py +2 -4
- pulumi_consul/network_area.py +0 -4
- pulumi_consul/node.py +6 -6
- pulumi_consul/outputs.py +22 -22
- pulumi_consul/peering.py +8 -22
- pulumi_consul/peering_token.py +0 -4
- pulumi_consul/prepared_query.py +63 -63
- pulumi_consul/service.py +79 -17
- {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713897703.dist-info}/METADATA +1 -1
- pulumi_consul-3.12.0a1713897703.dist-info/RECORD +70 -0
- pulumi_consul-3.12.0a1713331566.dist-info/RECORD +0 -70
- {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713897703.dist-info}/WHEEL +0 -0
- {pulumi_consul-3.12.0a1713331566.dist-info → pulumi_consul-3.12.0a1713897703.dist-info}/top_level.txt +0 -0
pulumi_consul/outputs.py
CHANGED
|
@@ -1664,7 +1664,7 @@ class ConfigEntryServiceIntentionsSourcePermission(dict):
|
|
|
1664
1664
|
action: str,
|
|
1665
1665
|
https: Sequence['outputs.ConfigEntryServiceIntentionsSourcePermissionHttp']):
|
|
1666
1666
|
"""
|
|
1667
|
-
:param str action: Specifies the action to take when the source sends traffic to the destination service.
|
|
1667
|
+
: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
1668
|
:param Sequence['ConfigEntryServiceIntentionsSourcePermissionHttpArgs'] https: Specifies a set of HTTP-specific match criteria.
|
|
1669
1669
|
"""
|
|
1670
1670
|
pulumi.set(__self__, "action", action)
|
|
@@ -1674,7 +1674,7 @@ class ConfigEntryServiceIntentionsSourcePermission(dict):
|
|
|
1674
1674
|
@pulumi.getter
|
|
1675
1675
|
def action(self) -> str:
|
|
1676
1676
|
"""
|
|
1677
|
-
Specifies the action to take when the source sends traffic to the destination service.
|
|
1677
|
+
Specifies the action to take when the source sends traffic to the destination service. The value is either allow or deny.
|
|
1678
1678
|
"""
|
|
1679
1679
|
return pulumi.get(self, "action")
|
|
1680
1680
|
|
|
@@ -1786,7 +1786,7 @@ class ConfigEntryServiceIntentionsSourcePermissionHttpHeader(dict):
|
|
|
1786
1786
|
regex: Optional[str] = None,
|
|
1787
1787
|
suffix: Optional[str] = None):
|
|
1788
1788
|
"""
|
|
1789
|
-
:param str name: Specifies the name of
|
|
1789
|
+
:param str name: Specifies the name of the header to match.
|
|
1790
1790
|
: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
1791
|
:param bool invert: Inverts the matching logic configured in the Header.
|
|
1792
1792
|
:param str prefix: Specifies a prefix value for the header key set in the Name field.
|
|
@@ -1812,7 +1812,7 @@ class ConfigEntryServiceIntentionsSourcePermissionHttpHeader(dict):
|
|
|
1812
1812
|
@pulumi.getter
|
|
1813
1813
|
def name(self) -> str:
|
|
1814
1814
|
"""
|
|
1815
|
-
Specifies the name of
|
|
1815
|
+
Specifies the name of the header to match.
|
|
1816
1816
|
"""
|
|
1817
1817
|
return pulumi.get(self, "name")
|
|
1818
1818
|
|
|
@@ -2004,11 +2004,11 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2004
2004
|
service_subset: Optional[str] = None):
|
|
2005
2005
|
"""
|
|
2006
2006
|
: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
|
|
2007
|
+
:param str namespace: Specifies the namespace to use for the failover target. If empty, the default namespace is used.
|
|
2008
2008
|
: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
2009
|
: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
|
|
2010
|
+
:param str service: Specifies the service name to use for the failover target. If empty, the current service name is used.
|
|
2011
|
+
: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
2012
|
"""
|
|
2013
2013
|
if datacenter is not None:
|
|
2014
2014
|
pulumi.set(__self__, "datacenter", datacenter)
|
|
@@ -2035,7 +2035,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2035
2035
|
@pulumi.getter
|
|
2036
2036
|
def namespace(self) -> Optional[str]:
|
|
2037
2037
|
"""
|
|
2038
|
-
Specifies the namespace
|
|
2038
|
+
Specifies the namespace to use for the failover target. If empty, the default namespace is used.
|
|
2039
2039
|
"""
|
|
2040
2040
|
return pulumi.get(self, "namespace")
|
|
2041
2041
|
|
|
@@ -2059,7 +2059,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2059
2059
|
@pulumi.getter
|
|
2060
2060
|
def service(self) -> Optional[str]:
|
|
2061
2061
|
"""
|
|
2062
|
-
Specifies the name
|
|
2062
|
+
Specifies the service name to use for the failover target. If empty, the current service name is used.
|
|
2063
2063
|
"""
|
|
2064
2064
|
return pulumi.get(self, "service")
|
|
2065
2065
|
|
|
@@ -2067,7 +2067,7 @@ class ConfigEntryServiceResolverFailoverTarget(dict):
|
|
|
2067
2067
|
@pulumi.getter(name="serviceSubset")
|
|
2068
2068
|
def service_subset(self) -> Optional[str]:
|
|
2069
2069
|
"""
|
|
2070
|
-
Specifies the
|
|
2070
|
+
Specifies the named subset to use for the failover target. If empty, the default subset for the requested service name is used.
|
|
2071
2071
|
"""
|
|
2072
2072
|
return pulumi.get(self, "service_subset")
|
|
2073
2073
|
|
|
@@ -2805,9 +2805,9 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2805
2805
|
removes: Optional[Sequence[str]] = None,
|
|
2806
2806
|
set: Optional[Mapping[str, str]] = None):
|
|
2807
2807
|
"""
|
|
2808
|
-
:param Mapping[str, str] add: Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2808
|
+
:param Mapping[str, str] add: Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2809
2809
|
: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
|
|
2810
|
+
: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
2811
|
"""
|
|
2812
2812
|
if add is not None:
|
|
2813
2813
|
pulumi.set(__self__, "add", add)
|
|
@@ -2820,7 +2820,7 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2820
2820
|
@pulumi.getter
|
|
2821
2821
|
def add(self) -> Optional[Mapping[str, str]]:
|
|
2822
2822
|
"""
|
|
2823
|
-
Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2823
|
+
Defines a set of key-value pairs to add to the header. Use header names as the keys
|
|
2824
2824
|
"""
|
|
2825
2825
|
return pulumi.get(self, "add")
|
|
2826
2826
|
|
|
@@ -2836,7 +2836,7 @@ class ConfigEntryServiceRouterRouteDestinationResponseHeaders(dict):
|
|
|
2836
2836
|
@pulumi.getter
|
|
2837
2837
|
def set(self) -> Optional[Mapping[str, str]]:
|
|
2838
2838
|
"""
|
|
2839
|
-
Defines a set of key-value pairs to add to the
|
|
2839
|
+
Defines a set of key-value pairs to add to the response header or to replace existing header values with
|
|
2840
2840
|
"""
|
|
2841
2841
|
return pulumi.get(self, "set")
|
|
2842
2842
|
|
|
@@ -3061,10 +3061,10 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3061
3061
|
present: Optional[bool] = None,
|
|
3062
3062
|
regex: Optional[str] = None):
|
|
3063
3063
|
"""
|
|
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
|
|
3064
|
+
:param str exact: Specifies that a request matches when the query parameter with the given name is this exact value.
|
|
3065
|
+
:param str name: Specifies the name of the HTTP query parameter to match.
|
|
3066
|
+
:param bool present: Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP query parameter.
|
|
3067
|
+
:param str regex: Specifies that a request matches when the query parameter with the given name matches this regular expression.
|
|
3068
3068
|
"""
|
|
3069
3069
|
if exact is not None:
|
|
3070
3070
|
pulumi.set(__self__, "exact", exact)
|
|
@@ -3079,7 +3079,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3079
3079
|
@pulumi.getter
|
|
3080
3080
|
def exact(self) -> Optional[str]:
|
|
3081
3081
|
"""
|
|
3082
|
-
Specifies that a request matches when the
|
|
3082
|
+
Specifies that a request matches when the query parameter with the given name is this exact value.
|
|
3083
3083
|
"""
|
|
3084
3084
|
return pulumi.get(self, "exact")
|
|
3085
3085
|
|
|
@@ -3087,7 +3087,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3087
3087
|
@pulumi.getter
|
|
3088
3088
|
def name(self) -> Optional[str]:
|
|
3089
3089
|
"""
|
|
3090
|
-
Specifies the name of the HTTP
|
|
3090
|
+
Specifies the name of the HTTP query parameter to match.
|
|
3091
3091
|
"""
|
|
3092
3092
|
return pulumi.get(self, "name")
|
|
3093
3093
|
|
|
@@ -3095,7 +3095,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3095
3095
|
@pulumi.getter
|
|
3096
3096
|
def present(self) -> Optional[bool]:
|
|
3097
3097
|
"""
|
|
3098
|
-
Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP
|
|
3098
|
+
Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP query parameter.
|
|
3099
3099
|
"""
|
|
3100
3100
|
return pulumi.get(self, "present")
|
|
3101
3101
|
|
|
@@ -3103,7 +3103,7 @@ class ConfigEntryServiceRouterRouteMatchHttpQueryParam(dict):
|
|
|
3103
3103
|
@pulumi.getter
|
|
3104
3104
|
def regex(self) -> Optional[str]:
|
|
3105
3105
|
"""
|
|
3106
|
-
Specifies that a request matches when the
|
|
3106
|
+
Specifies that a request matches when the query parameter with the given name matches this regular expression.
|
|
3107
3107
|
"""
|
|
3108
3108
|
return pulumi.get(self, "regex")
|
|
3109
3109
|
|
pulumi_consul/peering.py
CHANGED
|
@@ -238,25 +238,18 @@ class Peering(pulumi.CustomResource):
|
|
|
238
238
|
|
|
239
239
|
## Example Usage
|
|
240
240
|
|
|
241
|
-
<!--Start PulumiCodeChooser -->
|
|
242
241
|
```python
|
|
243
242
|
import pulumi
|
|
244
243
|
import pulumi_consul as consul
|
|
245
244
|
|
|
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",
|
|
245
|
+
eu_us = consul.PeeringToken("eu-us", peer_name="eu-cluster")
|
|
246
|
+
eu_us_peering = consul.Peering("eu-us",
|
|
252
247
|
peer_name="eu-cluster",
|
|
253
|
-
peering_token=
|
|
248
|
+
peering_token=token["peeringToken"],
|
|
254
249
|
meta={
|
|
255
250
|
"hello": "world",
|
|
256
|
-
}
|
|
257
|
-
opts=pulumi.ResourceOptions(provider=consul["eu"]))
|
|
251
|
+
})
|
|
258
252
|
```
|
|
259
|
-
<!--End PulumiCodeChooser -->
|
|
260
253
|
|
|
261
254
|
:param str resource_name: The name of the resource.
|
|
262
255
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -281,25 +274,18 @@ class Peering(pulumi.CustomResource):
|
|
|
281
274
|
|
|
282
275
|
## Example Usage
|
|
283
276
|
|
|
284
|
-
<!--Start PulumiCodeChooser -->
|
|
285
277
|
```python
|
|
286
278
|
import pulumi
|
|
287
279
|
import pulumi_consul as consul
|
|
288
280
|
|
|
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",
|
|
281
|
+
eu_us = consul.PeeringToken("eu-us", peer_name="eu-cluster")
|
|
282
|
+
eu_us_peering = consul.Peering("eu-us",
|
|
295
283
|
peer_name="eu-cluster",
|
|
296
|
-
peering_token=
|
|
284
|
+
peering_token=token["peeringToken"],
|
|
297
285
|
meta={
|
|
298
286
|
"hello": "world",
|
|
299
|
-
}
|
|
300
|
-
opts=pulumi.ResourceOptions(provider=consul["eu"]))
|
|
287
|
+
})
|
|
301
288
|
```
|
|
302
|
-
<!--End PulumiCodeChooser -->
|
|
303
289
|
|
|
304
290
|
:param str resource_name: The name of the resource.
|
|
305
291
|
:param PeeringArgs args: The arguments to use to populate this resource's properties.
|
pulumi_consul/peering_token.py
CHANGED
|
@@ -150,14 +150,12 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
150
150
|
|
|
151
151
|
## Example Usage
|
|
152
152
|
|
|
153
|
-
<!--Start PulumiCodeChooser -->
|
|
154
153
|
```python
|
|
155
154
|
import pulumi
|
|
156
155
|
import pulumi_consul as consul
|
|
157
156
|
|
|
158
157
|
token = consul.PeeringToken("token", peer_name="eu-cluster")
|
|
159
158
|
```
|
|
160
|
-
<!--End PulumiCodeChooser -->
|
|
161
159
|
|
|
162
160
|
:param str resource_name: The name of the resource.
|
|
163
161
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -181,14 +179,12 @@ class PeeringToken(pulumi.CustomResource):
|
|
|
181
179
|
|
|
182
180
|
## Example Usage
|
|
183
181
|
|
|
184
|
-
<!--Start PulumiCodeChooser -->
|
|
185
182
|
```python
|
|
186
183
|
import pulumi
|
|
187
184
|
import pulumi_consul as consul
|
|
188
185
|
|
|
189
186
|
token = consul.PeeringToken("token", peer_name="eu-cluster")
|
|
190
187
|
```
|
|
191
|
-
<!--End PulumiCodeChooser -->
|
|
192
188
|
|
|
193
189
|
:param str resource_name: The name of the resource.
|
|
194
190
|
:param PeeringTokenArgs args: The arguments to use to populate this resource's properties.
|
pulumi_consul/prepared_query.py
CHANGED
|
@@ -36,7 +36,7 @@ class PreparedQueryArgs:
|
|
|
36
36
|
The set of arguments for constructing a PreparedQuery resource.
|
|
37
37
|
:param pulumi.Input[str] service: The name of the service to query
|
|
38
38
|
:param pulumi.Input[bool] connect: When `true` the prepared query will return connect proxy services for a queried service. Conditions such as `tags` in the prepared query will be matched against the proxy service. Defaults to false.
|
|
39
|
-
:param pulumi.Input[str] datacenter:
|
|
39
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
40
40
|
:param pulumi.Input['PreparedQueryDnsArgs'] dns: Settings for controlling the DNS response details.
|
|
41
41
|
:param pulumi.Input['PreparedQueryFailoverArgs'] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
42
42
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] ignore_check_ids: Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.
|
|
@@ -116,7 +116,7 @@ Please use the token argument in the provider configuration""")
|
|
|
116
116
|
@pulumi.getter
|
|
117
117
|
def datacenter(self) -> Optional[pulumi.Input[str]]:
|
|
118
118
|
"""
|
|
119
|
-
|
|
119
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
120
120
|
"""
|
|
121
121
|
return pulumi.get(self, "datacenter")
|
|
122
122
|
|
|
@@ -308,7 +308,7 @@ class _PreparedQueryState:
|
|
|
308
308
|
"""
|
|
309
309
|
Input properties used for looking up and filtering PreparedQuery resources.
|
|
310
310
|
:param pulumi.Input[bool] connect: When `true` the prepared query will return connect proxy services for a queried service. Conditions such as `tags` in the prepared query will be matched against the proxy service. Defaults to false.
|
|
311
|
-
:param pulumi.Input[str] datacenter:
|
|
311
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
312
312
|
:param pulumi.Input['PreparedQueryDnsArgs'] dns: Settings for controlling the DNS response details.
|
|
313
313
|
:param pulumi.Input['PreparedQueryFailoverArgs'] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
314
314
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] ignore_check_ids: Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.
|
|
@@ -378,7 +378,7 @@ Please use the token argument in the provider configuration""")
|
|
|
378
378
|
@pulumi.getter
|
|
379
379
|
def datacenter(self) -> Optional[pulumi.Input[str]]:
|
|
380
380
|
"""
|
|
381
|
-
|
|
381
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
382
382
|
"""
|
|
383
383
|
return pulumi.get(self, "datacenter")
|
|
384
384
|
|
|
@@ -585,7 +585,6 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
585
585
|
"""
|
|
586
586
|
## Example Usage
|
|
587
587
|
|
|
588
|
-
<!--Start PulumiCodeChooser -->
|
|
589
588
|
```python
|
|
590
589
|
import pulumi
|
|
591
590
|
import pulumi_consul as consul
|
|
@@ -594,55 +593,56 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
594
593
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
595
594
|
# the standby tag.
|
|
596
595
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
596
|
+
name="myquery",
|
|
597
597
|
datacenter="us-central1",
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
598
|
+
token="abcd",
|
|
599
|
+
stored_token="wxyz",
|
|
600
|
+
only_passing=True,
|
|
601
|
+
near="_agent",
|
|
602
|
+
service="myapp",
|
|
603
|
+
tags=[
|
|
604
|
+
"active",
|
|
605
|
+
"!standby",
|
|
606
|
+
],
|
|
601
607
|
failover=consul.PreparedQueryFailoverArgs(
|
|
608
|
+
nearest_n=3,
|
|
602
609
|
datacenters=[
|
|
603
610
|
"us-west1",
|
|
604
611
|
"us-east-2",
|
|
605
612
|
"asia-east1",
|
|
606
613
|
],
|
|
607
|
-
nearest_n=3,
|
|
608
614
|
),
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
stored_token="wxyz",
|
|
613
|
-
tags=[
|
|
614
|
-
"active",
|
|
615
|
-
"!standby",
|
|
616
|
-
],
|
|
617
|
-
token="abcd")
|
|
615
|
+
dns=consul.PreparedQueryDnsArgs(
|
|
616
|
+
ttl="30s",
|
|
617
|
+
))
|
|
618
618
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
619
619
|
# and finds the nearest service that matches the glob character (e.g.
|
|
620
620
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
621
621
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
622
|
-
connect=True,
|
|
623
622
|
datacenter="nyc1",
|
|
624
|
-
|
|
625
|
-
|
|
623
|
+
token="abcd",
|
|
624
|
+
stored_token="wxyz",
|
|
625
|
+
name="",
|
|
626
|
+
only_passing=True,
|
|
627
|
+
connect=True,
|
|
628
|
+
near="_agent",
|
|
629
|
+
template=consul.PreparedQueryTemplateArgs(
|
|
630
|
+
type="name_prefix_match",
|
|
631
|
+
regexp="^(.*)-near-self$",
|
|
626
632
|
),
|
|
633
|
+
service="${match(1)}",
|
|
627
634
|
failover=consul.PreparedQueryFailoverArgs(
|
|
635
|
+
nearest_n=3,
|
|
628
636
|
datacenters=[
|
|
629
637
|
"dc2",
|
|
630
638
|
"dc3",
|
|
631
639
|
"dc4",
|
|
632
640
|
],
|
|
633
|
-
nearest_n=3,
|
|
634
641
|
),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
stored_token="wxyz",
|
|
639
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
640
|
-
regexp="^(.*)-near-self$",
|
|
641
|
-
type="name_prefix_match",
|
|
642
|
-
),
|
|
643
|
-
token="abcd")
|
|
642
|
+
dns=consul.PreparedQueryDnsArgs(
|
|
643
|
+
ttl="5m",
|
|
644
|
+
))
|
|
644
645
|
```
|
|
645
|
-
<!--End PulumiCodeChooser -->
|
|
646
646
|
|
|
647
647
|
## Import
|
|
648
648
|
|
|
@@ -653,7 +653,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
653
653
|
:param str resource_name: The name of the resource.
|
|
654
654
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
655
655
|
:param pulumi.Input[bool] connect: When `true` the prepared query will return connect proxy services for a queried service. Conditions such as `tags` in the prepared query will be matched against the proxy service. Defaults to false.
|
|
656
|
-
:param pulumi.Input[str] datacenter:
|
|
656
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
657
657
|
:param pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']] dns: Settings for controlling the DNS response details.
|
|
658
658
|
:param pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
659
659
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] ignore_check_ids: Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.
|
|
@@ -678,7 +678,6 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
678
678
|
"""
|
|
679
679
|
## Example Usage
|
|
680
680
|
|
|
681
|
-
<!--Start PulumiCodeChooser -->
|
|
682
681
|
```python
|
|
683
682
|
import pulumi
|
|
684
683
|
import pulumi_consul as consul
|
|
@@ -687,55 +686,56 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
687
686
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
688
687
|
# the standby tag.
|
|
689
688
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
689
|
+
name="myquery",
|
|
690
690
|
datacenter="us-central1",
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
691
|
+
token="abcd",
|
|
692
|
+
stored_token="wxyz",
|
|
693
|
+
only_passing=True,
|
|
694
|
+
near="_agent",
|
|
695
|
+
service="myapp",
|
|
696
|
+
tags=[
|
|
697
|
+
"active",
|
|
698
|
+
"!standby",
|
|
699
|
+
],
|
|
694
700
|
failover=consul.PreparedQueryFailoverArgs(
|
|
701
|
+
nearest_n=3,
|
|
695
702
|
datacenters=[
|
|
696
703
|
"us-west1",
|
|
697
704
|
"us-east-2",
|
|
698
705
|
"asia-east1",
|
|
699
706
|
],
|
|
700
|
-
nearest_n=3,
|
|
701
707
|
),
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
stored_token="wxyz",
|
|
706
|
-
tags=[
|
|
707
|
-
"active",
|
|
708
|
-
"!standby",
|
|
709
|
-
],
|
|
710
|
-
token="abcd")
|
|
708
|
+
dns=consul.PreparedQueryDnsArgs(
|
|
709
|
+
ttl="30s",
|
|
710
|
+
))
|
|
711
711
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
712
712
|
# and finds the nearest service that matches the glob character (e.g.
|
|
713
713
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
714
714
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
715
|
-
connect=True,
|
|
716
715
|
datacenter="nyc1",
|
|
717
|
-
|
|
718
|
-
|
|
716
|
+
token="abcd",
|
|
717
|
+
stored_token="wxyz",
|
|
718
|
+
name="",
|
|
719
|
+
only_passing=True,
|
|
720
|
+
connect=True,
|
|
721
|
+
near="_agent",
|
|
722
|
+
template=consul.PreparedQueryTemplateArgs(
|
|
723
|
+
type="name_prefix_match",
|
|
724
|
+
regexp="^(.*)-near-self$",
|
|
719
725
|
),
|
|
726
|
+
service="${match(1)}",
|
|
720
727
|
failover=consul.PreparedQueryFailoverArgs(
|
|
728
|
+
nearest_n=3,
|
|
721
729
|
datacenters=[
|
|
722
730
|
"dc2",
|
|
723
731
|
"dc3",
|
|
724
732
|
"dc4",
|
|
725
733
|
],
|
|
726
|
-
nearest_n=3,
|
|
727
734
|
),
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
stored_token="wxyz",
|
|
732
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
733
|
-
regexp="^(.*)-near-self$",
|
|
734
|
-
type="name_prefix_match",
|
|
735
|
-
),
|
|
736
|
-
token="abcd")
|
|
735
|
+
dns=consul.PreparedQueryDnsArgs(
|
|
736
|
+
ttl="5m",
|
|
737
|
+
))
|
|
737
738
|
```
|
|
738
|
-
<!--End PulumiCodeChooser -->
|
|
739
739
|
|
|
740
740
|
## Import
|
|
741
741
|
|
|
@@ -837,7 +837,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
837
837
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
838
838
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
839
839
|
:param pulumi.Input[bool] connect: When `true` the prepared query will return connect proxy services for a queried service. Conditions such as `tags` in the prepared query will be matched against the proxy service. Defaults to false.
|
|
840
|
-
:param pulumi.Input[str] datacenter:
|
|
840
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
841
841
|
:param pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']] dns: Settings for controlling the DNS response details.
|
|
842
842
|
:param pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
843
843
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] ignore_check_ids: Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.
|
|
@@ -887,7 +887,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
887
887
|
@pulumi.getter
|
|
888
888
|
def datacenter(self) -> pulumi.Output[Optional[str]]:
|
|
889
889
|
"""
|
|
890
|
-
|
|
890
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
891
891
|
"""
|
|
892
892
|
return pulumi.get(self, "datacenter")
|
|
893
893
|
|