pulumi-consul 3.12.0a1722057841__py3-none-any.whl → 3.12.1__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 (34) hide show
  1. pulumi_consul/__init__.py +10 -0
  2. pulumi_consul/_inputs.py +2 -2
  3. pulumi_consul/acl_auth_method.py +5 -5
  4. pulumi_consul/acl_binding_rule.py +5 -5
  5. pulumi_consul/acl_role.py +21 -21
  6. pulumi_consul/acl_token.py +15 -15
  7. pulumi_consul/catalog_entry.py +5 -5
  8. pulumi_consul/config_entry_service_defaults.py +30 -30
  9. pulumi_consul/config_entry_service_intentions.py +48 -48
  10. pulumi_consul/config_entry_service_resolver.py +60 -60
  11. pulumi_consul/config_entry_service_router.py +5 -5
  12. pulumi_consul/config_entry_service_splitter.py +83 -83
  13. pulumi_consul/config_entry_v2_exported_services.py +474 -0
  14. pulumi_consul/get_catalog_nodes.py +4 -4
  15. pulumi_consul/get_catalog_service.py +4 -4
  16. pulumi_consul/get_catalog_services.py +10 -10
  17. pulumi_consul/get_config_entry_v2_exported_services.py +210 -0
  18. pulumi_consul/get_key_prefix.py +14 -14
  19. pulumi_consul/get_keys.py +14 -14
  20. pulumi_consul/get_nodes.py +4 -4
  21. pulumi_consul/get_service.py +4 -4
  22. pulumi_consul/get_services.py +10 -10
  23. pulumi_consul/key_prefix.py +15 -15
  24. pulumi_consul/keys.py +13 -13
  25. pulumi_consul/outputs.py +2 -2
  26. pulumi_consul/peering_token.py +50 -11
  27. pulumi_consul/prepared_query.py +51 -51
  28. pulumi_consul/provider.py +6 -6
  29. pulumi_consul/pulumi-plugin.json +1 -1
  30. pulumi_consul/service.py +43 -43
  31. {pulumi_consul-3.12.0a1722057841.dist-info → pulumi_consul-3.12.1.dist-info}/METADATA +1 -1
  32. {pulumi_consul-3.12.0a1722057841.dist-info → pulumi_consul-3.12.1.dist-info}/RECORD +34 -32
  33. {pulumi_consul-3.12.0a1722057841.dist-info → pulumi_consul-3.12.1.dist-info}/WHEEL +1 -1
  34. {pulumi_consul-3.12.0a1722057841.dist-info → pulumi_consul-3.12.1.dist-info}/top_level.txt +0 -0
pulumi_consul/outputs.py CHANGED
@@ -3637,7 +3637,7 @@ class ServiceCheck(dict):
3637
3637
  :param str interval: The interval to wait between each health-check invocation.
3638
3638
  :param str name: The name of the health-check.
3639
3639
  :param str timeout: Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.
3640
- :param str deregister_critical_service_after: The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`.
3640
+ :param str deregister_critical_service_after: The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`. Setting to `0` will disable.
3641
3641
  :param Sequence['ServiceCheckHeaderArgs'] headers: The headers to send for an HTTP check. The attributes of each header is given below.
3642
3642
  :param str http: The HTTP endpoint to call for an HTTP check.
3643
3643
  :param str method: The method to use for HTTP health-checks. Defaults to `GET`.
@@ -3703,7 +3703,7 @@ class ServiceCheck(dict):
3703
3703
  @pulumi.getter(name="deregisterCriticalServiceAfter")
3704
3704
  def deregister_critical_service_after(self) -> Optional[str]:
3705
3705
  """
3706
- The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`.
3706
+ The time after which the service is automatically deregistered when in the `critical` state. Defaults to `30s`. Setting to `0` will disable.
3707
3707
  """
3708
3708
  return pulumi.get(self, "deregister_critical_service_after")
3709
3709
 
@@ -16,17 +16,21 @@ class PeeringTokenArgs:
16
16
  def __init__(__self__, *,
17
17
  peer_name: pulumi.Input[str],
18
18
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
19
- partition: Optional[pulumi.Input[str]] = None):
19
+ partition: Optional[pulumi.Input[str]] = None,
20
+ server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
20
21
  """
21
22
  The set of arguments for constructing a PeeringToken resource.
22
23
  :param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
23
24
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
25
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
24
26
  """
25
27
  pulumi.set(__self__, "peer_name", peer_name)
