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.

Files changed (71) hide show
  1. pulumi_consul/__init__.py +10 -0
  2. pulumi_consul/_inputs.py +1592 -31
  3. pulumi_consul/_utilities.py +41 -5
  4. pulumi_consul/acl_auth_method.py +17 -14
  5. pulumi_consul/acl_binding_rule.py +12 -5
  6. pulumi_consul/acl_policy.py +9 -4
  7. pulumi_consul/acl_role.py +39 -30
  8. pulumi_consul/acl_role_policy_attachment.py +15 -8
  9. pulumi_consul/acl_token.py +36 -27
  10. pulumi_consul/acl_token_policy_attachment.py +7 -2
  11. pulumi_consul/acl_token_role_attachment.py +11 -4
  12. pulumi_consul/admin_partition.py +13 -4
  13. pulumi_consul/agent_service.py +7 -0
  14. pulumi_consul/autopilot_config.py +5 -0
  15. pulumi_consul/catalog_entry.py +16 -62
  16. pulumi_consul/certificate_authority.py +10 -51
  17. pulumi_consul/config/__init__.pyi +5 -0
  18. pulumi_consul/config/outputs.py +5 -0
  19. pulumi_consul/config/vars.py +5 -0
  20. pulumi_consul/config_entry.py +75 -26
  21. pulumi_consul/config_entry_service_defaults.py +58 -51
  22. pulumi_consul/config_entry_service_intentions.py +80 -71
  23. pulumi_consul/config_entry_service_resolver.py +94 -87
  24. pulumi_consul/config_entry_service_router.py +31 -62
  25. pulumi_consul/config_entry_service_splitter.py +104 -93
  26. pulumi_consul/config_entry_v2_exported_services.py +479 -0
  27. pulumi_consul/get_acl_auth_method.py +26 -8
  28. pulumi_consul/get_acl_policy.py +20 -5
  29. pulumi_consul/get_acl_role.py +24 -5
  30. pulumi_consul/get_acl_token.py +25 -5
  31. pulumi_consul/get_acl_token_secret_id.py +29 -11
  32. pulumi_consul/get_agent_config.py +17 -5
  33. pulumi_consul/get_agent_self.py +82 -5
  34. pulumi_consul/get_autopilot_health.py +16 -5
  35. pulumi_consul/get_catalog_nodes.py +21 -9
  36. pulumi_consul/get_catalog_service.py +56 -13
  37. pulumi_consul/get_catalog_services.py +53 -9
  38. pulumi_consul/get_config_entry.py +20 -5
  39. pulumi_consul/get_config_entry_v2_exported_services.py +232 -0
  40. pulumi_consul/get_datacenters.py +12 -5
  41. pulumi_consul/get_key_prefix.py +55 -38
  42. pulumi_consul/get_keys.py +44 -30
  43. pulumi_consul/get_network_area_members.py +26 -16
  44. pulumi_consul/get_network_segments.py +22 -14
  45. pulumi_consul/get_nodes.py +21 -9
  46. pulumi_consul/get_peering.py +22 -5
  47. pulumi_consul/get_peerings.py +14 -5
  48. pulumi_consul/get_service.py +56 -13
  49. pulumi_consul/get_service_health.py +28 -5
  50. pulumi_consul/get_services.py +53 -9
  51. pulumi_consul/intention.py +17 -12
  52. pulumi_consul/key_prefix.py +48 -50
  53. pulumi_consul/keys.py +26 -30
  54. pulumi_consul/license.py +9 -2
  55. pulumi_consul/namespace.py +13 -4
  56. pulumi_consul/namespace_policy_attachment.py +11 -4
  57. pulumi_consul/namespace_role_attachment.py +11 -4
  58. pulumi_consul/network_area.py +11 -15
  59. pulumi_consul/node.py +19 -19
  60. pulumi_consul/outputs.py +30 -27
  61. pulumi_consul/peering.py +13 -18
  62. pulumi_consul/peering_token.py +55 -11
  63. pulumi_consul/prepared_query.py +101 -101
  64. pulumi_consul/provider.py +11 -6
  65. pulumi_consul/pulumi-plugin.json +2 -1
  66. pulumi_consul/service.py +144 -19
  67. {pulumi_consul-3.12.0a1709360320.dist-info → pulumi_consul-3.13.0a1736832526.dist-info}/METADATA +7 -6
  68. pulumi_consul-3.13.0a1736832526.dist-info/RECORD +72 -0
  69. {pulumi_consul-3.12.0a1709360320.dist-info → pulumi_consul-3.13.0a1736832526.dist-info}/WHEEL +1 -1
  70. pulumi_consul-3.12.0a1709360320.dist-info/RECORD +0 -70
  71. {pulumi_consul-3.12.0a1709360320.dist-info → pulumi_consul-3.13.0a1736832526.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -65,12 +70,9 @@ class GetNetworkAreaMembersResult:
65
70
 
66
71
  @property
67
72
  @pulumi.getter
68
- def token(self) -> Optional[str]:
69
- warnings.warn("""The token argument has been deprecated and will be removed in a future release.
70
- Please use the token argument in the provider configuration""", DeprecationWarning)
71
- pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
73
+ @_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
72
74
  Please use the token argument in the provider configuration""")
73
-
75
+ def token(self) -> Optional[str]:
74
76
  return pulumi.get(self, "token")
75
77
 
76
78
  @property
@@ -111,12 +113,12 @@ def get_network_area_members(datacenter: Optional[str] = None,
111
113
  import pulumi
112
114
  import pulumi_consul as consul
113
115
 
114
- dc2_network_area = consul.NetworkArea("dc2NetworkArea",
116
+ dc2_network_area = consul.NetworkArea("dc2",
115
117
  peer_datacenter="dc2",
116
118
  retry_joins=["1.2.3.4"],
117
119
  use_tls=True)
118
- dc2_network_area_members = consul.get_network_area_members_output(uuid=dc2_network_area.id)
119
- pulumi.export("members", dc2_network_area_members.members)
120
+ dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
121
+ pulumi.export("members", dc2.members)
120
122
  ```
121
123
 
122
124
 
@@ -139,13 +141,10 @@ def get_network_area_members(datacenter: Optional[str] = None,
139
141
  members=pulumi.get(__ret__, 'members'),
140
142
  token=pulumi.get(__ret__, 'token'),
141
143
  uuid=pulumi.get(__ret__, 'uuid'))
142
-
143
-
144
- @_utilities.lift_output_func(get_network_area_members)
145
144
  def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
146
145
  token: Optional[pulumi.Input[Optional[str]]] = None,
147
146
  uuid: Optional[pulumi.Input[str]] = None,
148
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkAreaMembersResult]:
147
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkAreaMembersResult]:
149
148
  """
150
149
  > **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html).
