pulumi-consul 3.12.0a1709360320__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 -14
- pulumi_consul/acl_binding_rule.py +12 -5
- pulumi_consul/acl_policy.py +9 -4
- pulumi_consul/acl_role.py +39 -30
- pulumi_consul/acl_role_policy_attachment.py +15 -8
- pulumi_consul/acl_token.py +36 -27
- pulumi_consul/acl_token_policy_attachment.py +7 -2
- pulumi_consul/acl_token_role_attachment.py +11 -4
- pulumi_consul/admin_partition.py +13 -4
- pulumi_consul/agent_service.py +7 -0
- pulumi_consul/autopilot_config.py +5 -0
- pulumi_consul/catalog_entry.py +16 -62
- pulumi_consul/certificate_authority.py +10 -51
- 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 +75 -26
- pulumi_consul/config_entry_service_defaults.py +58 -51
- pulumi_consul/config_entry_service_intentions.py +80 -71
- pulumi_consul/config_entry_service_resolver.py +94 -87
- pulumi_consul/config_entry_service_router.py +31 -62
- pulumi_consul/config_entry_service_splitter.py +104 -93
- pulumi_consul/config_entry_v2_exported_services.py +479 -0
- pulumi_consul/get_acl_auth_method.py +26 -8
- pulumi_consul/get_acl_policy.py +20 -5
- pulumi_consul/get_acl_role.py +24 -5
- pulumi_consul/get_acl_token.py +25 -5
- pulumi_consul/get_acl_token_secret_id.py +29 -11
- pulumi_consul/get_agent_config.py +17 -5
- pulumi_consul/get_agent_self.py +82 -5
- pulumi_consul/get_autopilot_health.py +16 -5
- 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 -38
- pulumi_consul/get_keys.py +44 -30
- pulumi_consul/get_network_area_members.py +26 -16
- pulumi_consul/get_network_segments.py +22 -14
- pulumi_consul/get_nodes.py +21 -9
- pulumi_consul/get_peering.py +22 -5
- pulumi_consul/get_peerings.py +14 -5
- 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 +17 -12
- pulumi_consul/key_prefix.py +48 -50
- pulumi_consul/keys.py +26 -30
- pulumi_consul/license.py +9 -2
- pulumi_consul/namespace.py +13 -4
- pulumi_consul/namespace_policy_attachment.py +11 -4
- pulumi_consul/namespace_role_attachment.py +11 -4
- pulumi_consul/network_area.py +11 -15
- pulumi_consul/node.py +19 -19
- pulumi_consul/outputs.py +30 -27
- pulumi_consul/peering.py +13 -18
- pulumi_consul/peering_token.py +55 -11
- pulumi_consul/prepared_query.py +101 -101
- pulumi_consul/provider.py +11 -6
- pulumi_consul/pulumi-plugin.json +2 -1
- pulumi_consul/service.py +144 -19
- {pulumi_consul-3.12.0a1709360320.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.0a1709360320.dist-info → pulumi_consul-3.13.0a1736832526.dist-info}/WHEEL +1 -1
- pulumi_consul-3.12.0a1709360320.dist-info/RECORD +0 -70
- {pulumi_consul-3.12.0a1709360320.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,7 +578,7 @@ 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
|
"""
|
|
@@ -593,67 +592,69 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
593
592
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
594
593
|
# the standby tag.
|
|
595
594
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
595
|
+
name="myquery",
|
|
596
596
|
datacenter="us-central1",
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
),
|
|
600
|
-
failover=consul.PreparedQueryFailoverArgs(
|
|
601
|
-
datacenters=[
|
|
602
|
-
"us-west1",
|
|
603
|
-
"us-east-2",
|
|
604
|
-
"asia-east1",
|
|
605
|
-
],
|
|
606
|
-
nearest_n=3,
|
|
607
|
-
),
|
|
608
|
-
near="_agent",
|
|
597
|
+
token="abcd",
|
|
598
|
+
stored_token="wxyz",
|
|
609
599
|
only_passing=True,
|
|
600
|
+
near="_agent",
|
|
610
601
|
service="myapp",
|
|
611
|
-
stored_token="wxyz",
|
|
612
602
|
tags=[
|
|
613
603
|
"active",
|
|
614
604
|
"!standby",
|
|
615
605
|
],
|
|
616
|
-
|
|
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
|
+
})
|
|
617
617
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
618
618
|
# and finds the nearest service that matches the glob character (e.g.
|
|
619
619
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
620
620
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
621
|
-
connect=True,
|
|
622
621
|
datacenter="nyc1",
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
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": [
|
|
628
636
|
"dc2",
|
|
629
637
|
"dc3",
|
|
630
638
|
"dc4",
|
|
631
639
|
],
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
service="${match(1)}",
|
|
637
|
-
stored_token="wxyz",
|
|
638
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
639
|
-
regexp="^(.*)-near-self$",
|
|
640
|
-
type="name_prefix_match",
|
|
641
|
-
),
|
|
642
|
-
token="abcd")
|
|
640
|
+
},
|
|
641
|
+
dns={
|
|
642
|
+
"ttl": "5m",
|
|
643
|
+
})
|
|
643
644
|
```
|
|
644
645
|
|
|
645
646
|
## Import
|
|
646
647
|
|
|
647
648
|
```sh
|
|
648
|
-
|
|
649
|
+
$ pulumi import consul:index/preparedQuery:PreparedQuery my_service 71ecfb82-717a-4258-b4b6-2fb75144d856
|
|
649
650
|
```
|
|
650
651
|
|
|
651
652
|
:param str resource_name: The name of the resource.
|
|
652
653
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
653
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.
|
|
654
|
-
:param pulumi.Input[str] datacenter:
|
|
655
|
-
:param pulumi.Input[
|
|
656
|
-
: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.
|
|
657
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.
|
|
658
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.
|
|
659
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.
|
|
@@ -664,7 +665,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
664
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.
|
|
665
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.
|
|
666
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.
|
|
667
|
-
: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
|
|
668
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.
|
|
669
670
|
"""
|
|
670
671
|
...
|
|
@@ -684,59 +685,61 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
684
685
|
# healthy myapp.service.consul instance that has the active tag and not
|
|
685
686
|
# the standby tag.
|
|
686
687
|
myapp_query = consul.PreparedQuery("myapp-query",
|
|
688
|
+
name="myquery",
|
|
687
689
|
datacenter="us-central1",
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
),
|
|
691
|
-
failover=consul.PreparedQueryFailoverArgs(
|
|
692
|
-
datacenters=[
|
|
693
|
-
"us-west1",
|
|
694
|
-
"us-east-2",
|
|
695
|
-
"asia-east1",
|
|
696
|
-
],
|
|
697
|
-
nearest_n=3,
|
|
698
|
-
),
|
|
699
|
-
near="_agent",
|
|
690
|
+
token="abcd",
|
|
691
|
+
stored_token="wxyz",
|
|
700
692
|
only_passing=True,
|
|
693
|
+
near="_agent",
|
|
701
694
|
service="myapp",
|
|
702
|
-
stored_token="wxyz",
|
|
703
695
|
tags=[
|
|
704
696
|
"active",
|
|
705
697
|
"!standby",
|
|
706
698
|
],
|
|
707
|
-
|
|
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
|
+
})
|
|
708
710
|
# Creates a Prepared Query Template that matches *-near-self.query.consul
|
|
709
711
|
# and finds the nearest service that matches the glob character (e.g.
|
|
710
712
|
# foo-near-self.query.consul will find the nearest healthy foo.service.consul).
|
|
711
713
|
service_near_self = consul.PreparedQuery("service-near-self",
|
|
712
|
-
connect=True,
|
|
713
714
|
datacenter="nyc1",
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
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": [
|
|
719
729
|
"dc2",
|
|
720
730
|
"dc3",
|
|
721
731
|
"dc4",
|
|
722
732
|
],
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
service="${match(1)}",
|
|
728
|
-
stored_token="wxyz",
|
|
729
|
-
template=consul.PreparedQueryTemplateArgs(
|
|
730
|
-
regexp="^(.*)-near-self$",
|
|
731
|
-
type="name_prefix_match",
|
|
732
|
-
),
|
|
733
|
-
token="abcd")
|
|
733
|
+
},
|
|
734
|
+
dns={
|
|
735
|
+
"ttl": "5m",
|
|
736
|
+
})
|
|
734
737
|
```
|
|
735
738
|
|
|
736
739
|
## Import
|
|
737
740
|
|
|
738
741
|
```sh
|
|
739
|
-
|
|
742
|
+
$ pulumi import consul:index/preparedQuery:PreparedQuery my_service 71ecfb82-717a-4258-b4b6-2fb75144d856
|
|
740
743
|
```
|
|
741
744
|
|
|
742
745
|
:param str resource_name: The name of the resource.
|
|
@@ -756,8 +759,8 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
756
759
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
757
760
|
connect: Optional[pulumi.Input[bool]] = None,
|
|
758
761
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
759
|
-
dns: Optional[pulumi.Input[
|
|
760
|
-
failover: Optional[pulumi.Input[
|
|
762
|
+
dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
|
|
763
|
+
failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
|
|
761
764
|
ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
762
765
|
name: Optional[pulumi.Input[str]] = None,
|
|
763
766
|
near: Optional[pulumi.Input[str]] = None,
|
|
@@ -768,7 +771,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
768
771
|
session: Optional[pulumi.Input[str]] = None,
|
|
769
772
|
stored_token: Optional[pulumi.Input[str]] = None,
|
|
770
773
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
771
|
-
template: Optional[pulumi.Input[
|
|
774
|
+
template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
|
|
772
775
|
token: Optional[pulumi.Input[str]] = None,
|
|
773
776
|
__props__=None):
|
|
774
777
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
@@ -811,8 +814,8 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
811
814
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
812
815
|
connect: Optional[pulumi.Input[bool]] = None,
|
|
813
816
|
datacenter: Optional[pulumi.Input[str]] = None,
|
|
814
|
-
dns: Optional[pulumi.Input[
|
|
815
|
-
failover: Optional[pulumi.Input[
|
|
817
|
+
dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
|
|
818
|
+
failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
|
|
816
819
|
ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
817
820
|
name: Optional[pulumi.Input[str]] = None,
|
|
818
821
|
near: Optional[pulumi.Input[str]] = None,
|
|
@@ -823,7 +826,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
823
826
|
session: Optional[pulumi.Input[str]] = None,
|
|
824
827
|
stored_token: Optional[pulumi.Input[str]] = None,
|
|
825
828
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
826
|
-
template: Optional[pulumi.Input[
|
|
829
|
+
template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
|
|
827
830
|
token: Optional[pulumi.Input[str]] = None) -> 'PreparedQuery':
|
|
828
831
|
"""
|
|
829
832
|
Get an existing PreparedQuery resource's state with the given name, id, and optional extra
|
|
@@ -833,9 +836,9 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
833
836
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
834
837
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
835
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.
|
|
836
|
-
:param pulumi.Input[str] datacenter:
|
|
837
|
-
:param pulumi.Input[
|
|
838
|
-
: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.
|
|
839
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.
|
|
840
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.
|
|
841
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.
|
|
@@ -846,7 +849,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
846
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.
|
|
847
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.
|
|
848
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.
|
|
849
|
-
: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
|
|
850
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.
|
|
851
854
|
"""
|
|
852
855
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -883,7 +886,7 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
883
886
|
@pulumi.getter
|
|
884
887
|
def datacenter(self) -> pulumi.Output[Optional[str]]:
|
|
885
888
|
"""
|
|
886
|
-
|
|
889
|
+
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
|
|
887
890
|
"""
|
|
888
891
|
return pulumi.get(self, "datacenter")
|
|
889
892
|
|
|
@@ -993,14 +996,11 @@ class PreparedQuery(pulumi.CustomResource):
|
|
|
993
996
|
|
|
994
997
|
@property
|
|
995
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""")
|
|
996
1001
|
def token(self) -> pulumi.Output[Optional[str]]:
|
|
997
1002
|
"""
|
|
998
1003
|
The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
|
|
999
1004
|
"""
|
|
1000
|
-
warnings.warn("""The token argument has been deprecated and will be removed in a future release.
|
|
1001
|
-
Please use the token argument in the provider configuration""", DeprecationWarning)
|
|
1002
|
-
pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
|
|
1003
|
-
Please use the token argument in the provider configuration""")
|
|
1004
|
-
|
|
1005
1005
|
return pulumi.get(self, "token")
|
|
1006
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