26
28
  if meta is not None:
27
29
  pulumi.set(__self__, "meta", meta)
28
30
  if partition is not None:
29
31
  pulumi.set(__self__, "partition", partition)
32
+ if server_external_addresses is not None:
33
+ pulumi.set(__self__, "server_external_addresses", server_external_addresses)
30
34
 
31
35
  @property
32
36
  @pulumi.getter(name="peerName")
@@ -61,6 +65,18 @@ class PeeringTokenArgs:
61
65
  def partition(self, value: Optional[pulumi.Input[str]]):
62
66
  pulumi.set(self, "partition", value)
63
67
 
68
+ @property
69
+ @pulumi.getter(name="serverExternalAddresses")
70
+ def server_external_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
71
+ """
72
+ The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
73
+ """
74
+ return pulumi.get(self, "server_external_addresses")
75
+
76
+ @server_external_addresses.setter
77
+ def server_external_addresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
78
+ pulumi.set(self, "server_external_addresses", value)
79
+
64
80
 
65
81
  @pulumi.input_type
66
82
  class _PeeringTokenState:
@@ -68,12 +84,14 @@ class _PeeringTokenState:
68
84
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
69
85
  partition: Optional[pulumi.Input[str]] = None,
70
86
  peer_name: Optional[pulumi.Input[str]] = None,
71
- peering_token: Optional[pulumi.Input[str]] = None):
87
+ peering_token: Optional[pulumi.Input[str]] = None,
88
+ server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
72
89
  """
73
90
  Input properties used for looking up and filtering PeeringToken resources.
74
91
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
75
92
  :param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
76
93
  :param pulumi.Input[str] peering_token: The generated peering token
94
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
77
95
  """
78
96
  if meta is not None:
79
97
  pulumi.set(__self__, "meta", meta)
@@ -83,6 +101,8 @@ class _PeeringTokenState:
83
101
  pulumi.set(__self__, "peer_name", peer_name)
84
102
  if peering_token is not None:
85
103
  pulumi.set(__self__, "peering_token", peering_token)
104
+ if server_external_addresses is not None:
105
+ pulumi.set(__self__, "server_external_addresses", server_external_addresses)
86
106
 
87
107
  @property
88
108
  @pulumi.getter
@@ -129,6 +149,18 @@ class _PeeringTokenState:
129
149
  def peering_token(self, value: Optional[pulumi.Input[str]]):
130
150
  pulumi.set(self, "peering_token", value)
131
151
 
152
+ @property
153
+ @pulumi.getter(name="serverExternalAddresses")
154
+ def server_external_addresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
155
+ """
156
+ The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
157
+ """
158
+ return pulumi.get(self, "server_external_addresses")
159
+
160
+ @server_external_addresses.setter
161
+ def server_external_addresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
162
+ pulumi.set(self, "server_external_addresses", value)
163
+
132
164
 
133
165
  class PeeringToken(pulumi.CustomResource):
134
166
  @overload
@@ -138,16 +170,13 @@ class PeeringToken(pulumi.CustomResource):
138
170
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
139
171
  partition: Optional[pulumi.Input[str]] = None,
140
172
  peer_name: Optional[pulumi.Input[str]] = None,
173
+ server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
141
174
  __props__=None):
142
175
  """
143
176
  [Cluster Peering](https://www.consul.io/docs/connect/cluster-peering) can be used to create connections between two or more independent clusters so that services deployed to different partitions or datacenters can communicate.
144
177
 
145
178
  The `cluster_peering_token` resource can be used to generate a peering token that can later be used to establish a peering connection.
146
179
 
147
- > **Cluster peering is currently in technical preview:** Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
148
-
149
- The functionality described here is available only in Consul version 1.13.0 and later.
150
-
151
180
  ## Example Usage
152
181
 
153
182
  ```python
@@ -161,6 +190,7 @@ class PeeringToken(pulumi.CustomResource):
161
190
  :param pulumi.ResourceOptions opts: Options for the resource.
162
191
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
163
192
  :param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
193
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
164
194
  """
165
195
  ...
166
196
  @overload
@@ -173,10 +203,6 @@ class PeeringToken(pulumi.CustomResource):
173
203
 
174
204
  The `cluster_peering_token` resource can be used to generate a peering token that can later be used to establish a peering connection.
175
205
 