151
150
 
@@ -158,12 +157,12 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
158
157
  import pulumi
159
158
  import pulumi_consul as consul
160
159
 
161
- dc2_network_area = consul.NetworkArea("dc2NetworkArea",
160
+ dc2_network_area = consul.NetworkArea("dc2",
162
161
  peer_datacenter="dc2",
163
162
  retry_joins=["1.2.3.4"],
164
163
  use_tls=True)
165
- dc2_network_area_members = consul.get_network_area_members_output(uuid=dc2_network_area.id)
166
- pulumi.export("members", dc2_network_area_members.members)
164
+ dc2 = consul.get_network_area_members_output(uuid=dc2_network_area.id)
165
+ pulumi.export("members", dc2.members)
167
166
  ```
168
167
 
169
168
 
@@ -173,4 +172,15 @@ def get_network_area_members_output(datacenter: Optional[pulumi.Input[Optional[s
173
172
  token that the agent provides by default.
174
173
  :param str uuid: The UUID of the area to list.
175
174
  """
176
- ...
175
+ __args__ = dict()
176
+ __args__['datacenter'] = datacenter
177
+ __args__['token'] = token
178
+ __args__['uuid'] = uuid
179
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
180
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getNetworkAreaMembers:getNetworkAreaMembers', __args__, opts=opts, typ=GetNetworkAreaMembersResult)
181
+ return __ret__.apply(lambda __response__: GetNetworkAreaMembersResult(
182
+ datacenter=pulumi.get(__response__, 'datacenter'),
183
+ id=pulumi.get(__response__, 'id'),
184
+ members=pulumi.get(__response__, 'members'),
185
+ token=pulumi.get(__response__, 'token'),
186
+ uuid=pulumi.get(__response__, 'uuid')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -61,12 +66,9 @@ class GetNetworkSegmentsResult:
61
66
 
62
67
  @property
63
68
  @pulumi.getter
64
- def token(self) -> Optional[str]:
65
- warnings.warn("""The token argument has been deprecated and will be removed in a future release.
66
- Please use the token argument in the provider configuration""", DeprecationWarning)
67
- pulumi.log.warn("""token is deprecated: The token argument has been deprecated and will be removed in a future release.
69
+ @_utilities.deprecated("""The token argument has been deprecated and will be removed in a future release.
68
70
  Please use the token argument in the provider configuration""")
69
-
71
+ def token(self) -> Optional[str]:
70
72
  return pulumi.get(self, "token")
71
73
 
72
74
 
@@ -97,8 +99,8 @@ def get_network_segments(datacenter: Optional[str] = None,
97
99
  import pulumi
98
100
  import pulumi_consul as consul
99
101
 
100
- segments_network_segments = consul.get_network_segments()
101
- pulumi.export("segments", segments_network_segments.segments)
102
+ segments = consul.get_network_segments()
103
+ pulumi.export("segments", segments.segments)
102
104
  ```
103
105
 
104
106
 
@@ -118,12 +120,9 @@ def get_network_segments(datacenter: Optional[str] = None,
118
120
  id=pulumi.get(__ret__, 'id'),
119
121
  segments=pulumi.get(__ret__, 'segments'),
120
122
  token=pulumi.get(__ret__, 'token'))
121
-
122
-
123
- @_utilities.lift_output_func(get_network_segments)
124
123
  def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
125
124
  token: Optional[pulumi.Input[Optional[str]]] = None,
126
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkSegmentsResult]:
125
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkSegmentsResult]:
127
126
  """
128
127
  > **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html).
129
128
 
@@ -136,8 +135,8 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
136
135
  import pulumi
137
136
  import pulumi_consul as consul
138
137
 
139
- segments_network_segments = consul.get_network_segments()
140
- pulumi.export("segments", segments_network_segments.segments)
138
+ segments = consul.get_network_segments()
139
+ pulumi.export("segments", segments.segments)
141
140
  ```
142
141
 
143
142
 
@@ -146,4 +145,13 @@ def get_network_segments_output(datacenter: Optional[pulumi.Input[Optional[str]]
146
145
  :param str token: The ACL token to use. This overrides the
147
146
  token that the agent provides by default.
148
147
  """
