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/prepared_query.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 *
|
|
@@ -36,7 +41,7 @@ class PreparedQueryArgs:
|
|
|
36
41
|
The set of arguments for constructing a PreparedQuery resource.
|
|
37
42
|
:param pulumi.Input[str] service: The name of the service to query
|
|
38
43
|
: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:
|
|
44
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
40
45
|
:param pulumi.Input['PreparedQueryDnsArgs'] dns: Settings for controlling the DNS response details.
|
|
41
46
|
:param pulumi.Input['PreparedQueryFailoverArgs'] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
42
47
|
: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 +121,7 @@ Please use the token argument in the provider configuration""")
|
|
|
116
121
|
@pulumi.getter
|
|
117
122
|
def datacenter(self) -> Optional[pulumi.Input[str]]:
|
|
118
123
|
"""
|
|
119
|
-
|
|
124
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
120
125
|
"""
|
|
121
126
|
return pulumi.get(self, "datacenter")
|
|
122
127
|
|
|
@@ -270,15 +275,12 @@ Please use the token argument in the provider configuration""")
|
|
|
270
275
|
|
|
271
276
|
@property
|
|
272
277
|
@pulumi.getter
|
|
278
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
279
|
+
Please use the token argument in the provider configuration""")
|
|
273
280
|
def token(self) -> Optional[pulumi.Input[str]]:
|
|
274
281
|
"""
|
|
275
282
|
The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
276
283
|
"""
|
|
277
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
278
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
279
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
280
|
-
Please use the token argument in the provider configuration""")
|
|
281
|
-
|
|
282
284
|
return pulumi.get(self, "token")
|
|
283
285
|
|
|
284
286
|
@token.setter
|
|
@@ -308,7 +310,7 @@ class _PreparedQueryState:
|
|
|
308
310
|
"""
|
|
309
311
|
Input properties used for looking up and filtering PreparedQuery resources.
|
|
310
312
|
: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:
|
|
313
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
312
314
|
:param pulumi.Input['PreparedQueryDnsArgs'] dns: Settings for controlling the DNS response details.
|
|
313
315
|
:param pulumi.Input['PreparedQueryFailoverArgs'] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
314
316
|
: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 +380,7 @@ Please use the token argument in the provider configuration""")
|
|
|
378
380
|
@pulumi.getter
|
|
379
381
|
def datacenter(self) -> Optional[pulumi.Input[str]]:
|
|
380
382
|
"""
|
|
381
|
-
|
|
383
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
382
384
|
"""
|
|
383
385
|
return pulumi.get(self, "datacenter")
|
|
384
386
|
|
|
@@ -544,15 +546,12 @@ Please use the token argument in the provider configuration""")
|
|
|
544
546
|
|
|
545
547
|
@property
|
|
546
548
|
@pulumi.getter
|
|
549
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
550
|
+
Please use the token argument in the provider configuration""")
|
|
547
551
|
def token(self) -> Optional[pulumi.Input[str]]:
|
|
548
552
|
"""
|
|
549
553
|
The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
550
554
|
"""
|
|
551
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
552
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
553
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
554
|
-
Please use the token argument in the provider configuration""")
|
|
555
|
-
|
|
556
555
|
return pulumi.get(self, "token")
|
|
557
556
|
|
|
558
557
|
@token.setter
|
|
@@ -567,8 +566,8 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
567
566
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
568
567
|
connect: Optional[pulumi.Input[bool]] = None,
|
|
569
568
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
570
|
-
dns: Optional[pulumi.Input[
|
|
571
|
-
failover: Optional[pulumi.Input[
|
|
569
|
+
dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
|
|
570
|
+
failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
|
|
572
571
|
ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
573
572
|
name: Optional[pulumi.Input[str]] = None,
|
|
574
573
|
near: Optional[pulumi.Input[str]] = None,
|
|
@@ -579,13 +578,12 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
579
578
|
session: Optional[pulumi.Input[str]] = None,
|
|
580
579
|
stored_token: Optional[pulumi.Input[str]] = None,
|
|
581
580
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
582
|
-
template: Optional[pulumi.Input[
|
|
581
|
+
template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
|
|
583
582
|
token: Optional[pulumi.Input[str]] = None,
|
|
584
583
|
__props__=None):
|
|
585
584
|
"""
|
|
586
585
|
## Example Usage
|
|
587
586
|
|
|
588
|
-
<!--Start PulumiCodeChooser -->
|
|
589
587
|
```python
|
|
590
588
|
import pulumi
|
|
591
589
|
import pulumi_consul as consul
|
|
@@ -594,55 +592,56 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
594
592
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
595
593
|
# the standby tag.
|
|
596
594
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
595
|
+
name="myquery",
|
|
597
596
|
datacenter="us-central1",
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
),
|
|
601
|
-
failover=consul.PreparedQueryFailoverArgs(
|
|
602
|
-
datacenters=[
|
|
603
|
-
"us-west1",
|
|
604
|
-
"us-east-2",
|
|
605
|
-
"asia-east1",
|
|
606
|
-
],
|
|
607
|
-
nearest_n=3,
|
|
608
|
-
),
|
|
609
|
-
near="_agent",
|
|
597
|
+
token="abcd",
|
|
598
|
+
stored_token="wxyz",
|
|
610
599
|
only_passing=True,
|
|
600
|
+
near="_agent",
|
|
611
601
|
service="myapp",
|
|
612
|
-
stored_token="wxyz",
|
|
613
602
|
tags=[
|
|
614
603
|
"active",
|
|
615
604
|
"!standby",
|
|
616
605
|
],
|
|
617
|
-
|
|
606
|
+
failover={
|
|
607
|
+
"nearest_n": 3,
|
|
608
|
+
"datacenters": [
|
|
609
|
+
"us-west1",
|
|
610
|
+
"us-east-2",
|
|
611
|
+
"asia-east1",
|
|
612
|
+
],
|
|
613
|
+
},
|
|
614
|
+
dns={
|
|
615
|
+
"ttl": "30s",
|
|
616
|
+
})
|
|
618
617
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
619
618
|
# and finds the nearest service that matches the glob character (e.g.
|
|
620
619
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
621
620
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
622
|
-
connect=True,
|
|
623
621
|
datacenter="nyc1",
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
622
|
+
token="abcd",
|
|
623
|
+
stored_token="wxyz",
|
|
624
|
+
name="",
|
|
625
|
+
only_passing=True,
|
|
626
|
+
connect=True,
|
|
627
|
+
near="_agent",
|
|
628
|
+
template={
|
|
629
|
+
"type": "name_prefix_match",
|
|
630
|
+
"regexp": "^(.*)-near-self$",
|
|
631
|
+
},
|
|
632
|
+
service="${match(1)}",
|
|
633
|
+
failover={
|
|
634
|
+
"nearest_n": 3,
|
|
635
|
+
"datacenters": [
|
|
629
636
|
"dc2",
|
|
630
637
|
"dc3",
|
|
631
638
|
"dc4",
|
|
632
639
|
],
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
service="${match(1)}",
|
|
638
|
-
stored_token="wxyz",
|
|
639
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
640
|
-
regexp="^(.*)-near-self$",
|
|
641
|
-
type="name_prefix_match",
|
|
642
|
-
),
|
|
643
|
-
token="abcd")
|
|
640
|
+
},
|
|
641
|
+
dns={
|
|
642
|
+
"ttl": "5m",
|
|
643
|
+
})
|
|
644
644
|
```
|
|
645
|
-
<!--End PulumiCodeChooser -->
|
|
646
645
|
|
|
647
646
|
## Import
|
|
648
647
|
|
|
@@ -653,9 +652,9 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
653
652
|
:param str resource_name: The name of the resource.
|
|
654
653
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
655
654
|
: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:
|
|
657
|
-
:param pulumi.Input[
|
|
658
|
-
:param pulumi.Input[
|
|
655
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
656
|
+
:param pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']] dns: Settings for controlling the DNS response details.
|
|
657
|
+
:param pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
659
658
|
: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.
|
|
660
659
|
:param pulumi.Input[str] name: The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.
|
|
661
660
|
:param pulumi.Input[str] near: Allows specifying the name of a node to sort results near using Consul's distance sorting and network coordinates. The magic `_agent` value can be used to always sort nearest the node servicing the request.
|
|
@@ -666,7 +665,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
666
665
|
:param pulumi.Input[str] session: The name of the Consul session to tie this query's lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.
|
|
667
666
|
:param pulumi.Input[str] stored_token: The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.
|
|
668
667
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a "!" then it is disallowed.
|
|
669
|
-
:param pulumi.Input[
|
|
668
|
+
:param pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']] template: Query templating options. This is used to make a single prepared query respond to many different requests
|
|
670
669
|
:param pulumi.Input[str] token: The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
671
670
|
"""
|
|
672
671
|
...
|
|
@@ -678,7 +677,6 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
678
677
|
"""
|
|
679
678
|
## Example Usage
|
|
680
679
|
|
|
681
|
-
<!--Start PulumiCodeChooser -->
|
|
682
680
|
```python
|
|
683
681
|
import pulumi
|
|
684
682
|
import pulumi_consul as consul
|
|
@@ -687,55 +685,56 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
687
685
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
688
686
|
# the standby tag.
|
|
689
687
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
688
|
+
name="myquery",
|
|
690
689
|
datacenter="us-central1",
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
),
|
|
694
|
-
failover=consul.PreparedQueryFailoverArgs(
|
|
695
|
-
datacenters=[
|
|
696
|
-
"us-west1",
|
|
697
|
-
"us-east-2",
|
|
698
|
-
"asia-east1",
|
|
699
|
-
],
|
|
700
|
-
nearest_n=3,
|
|
701
|
-
),
|
|
702
|
-
near="_agent",
|
|
690
|
+
token="abcd",
|
|
691
|
+
stored_token="wxyz",
|
|
703
692
|
only_passing=True,
|
|
693
|
+
near="_agent",
|
|
704
694
|
service="myapp",
|
|
705
|
-
stored_token="wxyz",
|
|
706
695
|
tags=[
|
|
707
696
|
"active",
|
|
708
697
|
"!standby",
|
|
709
698
|
],
|
|
710
|
-
|
|
699
|
+
failover={
|
|
700
|
+
"nearest_n": 3,
|
|
701
|
+
"datacenters": [
|
|
702
|
+
"us-west1",
|
|
703
|
+
"us-east-2",
|
|
704
|
+
"asia-east1",
|
|
705
|
+
],
|
|
706
|
+
},
|
|
707
|
+
dns={
|
|
708
|
+
"ttl": "30s",
|
|
709
|
+
})
|
|
711
710
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
712
711
|
# and finds the nearest service that matches the glob character (e.g.
|
|
713
712
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
714
713
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
715
|
-
connect=True,
|
|
716
714
|
datacenter="nyc1",
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
715
|
+
token="abcd",
|
|
716
|
+
stored_token="wxyz",
|
|
717
|
+
name="",
|
|
718
|
+
only_passing=True,
|
|
719
|
+
connect=True,
|
|
720
|
+
near="_agent",
|
|
721
|
+
template={
|
|
722
|
+
"type": "name_prefix_match",
|
|
723
|
+
"regexp": "^(.*)-near-self$",
|
|
724
|
+
},
|
|
725
|
+
service="${match(1)}",
|
|
726
|
+
failover={
|
|
727
|
+
"nearest_n": 3,
|
|
728
|
+
"datacenters": [
|
|
722
729
|
"dc2",
|
|
723
730
|
"dc3",
|
|
724
731
|
"dc4",
|
|
725
732
|
],
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
service="${match(1)}",
|
|
731
|
-
stored_token="wxyz",
|
|
732
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
733
|
-
regexp="^(.*)-near-self$",
|
|
734
|
-
type="name_prefix_match",
|
|
735
|
-
),
|
|
736
|
-
token="abcd")
|
|
733
|
+
},
|
|
734
|
+
dns={
|
|
735
|
+
"ttl": "5m",
|
|
736
|
+
})
|
|
737
737
|
```
|
|
738
|
-
<!--End PulumiCodeChooser -->
|
|
739
738
|
|
|
740
739
|
## Import
|
|
741
740
|
|
|
@@ -760,8 +759,8 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
760
759
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
761
760
|
connect: Optional[pulumi.Input[bool]] = None,
|
|
762
761
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
763
|
-
dns: Optional[pulumi.Input[
|
|
764
|
-
failover: Optional[pulumi.Input[
|
|
762
|
+
dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
|
|
763
|
+
failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
|
|
765
764
|
ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
766
765
|
name: Optional[pulumi.Input[str]] = None,
|
|
767
766
|
near: Optional[pulumi.Input[str]] = None,
|
|
@@ -772,7 +771,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
772
771
|
session: Optional[pulumi.Input[str]] = None,
|
|
773
772
|
stored_token: Optional[pulumi.Input[str]] = None,
|
|
774
773
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
775
|
-
template: Optional[pulumi.Input[
|
|
774
|
+
template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
|
|
776
775
|
token: Optional[pulumi.Input[str]] = None,
|
|
777
776
|
__props__=None):
|
|
778
777
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
@@ -815,8 +814,8 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
815
814
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
816
815
|
connect: Optional[pulumi.Input[bool]] = None,
|
|
817
816
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
818
|
-
dns: Optional[pulumi.Input[
|
|
819
|
-
failover: Optional[pulumi.Input[
|
|
817
|
+
dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
|
|
818
|
+
failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
|
|
820
819
|
ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
821
820
|
name: Optional[pulumi.Input[str]] = None,
|
|
822
821
|
near: Optional[pulumi.Input[str]] = None,
|
|
@@ -827,7 +826,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
827
826
|
session: Optional[pulumi.Input[str]] = None,
|
|
828
827
|
stored_token: Optional[pulumi.Input[str]] = None,
|
|
829
828
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
830
|
-
template: Optional[pulumi.Input[
|
|
829
|
+
template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
|
|
831
830
|
token: Optional[pulumi.Input[str]] = None) -> 'PreparedQuery':
|
|
832
831
|
"""
|
|
833
832
|
Get an existing PreparedQuery resource's state with the given name, id, and optional extra
|
|
@@ -837,9 +836,9 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
837
836
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
838
837
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
839
838
|
: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:
|
|
841
|
-
:param pulumi.Input[
|
|
842
|
-
:param pulumi.Input[
|
|
839
|
+
:param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
840
|
+
:param pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']] dns: Settings for controlling the DNS response details.
|
|
841
|
+
:param pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
|
|
843
842
|
: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.
|
|
844
843
|
:param pulumi.Input[str] name: The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.
|
|
845
844
|
:param pulumi.Input[str] near: Allows specifying the name of a node to sort results near using Consul's distance sorting and network coordinates. The magic `_agent` value can be used to always sort nearest the node servicing the request.
|
|
@@ -850,7 +849,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
850
849
|
:param pulumi.Input[str] session: The name of the Consul session to tie this query's lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.
|
|
851
850
|
:param pulumi.Input[str] stored_token: The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.
|
|
852
851
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a "!" then it is disallowed.
|
|
853
|
-
:param pulumi.Input[
|
|
852
|
+
:param pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']] template: Query templating options. This is used to make a single prepared query respond to many different requests
|
|
854
853
|
:param pulumi.Input[str] token: The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
855
854
|
"""
|
|
856
855
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -887,7 +886,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
887
886
|
@pulumi.getter
|
|
888
887
|
def datacenter(self) -> pulumi.Output[Optional[str]]:
|
|
889
888
|
"""
|
|
890
|
-
|
|
889
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
891
890
|
"""
|
|
892
891
|
return pulumi.get(self, "datacenter")
|
|
893
892
|
|
|
@@ -997,14 +996,11 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
997
996
|
|
|
998
997
|
@property
|
|
999
998
|
@pulumi.getter
|
|
999
|
+
@_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
|
|
1000
|
+
Please use the token argument in the provider configuration""")
|
|
1000
1001
|
def token(self) -> pulumi.Output[Optional[str]]:
|
|
1001
1002
|
"""
|
|
1002
1003
|
The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
1003
1004
|
"""
|
|
1004
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
1005
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
1006
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
1007
|
-
Please use the token argument in the provider configuration""")
|
|
1008
|
-
|
|
1009
1005
|
return pulumi.get(self, "token")
|
|
1010
1006
|
|
pulumi_consul/provider.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 ._inputs import *
|
|
12
17
|
|
|
@@ -288,14 +293,14 @@ class Provider(pulumi.ProviderResource):
|
|
|
288
293
|
resource_name: str,
|
|
289
294
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
290
295
|
address: Optional[pulumi.Input[str]] = None,
|
|
291
|
-
auth_jwt: Optional[pulumi.Input[
|
|
296
|
+
auth_jwt: Optional[pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']]] = None,
|
|
292
297
|
ca_file: Optional[pulumi.Input[str]] = None,
|
|
293
298
|
ca_path: Optional[pulumi.Input[str]] = None,
|
|
294
299
|
ca_pem: Optional[pulumi.Input[str]] = None,
|
|
295
300
|
cert_file: Optional[pulumi.Input[str]] = None,
|
|
296
301
|
cert_pem: Optional[pulumi.Input[str]] = None,
|
|
297
302
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
298
|
-
headers: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
303
|
+
headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
|
|
299
304
|
http_auth: Optional[pulumi.Input[str]] = None,
|
|
300
305
|
insecure_https: Optional[pulumi.Input[bool]] = None,
|
|
301
306
|
key_file: Optional[pulumi.Input[str]] = None,
|
|
@@ -313,7 +318,7 @@ class Provider(pulumi.ProviderResource):
|
|
|
313
318
|
:param str resource_name: The name of the resource.
|
|
314
319
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
315
320
|
:param pulumi.Input[str] address: The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
|
|
316
|
-
:param pulumi.Input[
|
|
321
|
+
:param pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']] auth_jwt: Authenticates to Consul using a JWT authentication method.
|
|
317
322
|
:param pulumi.Input[str] ca_file: A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
|
|
318
323
|
:param pulumi.Input[str] ca_path: A path to a directory of PEM-encoded certificate authority files to use to check the authenticity of client and server
|
|
319
324
|
connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
|
|
@@ -321,7 +326,7 @@ class Provider(pulumi.ProviderResource):
|
|
|
321
326
|
:param pulumi.Input[str] cert_file: A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
|
|
322
327
|
:param pulumi.Input[str] cert_pem: PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
|
|
323
328
|
:param pulumi.Input[str] datacenter: The datacenter to use. Defaults to that of the agent.
|
|
324
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
329
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]] headers: A configuration block, described below, that provides additional headers to be sent along with all requests to the
|
|
325
330
|
Consul server. This block can be specified multiple times.
|
|
326
331
|
:param pulumi.Input[str] http_auth: HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or
|
|
327
332
|
`user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
|
|
@@ -361,14 +366,14 @@ class Provider(pulumi.ProviderResource):
|
|
|
361
366
|
resource_name: str,
|
|
362
367
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
363
368
|
address: Optional[pulumi.Input[str]] = None,
|
|
364
|
-
auth_jwt: Optional[pulumi.Input[
|
|
369
|
+
auth_jwt: Optional[pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']]] = None,
|
|
365
370
|
ca_file: Optional[pulumi.Input[str]] = None,
|
|
366
371
|
ca_path: Optional[pulumi.Input[str]] = None,
|
|
367
372
|
ca_pem: Optional[pulumi.Input[str]] = None,
|
|
368
373
|
cert_file: Optional[pulumi.Input[str]] = None,
|
|
369
374
|
cert_pem: Optional[pulumi.Input[str]] = None,
|
|
370
375
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
371
|
-
headers: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
376
|
+
headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
|
|
372
377
|
http_auth: Optional[pulumi.Input[str]] = None,
|
|
373
378
|
insecure_https: Optional[pulumi.Input[bool]] = None,
|
|
374
379
|
key_file: Optional[pulumi.Input[str]] = None,
|
pulumi_consul/pulumi-plugin.json
CHANGED