176
- > **Cluster peering is currently in technical preview:** Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
177
-
178
- The functionality described here is available only in Consul version 1.13.0 and later.
179
-
180
206
  ## Example Usage
181
207
 
182
208
  ```python
@@ -204,6 +230,7 @@ class PeeringToken(pulumi.CustomResource):
204
230
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
205
231
  partition: Optional[pulumi.Input[str]] = None,
206
232
  peer_name: Optional[pulumi.Input[str]] = None,
233
+ server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
207
234
  __props__=None):
208
235
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
209
236
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -218,6 +245,7 @@ class PeeringToken(pulumi.CustomResource):
218
245
  if peer_name is None and not opts.urn:
219
246
  raise TypeError("Missing required property 'peer_name'")
220
247
  __props__.__dict__["peer_name"] = peer_name
248
+ __props__.__dict__["server_external_addresses"] = server_external_addresses
221
249
  __props__.__dict__["peering_token"] = None
222
250
  secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["peeringToken"])
223
251
  opts = pulumi.ResourceOptions.merge(opts, secret_opts)
@@ -234,7 +262,8 @@ class PeeringToken(pulumi.CustomResource):
234
262
  meta: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
235
263
  partition: Optional[pulumi.Input[str]] = None,
236
264
  peer_name: Optional[pulumi.Input[str]] = None,
237
- peering_token: Optional[pulumi.Input[str]] = None) -> 'PeeringToken':
265
+ peering_token: Optional[pulumi.Input[str]] = None,
266
+ server_external_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'PeeringToken':
238
267
  """
239
268
  Get an existing PeeringToken resource's state with the given name, id, and optional extra
240
269
  properties used to qualify the lookup.
@@ -245,6 +274,7 @@ class PeeringToken(pulumi.CustomResource):
245
274
  :param pulumi.Input[Mapping[str, pulumi.Input[str]]] meta: Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
246
275
  :param pulumi.Input[str] peer_name: The name assigned to the peer cluster. The `peer_name` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
247
276
  :param pulumi.Input[str] peering_token: The generated peering token
277
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] server_external_addresses: The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
248
278
  """
249
279
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
250
280
 
@@ -254,6 +284,7 @@ class PeeringToken(pulumi.CustomResource):
254
284
  __props__.__dict__["partition"] = partition
255
285
  __props__.__dict__["peer_name"] = peer_name
256
286
  __props__.__dict__["peering_token"] = peering_token
287
+ __props__.__dict__["server_external_addresses"] = server_external_addresses
257
288
  return PeeringToken(resource_name, opts=opts, __props__=__props__)
258
289
 
259
290
  @property
@@ -285,3 +316,11 @@ class PeeringToken(pulumi.CustomResource):
285
316
  """
286
317
  return pulumi.get(self, "peering_token")
287
318
 
319
+ @property
320
+ @pulumi.getter(name="serverExternalAddresses")
321
+ def server_external_addresses(self) -> pulumi.Output[Optional[Sequence[str]]]:
322
+ """
323
+ The addresses for the cluster that generates the peering token. Addresses take the form {host or IP}:port. You can specify one or more load balancers or external IPs that route external traffic to this cluster's Consul servers.
324
+ """
325
+ return pulumi.get(self, "server_external_addresses")
326
+
@@ -561,8 +561,8 @@ class PreparedQuery(pulumi.CustomResource):
561
561
  opts: Optional[pulumi.ResourceOptions] = None,
562
562
  connect: Optional[pulumi.Input[bool]] = None,
563
563
  datacenter: Optional[pulumi.Input[str]] = None,
564
- dns: Optional[pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']]] = None,
565
- failover: Optional[pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']]] = None,
564
+ dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
565
+ failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
566
566
  ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
567
567
  name: Optional[pulumi.Input[str]] = None,
568
568
  near: Optional[pulumi.Input[str]] = None,
@@ -573,7 +573,7 @@ class PreparedQuery(pulumi.CustomResource):
573
573
  session: Optional[pulumi.Input[str]] = None,
574
574
  stored_token: Optional[pulumi.Input[str]] = None,
575
575
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
576
- template: Optional[pulumi.Input[pulumi.InputType['PreparedQueryTemplateArgs']]] = None,
576
+ template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
577
577
  token: Optional[pulumi.Input[str]] = None,
578
578
  __props__=None):
579
579
  """
@@ -598,17 +598,17 @@ class PreparedQuery(pulumi.CustomResource):
598
598
  "active",
599
599
  "!standby",
600
600
  ],
601
- failover=consul.PreparedQueryFailoverArgs(
602
- nearest_n=3,
603
- datacenters=[
601
+ failover={
602
+ "nearest_n": 3,
603
+ "datacenters": [
604
604
  "us-west1",
605
605
  "us-east-2",
606
606
  "asia-east1",
607
607
  ],
608
- ),
609
- dns=consul.PreparedQueryDnsArgs(
610
- ttl="30s",
611
- ))
608
+ },
609
+ dns={
610
+ "ttl": "30s",
611
+ })
612
612
  # Creates a Prepared Query Template that matches *-near-self.query.consul
613
613
  # and finds the nearest service that matches the glob character (e.g.
614
614
  # foo-near-self.query.consul will find the nearest healthy foo.service.consul).
@@ -620,22 +620,22 @@ class PreparedQuery(pulumi.CustomResource):
620
620
  only_passing=True,
621
621
  connect=True,
622
622
  near="_agent",
623
- template=consul.PreparedQueryTemplateArgs(
624
- type="name_prefix_match",
625
- regexp="^(.*)-near-self$",
626
- ),
623
+ template={
624
+ "type": "name_prefix_match",
625
+ "regexp": "^(.*)-near-self$",
626
+ },
627
627
  service="${match(1)}",
628
- failover=consul.PreparedQueryFailoverArgs(
629
- nearest_n=3,
630
- datacenters=[
628
+ failover={
629
+ "nearest_n": 3,
630
+ "datacenters": [
631
631
  "dc2",
632
632
  "dc3",
633
633
  "dc4",
634
634
  ],
635
- ),
636
- dns=consul.PreparedQueryDnsArgs(
637
- ttl="5m",
638
- ))
635
+ },
636
+ dns={
637
+ "ttl": "5m",
638
+ })
639
639
  ```