149
- ...
148
+ __args__ = dict()
149
+ __args__['datacenter'] = datacenter
150
+ __args__['token'] = token
151
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
152
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getNetworkSegments:getNetworkSegments', __args__, opts=opts, typ=GetNetworkSegmentsResult)
153
+ return __ret__.apply(lambda __response__: GetNetworkSegmentsResult(
154
+ datacenter=pulumi.get(__response__, 'datacenter'),
155
+ id=pulumi.get(__response__, 'id'),
156
+ segments=pulumi.get(__response__, 'segments'),
157
+ token=pulumi.get(__response__, 'token')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -104,7 +109,7 @@ class AwaitableGetNodesResult(GetNodesResult):
104
109
  query_options=self.query_options)
105
110
 
106
111
 
107
- def get_nodes(query_options: Optional[Sequence[pulumi.InputType['GetNodesQueryOptionArgs']]] = None,
112
+ def get_nodes(query_options: Optional[Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']]] = None,
108
113
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodesResult:
109
114
  """
110
115
  The `get_nodes` data source returns a list of Consul nodes that have
@@ -113,7 +118,7 @@ def get_nodes(query_options: Optional[Sequence[pulumi.InputType['GetNodesQueryOp
113
118
  nodes from a different WAN-attached Consul datacenter.
114
119
 
115
120
 
116
- :param Sequence[pulumi.InputType['GetNodesQueryOptionArgs']] query_options: See below.
121
+ :param Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']] query_options: See below.
117
122
  """
118
123
  __args__ = dict()
119
124
  __args__['queryOptions'] = query_options
@@ -127,11 +132,8 @@ def get_nodes(query_options: Optional[Sequence[pulumi.InputType['GetNodesQueryOp
127
132
  node_names=pulumi.get(__ret__, 'node_names'),
128
133
  nodes=pulumi.get(__ret__, 'nodes'),
129
134
  query_options=pulumi.get(__ret__, 'query_options'))
130
-
131
-
132
- @_utilities.lift_output_func(get_nodes)
133
- def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNodesQueryOptionArgs']]]]] = None,
134
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodesResult]:
135
+ def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']]]]] = None,
136
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNodesResult]:
135
137
  """
136
138
  The `get_nodes` data source returns a list of Consul nodes that have
137
139
  been registered with the Consul cluster in a given datacenter. By specifying a
@@ -139,6 +141,16 @@ def get_nodes_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulu
139
141
  nodes from a different WAN-attached Consul datacenter.
140
142
 
141
143
 
142
- :param Sequence[pulumi.InputType['GetNodesQueryOptionArgs']] query_options: See below.
144
+ :param Sequence[Union['GetNodesQueryOptionArgs', 'GetNodesQueryOptionArgsDict']] query_options: See below.
143
145
  """
144
- ...
146
+ __args__ = dict()
147
+ __args__['queryOptions'] = query_options
148
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
149
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getNodes:getNodes', __args__, opts=opts, typ=GetNodesResult)
150
+ return __ret__.apply(lambda __response__: GetNodesResult(
151
+ datacenter=pulumi.get(__response__, 'datacenter'),
152
+ id=pulumi.get(__response__, 'id'),
153
+ node_ids=pulumi.get(__response__, 'node_ids'),
154
+ node_names=pulumi.get(__response__, 'node_names'),
155
+ nodes=pulumi.get(__response__, 'nodes'),
156
+ query_options=pulumi.get(__response__, 'query_options')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -155,12 +160,9 @@ def get_peering(partition: Optional[str] = None,
155
160
  peer_server_addresses=pulumi.get(__ret__, 'peer_server_addresses'),
156
161
  peer_server_name=pulumi.get(__ret__, 'peer_server_name'),
157
162
  state=pulumi.get(__ret__, 'state'))
158
-
159
-
160
- @_utilities.lift_output_func(get_peering)
161
163
  def get_peering_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
162
164
  peer_name: Optional[pulumi.Input[str]] = None,
163
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPeeringResult]:
165
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPeeringResult]:
164
166
  """
165
167
  ## Example Usage
166
168
 
@@ -171,4 +173,19 @@ def get_peering_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
171
173
  basic = consul.get_peering(peer_name="peered-cluster")
172
174
  ```
173
175
  """
174
- ...
176
+ __args__ = dict()
177
+ __args__['partition'] = partition
178
+ __args__['peerName'] = peer_name
179
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
180
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getPeering:getPeering', __args__, opts=opts, typ=GetPeeringResult)
181
+ return __ret__.apply(lambda __response__: GetPeeringResult(
182
+ deleted_at=pulumi.get(__response__, 'deleted_at'),
183
+ id=pulumi.get(__response__, 'id'),
184
+ meta=pulumi.get(__response__, 'meta'),
185
+ partition=pulumi.get(__response__, 'partition'),
186
+ peer_ca_pems=pulumi.get(__response__, 'peer_ca_pems'),
187
+ peer_id=pulumi.get(__response__, 'peer_id'),
188
+ peer_name=pulumi.get(__response__, 'peer_name'),
189
+ peer_server_addresses=pulumi.get(__response__, 'peer_server_addresses'),
190
+ peer_server_name=pulumi.get(__response__, 'peer_server_name'),
191
+ state=pulumi.get(__response__, 'state')))
@@ -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
 
@@ -84,11 +89,8 @@ def get_peerings(partition: Optional[str] = None,
84
89
  id=pulumi.get(__ret__, 'id'),
85
90
  partition=pulumi.get(__ret__, 'partition'),
86
91
  peers=pulumi.get(__ret__, 'peers'))
87
-
88
-
89
- @_utilities.lift_output_func(get_peerings)
90
92
  def get_peerings_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
91
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPeeringsResult]:
93
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPeeringsResult]:
92
94
  """
93
95
  ## Example Usage
94
96
 
@@ -99,4 +101,11 @@ def get_peerings_output(partition: Optional[pulumi.Input[Optional[str]]] = None,
99
101
  peers = consul.get_peerings()
100
102
  ```
101
103
  """
102
- ...
104
+ __args__ = dict()
105
+ __args__['partition'] = partition
106
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
107
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getPeerings:getPeerings', __args__, opts=opts, typ=GetPeeringsResult)
108
+ return __ret__.apply(lambda __response__: GetPeeringsResult(
109
+ id=pulumi.get(__response__, 'id'),
110
+ partition=pulumi.get(__response__, 'partition'),
111
+ peers=pulumi.get(__response__, 'peers')))
@@ -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 *
@@ -117,7 +122,7 @@ class AwaitableGetServiceResult(GetServiceResult):
117
122
  def get_service(datacenter: Optional[str] = None,
118
123
  filter: Optional[str] = None,
119
124
  name: Optional[str] = None,
120
- query_options: Optional[Sequence[pulumi.InputType['GetServiceQueryOptionArgs']]] = None,
125
+ query_options: Optional[Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']]] = None,
121
126
  tag: Optional[str] = None,
122
127
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServiceResult:
123
128
  """
@@ -130,15 +135,28 @@ def get_service(datacenter: Optional[str] = None,
130
135
  This data source is different from the `get_services` (plural) data
131
136
  source, which provides a summary of the current Consul services.
132
137
 
138
+ ## Example Usage
139
+
140
+ ```python
141
+ import pulumi
142
+ import pulumi_consul as consul
143
+ import pulumi_example as example
144
+ import pulumi_std as std
145
+
146
+ read_consul_dc1 = consul.get_service(name="consul",
147
+ datacenter="dc1")
148
+ # Set the description to a whitespace delimited list of the node names
149
+ app = example.index.Resource("app", description=std.join(separator= ,
150
+ input=nodes).result)
151
+ ```
152
+
133
153
 
134
154
  :param str datacenter: The Consul datacenter to query. Defaults to the
135
155
  same value found in `query_options` parameter specified below, or if that is
136
156
  empty, the `datacenter` value found in the Consul agent that this provider is
137
157
  configured to talk to.
138
- :param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
139
- and https://www.consul.io/api-docs/catalog#filtering-1.
140
158
  :param str name: The service name to select.
141
- :param Sequence[pulumi.InputType['GetServiceQueryOptionArgs']] query_options: See below.
159
+ :param Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']] query_options: See below.
142
160
  :param str tag: A single tag that can be used to filter the list of nodes
143
161
  to return based on a single matching tag..
144
162
  """
@@ -159,15 +177,12 @@ def get_service(datacenter: Optional[str] = None,
159
177
  query_options=pulumi.get(__ret__, 'query_options'),
160
178
  services=pulumi.get(__ret__, 'services'),
161
179
  tag=pulumi.get(__ret__, 'tag'))
162
-
163
-
164
- @_utilities.lift_output_func(get_service)
165
180
  def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
166
181
  filter: Optional[pulumi.Input[Optional[str]]] = None,
167
182
  name: Optional[pulumi.Input[str]] = None,
168
- query_options: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetServiceQueryOptionArgs']]]]] = None,
183
+ query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']]]]] = None,
169
184
  tag: Optional[pulumi.Input[Optional[str]]] = None,
170
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServiceResult]:
185
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServiceResult]:
171
186
  """
172
187
  `Service` provides details about a specific Consul service in a
173
188
  given datacenter. The results include a list of nodes advertising the specified
@@ -178,16 +193,44 @@ def get_service_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
178
193
  This data source is different from the `get_services` (plural) data
179
194
  source, which provides a summary of the current Consul services.
180
195
 
196
+ ## Example Usage
197
+
198
+ ```python
199
+ import pulumi
200
+ import pulumi_consul as consul
201
+ import pulumi_example as example
202
+ import pulumi_std as std
203
+
204
+ read_consul_dc1 = consul.get_service(name="consul",
205
+ datacenter="dc1")
206
+ # Set the description to a whitespace delimited list of the node names
207
+ app = example.index.Resource("app", description=std.join(separator= ,
208
+ input=nodes).result)
209
+ ```
210
+
181
211
 
182
212
  :param str datacenter: The Consul datacenter to query. Defaults to the
183
213
  same value found in `query_options` parameter specified below, or if that is
184
214
  empty, the `datacenter` value found in the Consul agent that this provider is
185
215
  configured to talk to.
186
- :param str filter: A filter expression to refine the query, see https://www.consul.io/api-docs/features/filtering
187
- and https://www.consul.io/api-docs/catalog#filtering-1.
188
216
  :param str name: The service name to select.
189
- :param Sequence[pulumi.InputType['GetServiceQueryOptionArgs']] query_options: See below.
217
+ :param Sequence[Union['GetServiceQueryOptionArgs', 'GetServiceQueryOptionArgsDict']] query_options: See below.
190
218
  :param str tag: A single tag that can be used to filter the list of nodes
191
219
  to return based on a single matching tag..
192
220
  """
193
- ...
221
+ __args__ = dict()
222
+ __args__['datacenter'] = datacenter
223
+ __args__['filter'] = filter
224
+ __args__['name'] = name
225
+ __args__['queryOptions'] = query_options
226
+ __args__['tag'] = tag
227
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
228
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getService:getService', __args__, opts=opts, typ=GetServiceResult)
229
+ return __ret__.apply(lambda __response__: GetServiceResult(
230
+ datacenter=pulumi.get(__response__, 'datacenter'),
231
+ filter=pulumi.get(__response__, 'filter'),
232
+ id=pulumi.get(__response__, 'id'),
233
+ name=pulumi.get(__response__, 'name'),
234
+ query_options=pulumi.get(__response__, 'query_options'),
235
+ services=pulumi.get(__response__, 'services'),
236
+ tag=pulumi.get(__response__, 'tag')))
@@ -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
 
@@ -207,9 +212,6 @@ def get_service_health(datacenter: Optional[str] = None,
207
212
  results=pulumi.get(__ret__, 'results'),
208
213
  tag=pulumi.get(__ret__, 'tag'),
209
214
  wait_for=pulumi.get(__ret__, 'wait_for'))
210
-
211
-
212
- @_utilities.lift_output_func(get_service_health)
213
215
  def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]] = None,
214
216
  filter: Optional[pulumi.Input[Optional[str]]] = None,
215
217
  name: Optional[pulumi.Input[str]] = None,
@@ -218,7 +220,7 @@ def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]]
218
220
  passing: Optional[pulumi.Input[Optional[bool]]] = None,