640
640
 
641
641
  ## Import
@@ -648,8 +648,8 @@ class PreparedQuery(pulumi.CustomResource):
648
648
  :param pulumi.ResourceOptions opts: Options for the resource.
649
649
  :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.
650
650
  :param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
651
- :param pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']] dns: Settings for controlling the DNS response details.
652
- :param pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
651
+ :param pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']] dns: Settings for controlling the DNS response details.
652
+ :param pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
653
653
  :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.
654
654
  :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.
655
655
  :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.
@@ -660,7 +660,7 @@ class PreparedQuery(pulumi.CustomResource):
660
660
  :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.
661
661
  :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.
662
662
  :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.
663
- :param pulumi.Input[pulumi.InputType['PreparedQueryTemplateArgs']] template: Query templating options. This is used to make a single prepared query respond to many different requests
663
+ :param pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']] template: Query templating options. This is used to make a single prepared query respond to many different requests
664
664
  :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.
665
665
  """
666
666
  ...
@@ -691,17 +691,17 @@ class PreparedQuery(pulumi.CustomResource):
691
691
  "active",
692
692
  "!standby",
693
693
  ],
694
- failover=consul.PreparedQueryFailoverArgs(
695
- nearest_n=3,
696
- datacenters=[
694
+ failover={
695
+ "nearest_n": 3,
696
+ "datacenters": [
697
697
  "us-west1",
698
698
  "us-east-2",
699
699
  "asia-east1",
700
700
  ],
701
- ),
702
- dns=consul.PreparedQueryDnsArgs(
703
- ttl="30s",
704
- ))
701
+ },
702
+ dns={
703
+ "ttl": "30s",
704
+ })
705
705
  # Creates a Prepared Query Template that matches *-near-self.query.consul
706
706
  # and finds the nearest service that matches the glob character (e.g.
707
707
  # foo-near-self.query.consul will find the nearest healthy foo.service.consul).
@@ -713,22 +713,22 @@ class PreparedQuery(pulumi.CustomResource):
713
713
  only_passing=True,
714
714
  connect=True,
715
715
  near="_agent",
716
- template=consul.PreparedQueryTemplateArgs(
717
- type="name_prefix_match",
718
- regexp="^(.*)-near-self$",
719
- ),
716
+ template={
717
+ "type": "name_prefix_match",
718
+ "regexp": "^(.*)-near-self$",
719
+ },
720
720
  service="${match(1)}",
721
- failover=consul.PreparedQueryFailoverArgs(
722
- nearest_n=3,
723
- datacenters=[
721
+ failover={
722
+ "nearest_n": 3,
723
+ "datacenters": [
724
724
  "dc2",
725
725
  "dc3",
726
726
  "dc4",
727
727
  ],
728
- ),
729
- dns=consul.PreparedQueryDnsArgs(
730
- ttl="5m",
731
- ))
728
+ },
729
+ dns={
730
+ "ttl": "5m",
731
+ })
732
732
  ```
733
733
 
734
734
  ## Import
@@ -754,8 +754,8 @@ class PreparedQuery(pulumi.CustomResource):
754
754
  opts: Optional[pulumi.ResourceOptions] = None,
755
755
  connect: Optional[pulumi.Input[bool]] = None,
756
756
  datacenter: Optional[pulumi.Input[str]] = None,
757
- dns: Optional[pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']]] = None,
758
- failover: Optional[pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']]] = None,
757
+ dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
758
+ failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
759
759
  ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
760
760
  name: Optional[pulumi.Input[str]] = None,
761
761
  near: Optional[pulumi.Input[str]] = None,
@@ -766,7 +766,7 @@ class PreparedQuery(pulumi.CustomResource):
766
766
  session: Optional[pulumi.Input[str]] = None,
767
767
  stored_token: Optional[pulumi.Input[str]] = None,
768
768
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
769
- template: Optional[pulumi.Input[pulumi.InputType['PreparedQueryTemplateArgs']]] = None,
769
+ template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
770
770
  token: Optional[pulumi.Input[str]] = None,
771
771
  __props__=None):
772
772
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -809,8 +809,8 @@ class PreparedQuery(pulumi.CustomResource):
809
809
  opts: Optional[pulumi.ResourceOptions] = None,
810
810
  connect: Optional[pulumi.Input[bool]] = None,
811
811
  datacenter: Optional[pulumi.Input[str]] = None,
812
- dns: Optional[pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']]] = None,
813
- failover: Optional[pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']]] = None,
812
+ dns: Optional[pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']]] = None,
813
+ failover: Optional[pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']]] = None,
814
814
  ignore_check_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
815
815
  name: Optional[pulumi.Input[str]] = None,
816
816
  near: Optional[pulumi.Input[str]] = None,
@@ -821,7 +821,7 @@ class PreparedQuery(pulumi.CustomResource):
821
821
  session: Optional[pulumi.Input[str]] = None,
822
822
  stored_token: Optional[pulumi.Input[str]] = None,
823
823
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
824
- template: Optional[pulumi.Input[pulumi.InputType['PreparedQueryTemplateArgs']]] = None,
824
+ template: Optional[pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']]] = None,
825
825
  token: Optional[pulumi.Input[str]] = None) -> 'PreparedQuery':
826
826
  """
827
827
  Get an existing PreparedQuery resource's state with the given name, id, and optional extra
@@ -832,8 +832,8 @@ class PreparedQuery(pulumi.CustomResource):
832
832
  :param pulumi.ResourceOptions opts: Options for the resource.
833
833
  :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.
834
834
  :param pulumi.Input[str] datacenter: The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
835
- :param pulumi.Input[pulumi.InputType['PreparedQueryDnsArgs']] dns: Settings for controlling the DNS response details.
836
- :param pulumi.Input[pulumi.InputType['PreparedQueryFailoverArgs']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
835
+ :param pulumi.Input[Union['PreparedQueryDnsArgs', 'PreparedQueryDnsArgsDict']] dns: Settings for controlling the DNS response details.
836
+ :param pulumi.Input[Union['PreparedQueryFailoverArgs', 'PreparedQueryFailoverArgsDict']] failover: Options for controlling behavior when no healthy nodes are available in the local DC.
837
837
  :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.
838
838
  :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.
839
839
  :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.
@@ -844,7 +844,7 @@ class PreparedQuery(pulumi.CustomResource):
844
844
  :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.
845
845
  :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.
846
846
  :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.
847
- :param pulumi.Input[pulumi.InputType['PreparedQueryTemplateArgs']] template: Query templating options. This is used to make a single prepared query respond to many different requests
847
+ :param pulumi.Input[Union['PreparedQueryTemplateArgs', 'PreparedQueryTemplateArgsDict']] template: Query templating options. This is used to make a single prepared query respond to many different requests
848
848
  :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.
849
849
  """
850
850
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
pulumi_consul/provider.py CHANGED
@@ -288,14 +288,14 @@ class Provider(pulumi.ProviderResource):
288
288
  resource_name: str,
289
289
  opts: Optional[pulumi.ResourceOptions] = None,
290
290
  address: Optional[pulumi.Input[str]] = None,
291
- auth_jwt: Optional[pulumi.Input[pulumi.InputType['ProviderAuthJwtArgs']]] = None,
291
+ auth_jwt: Optional[pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']]] = None,
292
292
  ca_file: Optional[pulumi.Input[str]] = None,
293
293
  ca_path: Optional[pulumi.Input[str]] = None,
294
294
  ca_pem: Optional[pulumi.Input[str]] = None,
295
295
  cert_file: Optional[pulumi.Input[str]] = None,
296
296
  cert_pem: Optional[pulumi.Input[str]] = None,
297
297
  datacenter: Optional[pulumi.Input[str]] = None,
298
- headers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProviderHeaderArgs']]]]] = None,
298
+ headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
299
299
  http_auth: Optional[pulumi.Input[str]] = None,
300
300
  insecure_https: Optional[pulumi.Input[bool]] = None,
301
301
  key_file: Optional[pulumi.Input[str]] = None,
@@ -313,7 +313,7 @@ class Provider(pulumi.ProviderResource):
313
313
  :param str resource_name: The name of the resource.
314
314
  :param pulumi.ResourceOptions opts: Options for the resource.
315
315
  :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[pulumi.InputType['ProviderAuthJwtArgs']] auth_jwt: Authenticates to Consul using a JWT authentication method.
316
+ :param pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']] auth_jwt: Authenticates to Consul using a JWT authentication method.
317
317
  :param pulumi.Input[str] ca_file: A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
318
318
  :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
319
  connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
@@ -321,7 +321,7 @@ class Provider(pulumi.ProviderResource):
321
321
  :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
322
  :param pulumi.Input[str] cert_pem: PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
323
323
  :param pulumi.Input[str] datacenter: The datacenter to use. Defaults to that of the agent.
324
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProviderHeaderArgs']]]] headers: A configuration block, described below, that provides additional headers to be sent along with all requests to the
324
+ :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
325
  Consul server. This block can be specified multiple times.
326
326
  :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
327
  `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
@@ -361,14 +361,14 @@ class Provider(pulumi.ProviderResource):
361
361
  resource_name: str,
362
362
  opts: Optional[pulumi.ResourceOptions] = None,
363
363
  address: Optional[pulumi.Input[str]] = None,
364
- auth_jwt: Optional[pulumi.Input[pulumi.InputType['ProviderAuthJwtArgs']]] = None,
364
+ auth_jwt: Optional[pulumi.Input[Union['ProviderAuthJwtArgs', 'ProviderAuthJwtArgsDict']]] = None,
365
365
  ca_file: Optional[pulumi.Input[str]] = None,
366
366
  ca_path: Optional[pulumi.Input[str]] = None,
367
367
  ca_pem: Optional[pulumi.Input[str]] = None,
368
368
  cert_file: Optional[pulumi.Input[str]] = None,
369
369
  cert_pem: Optional[pulumi.Input[str]] = None,
370
370
  datacenter: Optional[pulumi.Input[str]] = None,
371
- headers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProviderHeaderArgs']]]]] = None,
371
+ headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderHeaderArgs', 'ProviderHeaderArgsDict']]]]] = None,
372
372
  http_auth: Optional[pulumi.Input[str]] = None,
373
373
  insecure_https: Optional[pulumi.Input[bool]] = None,
374
374
  key_file: Optional[pulumi.Input[str]] = None,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
3
  "name": "consul",
4
- "version": "3.12.0-alpha.1722057841"
4
+ "version": "3.12.1"
5
5
  }
pulumi_consul/service.py CHANGED
@@ -442,7 +442,7 @@ class Service(pulumi.CustomResource):
442
442
  resource_name: str,
443
443
  opts: Optional[pulumi.ResourceOptions] = None,
444
444
  address: Optional[pulumi.Input[str]] = None,
445
- checks: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceCheckArgs']]]]] = None,
445
+ checks: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceCheckArgs', 'ServiceCheckArgsDict']]]]] = None,
446
446
  datacenter: Optional[pulumi.Input[str]] = None,
447
447
  enable_tag_override: Optional[pulumi.Input[bool]] = None,
448
448
  external: Optional[pulumi.Input[bool]] = None,
@@ -505,27 +505,27 @@ class Service(pulumi.CustomResource):
505
505
  name="redis",
506
506
  node="redis",
507
507
  port=6379,
508
- checks=[consul.ServiceCheckArgs(
509
- check_id="service:redis1",
510
- name="Redis health check",
511
- status="passing",
512
- http="https://www.hashicorptest.com",
513
- tls_skip_verify=False,
514
- method="PUT",
515
- interval="5s",
516
- timeout="1s",
517
- deregister_critical_service_after="30s",
518
- headers=[
519
- consul.ServiceCheckHeaderArgs(
520
- name="foo",
521
- values=["test"],
522
- ),
523
- consul.ServiceCheckHeaderArgs(
524
- name="bar",
525
- values=["test"],
526
- ),
508
+ checks=[{
509
+ "check_id": "service:redis1",
510
+ "name": "Redis health check",
511
+ "status": "passing",
512
+ "http": "https://www.hashicorptest.com",
513
+ "tls_skip_verify": False,
514
+ "method": "PUT",
515
+ "interval": "5s",
516
+ "timeout": "1s",
517
+ "deregister_critical_service_after": "30s",
518
+ "headers": [
519
+ {
520
+ "name": "foo",
521
+ "values": ["test"],
522
+ },
523
+ {
524
+ "name": "bar",
525
+ "values": ["test"],
526
+ },
527
527
  ],
528
- )])
528
+ }])
529
529
  ```
530
530
 
531
531
  :param str resource_name: The name of the resource.
@@ -598,27 +598,27 @@ class Service(pulumi.CustomResource):
598
598
  name="redis",
599
599
  node="redis",
600
600
  port=6379,
601
- checks=[consul.ServiceCheckArgs(
602
- check_id="service:redis1",
603
- name="Redis health check",
604
- status="passing",
605
- http="https://www.hashicorptest.com",
606
- tls_skip_verify=False,
607
- method="PUT",
608
- interval="5s",
609
- timeout="1s",
610
- deregister_critical_service_after="30s",
611
- headers=[
612
- consul.ServiceCheckHeaderArgs(
613
- name="foo",
614
- values=["test"],
615
- ),
616
- consul.ServiceCheckHeaderArgs(
617
- name="bar",
618
- values=["test"],
619
- ),
601
+ checks=[{
602
+ "check_id": "service:redis1",
603
+ "name": "Redis health check",
604
+ "status": "passing",
605
+ "http": "https://www.hashicorptest.com",
606
+ "tls_skip_verify": False,
607
+ "method": "PUT",
608
+ "interval": "5s",
609
+ "timeout": "1s",
610
+ "deregister_critical_service_after": "30s",
611
+ "headers": [
612
+ {
613
+ "name": "foo",
614
+ "values": ["test"],
615
+ },
616
+ {
617
+ "name": "bar",
618
+ "values": ["test"],
619
+ },
620
620
  ],
621
- )])
621
+ }])
622
622
  ```
623
623
 
624
624
  :param str resource_name: The name of the resource.
@@ -637,7 +637,7 @@ class Service(pulumi.CustomResource):
637
637
  resource_name: str,
638
638
  opts: Optional[pulumi.ResourceOptions] = None,
639
639
  address: Optional[pulumi.Input[str]] = None,
640
- checks: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceCheckArgs']]]]] = None,
640
+ checks: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceCheckArgs', 'ServiceCheckArgsDict']]]]] = None,
641
641
  datacenter: Optional[pulumi.Input[str]] = None,
642
642
  enable_tag_override: Optional[pulumi.Input[bool]] = None,
643
643
  external: Optional[pulumi.Input[bool]] = None,
@@ -684,7 +684,7 @@ class Service(pulumi.CustomResource):
684
684
  id: pulumi.Input[str],
685
685
  opts: Optional[pulumi.ResourceOptions] = None,
686
686
  address: Optional[pulumi.Input[str]] = None,
687
- checks: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceCheckArgs']]]]] = None,
687
+ checks: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceCheckArgs', 'ServiceCheckArgsDict']]]]] = None,
688
688
  datacenter: Optional[pulumi.Input[str]] = None,
689
689
  enable_tag_override: Optional[pulumi.Input[bool]] = None,
690
690
  external: Optional[pulumi.Input[bool]] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulumi_consul
3
- Version: 3.12.0a1722057841
3
+ Version: 3.12.1
4
4
  Summary: A Pulumi package for creating and managing consul resources.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io