219
221
  tag: Optional[pulumi.Input[Optional[str]]] = None,
220
222
  wait_for: Optional[pulumi.Input[Optional[str]]] = None,
221
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServiceHealthResult]:
223
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServiceHealthResult]:
222
224
  """
223
225
  `get_service_health` can be used to get the list of the instances that
224
226
  are currently healthy, according to their associated health-checks.
@@ -242,4 +244,25 @@ def get_service_health_output(datacenter: Optional[pulumi.Input[Optional[str]]]
242
244
  :param str tag: A single tag that can be used to filter the list to return
243
245
  based on a single matching tag.
244
246
  """
245
- ...
247
+ __args__ = dict()
248
+ __args__['datacenter'] = datacenter
249
+ __args__['filter'] = filter
250
+ __args__['name'] = name
251
+ __args__['near'] = near
252
+ __args__['nodeMeta'] = node_meta
253
+ __args__['passing'] = passing
254
+ __args__['tag'] = tag
255
+ __args__['waitFor'] = wait_for
256
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
257
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getServiceHealth:getServiceHealth', __args__, opts=opts, typ=GetServiceHealthResult)
258
+ return __ret__.apply(lambda __response__: GetServiceHealthResult(
259
+ datacenter=pulumi.get(__response__, 'datacenter'),
260
+ filter=pulumi.get(__response__, 'filter'),
261
+ id=pulumi.get(__response__, 'id'),
262
+ name=pulumi.get(__response__, 'name'),
263
+ near=pulumi.get(__response__, 'near'),
264
+ node_meta=pulumi.get(__response__, 'node_meta'),
265
+ passing=pulumi.get(__response__, 'passing'),
266
+ results=pulumi.get(__response__, 'results'),
267
+ tag=pulumi.get(__response__, 'tag'),
268
+ wait_for=pulumi.get(__response__, 'wait_for')))
@@ -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 *
@@ -100,7 +105,7 @@ class AwaitableGetServicesResult(GetServicesResult):
100
105
  tags=self.tags)
101
106
 
102
107
 
103
- def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQueryOptionArgs']]] = None,
108
+ def get_services(query_options: Optional[Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']]] = None,
104
109
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServicesResult:
105
110
  """
106
111
  The `get_services` data source returns a list of Consul services that
@@ -111,8 +116,24 @@ def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQ
111
116
  This data source is different from the `Service` (singular) data
112
117
  source, which provides a detailed response about a specific Consul service.
113
118
 
119
+ ## Example Usage
114
120
 
115
- :param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
121
+ ```python
122
+ import pulumi
123
+ import pulumi_consul as consul
124
+ import pulumi_example as example
125
+ import pulumi_std as std
126
+
127
+ read_dc1 = consul.get_services(query_options=[{
128
+ "datacenter": "dc1",
129
+ }])
130
+ # Set the description to a whitespace delimited list of the services
131
+ app = example.index.Resource("app", description=std.join(separator= ,
132
+ input=names).result)
133
+ ```
134
+
135
+
136
+ :param Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']] query_options: See below.
116
137
  """
117
138
  __args__ = dict()
118
139
  __args__['queryOptions'] = query_options
@@ -126,11 +147,8 @@ def get_services(query_options: Optional[Sequence[pulumi.InputType['GetServicesQ
126
147
  query_options=pulumi.get(__ret__, 'query_options'),
127
148
  services=pulumi.get(__ret__, 'services'),
128
149
  tags=pulumi.get(__ret__, 'tags'))
129
-
130
-
131
- @_utilities.lift_output_func(get_services)
132
- def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetServicesQueryOptionArgs']]]]] = None,
133
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServicesResult]:
150
+ def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']]]]] = None,
151
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServicesResult]:
134
152
  """
135
153
  The `get_services` data source returns a list of Consul services that
136
154
  have been registered with the Consul cluster in a given datacenter. By
@@ -140,7 +158,33 @@ def get_services_output(query_options: Optional[pulumi.Input[Optional[Sequence[p
140
158
  This data source is different from the `Service` (singular) data
141
159
  source, which provides a detailed response about a specific Consul service.
142
160
 
161
+ ## Example Usage
143
162
 
144
- :param Sequence[pulumi.InputType['GetServicesQueryOptionArgs']] query_options: See below.
163
+ ```python
164
+ import pulumi
165
+ import pulumi_consul as consul
166
+ import pulumi_example as example
167
+ import pulumi_std as std
168
+
169
+ read_dc1 = consul.get_services(query_options=[{
170
+ "datacenter": "dc1",
171
+ }])
172
+ # Set the description to a whitespace delimited list of the services
173
+ app = example.index.Resource("app", description=std.join(separator= ,
174
+ input=names).result)
175
+ ```
176
+
177
+
178
+ :param Sequence[Union['GetServicesQueryOptionArgs', 'GetServicesQueryOptionArgsDict']] query_options: See below.
145
179
  """
146
- ...
180
+ __args__ = dict()
181
+ __args__['queryOptions'] = query_options
182
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
183
+ __ret__ = pulumi.runtime.invoke_output('consul:index/getServices:getServices', __args__, opts=opts, typ=GetServicesResult)
184
+ return __ret__.apply(lambda __response__: GetServicesResult(
185
+ datacenter=pulumi.get(__response__, 'datacenter'),
186
+ id=pulumi.get(__response__, 'id'),
187
+ names=pulumi.get(__response__, 'names'),
188
+ query_options=pulumi.get(__response__, 'query_options'),
189
+ services=pulumi.get(__response__, 'services'),
190
+ tags=pulumi.get(__response__, 'tags')))