pulumi-hcloud 1.18.0a1709364097__py3-none-any.whl → 1.22.0a1736833581__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_hcloud/__init__.py +2 -0
- pulumi_hcloud/_inputs.py +247 -15
- pulumi_hcloud/_utilities.py +41 -5
- pulumi_hcloud/certificate.py +15 -10
- pulumi_hcloud/config/__init__.pyi +5 -0
- pulumi_hcloud/config/vars.py +5 -0
- pulumi_hcloud/firewall.py +77 -66
- pulumi_hcloud/firewall_attachment.py +31 -18
- pulumi_hcloud/floating_ip.py +39 -32
- pulumi_hcloud/floating_ip_assignment.py +11 -4
- pulumi_hcloud/get_certificate.py +25 -6
- pulumi_hcloud/get_certificates.py +14 -5
- pulumi_hcloud/get_datacenter.py +38 -23
- pulumi_hcloud/get_datacenters.py +28 -53
- pulumi_hcloud/get_firewall.py +38 -19
- pulumi_hcloud/get_firewalls.py +16 -5
- pulumi_hcloud/get_floating_ip.py +39 -13
- pulumi_hcloud/get_floating_ips.py +14 -5
- pulumi_hcloud/get_image.py +37 -9
- pulumi_hcloud/get_images.py +22 -5
- pulumi_hcloud/get_load_balancer.py +30 -7
- pulumi_hcloud/get_load_balancer_type.py +202 -0
- pulumi_hcloud/get_load_balancer_types.py +100 -0
- pulumi_hcloud/get_load_balancers.py +14 -5
- pulumi_hcloud/get_location.py +42 -25
- pulumi_hcloud/get_locations.py +28 -53
- pulumi_hcloud/get_network.py +28 -11
- pulumi_hcloud/get_networks.py +14 -5
- pulumi_hcloud/get_placement_group.py +31 -13
- pulumi_hcloud/get_placement_groups.py +16 -5
- pulumi_hcloud/get_primary_ip.py +44 -18
- pulumi_hcloud/get_primary_ips.py +14 -5
- pulumi_hcloud/get_server.py +43 -11
- pulumi_hcloud/get_server_type.py +75 -49
- pulumi_hcloud/get_server_types.py +39 -23
- pulumi_hcloud/get_servers.py +16 -5
- pulumi_hcloud/get_ssh_key.py +58 -32
- pulumi_hcloud/get_ssh_keys.py +35 -20
- pulumi_hcloud/get_volume.py +33 -12
- pulumi_hcloud/get_volumes.py +18 -7
- pulumi_hcloud/load_balancer.py +63 -60
- pulumi_hcloud/load_balancer_network.py +28 -15
- pulumi_hcloud/load_balancer_service.py +59 -52
- pulumi_hcloud/load_balancer_target.py +33 -24
- pulumi_hcloud/managed_certificate.py +57 -20
- pulumi_hcloud/network.py +27 -18
- pulumi_hcloud/network_route.py +15 -6
- pulumi_hcloud/network_subnet.py +15 -6
- pulumi_hcloud/outputs.py +265 -46
- pulumi_hcloud/placement_group.py +27 -18
- pulumi_hcloud/primary_ip.py +66 -43
- pulumi_hcloud/provider.py +5 -0
- pulumi_hcloud/pulumi-plugin.json +2 -1
- pulumi_hcloud/rdns.py +51 -34
- pulumi_hcloud/server.py +185 -130
- pulumi_hcloud/server_network.py +26 -15
- pulumi_hcloud/snapshot.py +25 -18
- pulumi_hcloud/ssh_key.py +52 -47
- pulumi_hcloud/uploaded_certificate.py +73 -20
- pulumi_hcloud/volume.py +37 -28
- pulumi_hcloud/volume_attachment.py +11 -4
- {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/METADATA +7 -6
- pulumi_hcloud-1.22.0a1736833581.dist-info/RECORD +67 -0
- {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/WHEEL +1 -1
- pulumi_hcloud-1.18.0a1709364097.dist-info/RECORD +0 -65
- {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/top_level.txt +0 -0
pulumi_hcloud/load_balancer.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 *
|
|
@@ -19,7 +24,7 @@ class LoadBalancerArgs:
|
|
|
19
24
|
load_balancer_type: pulumi.Input[str],
|
|
20
25
|
algorithm: Optional[pulumi.Input['LoadBalancerAlgorithmArgs']] = None,
|
|
21
26
|
delete_protection: Optional[pulumi.Input[bool]] = None,
|
|
22
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
27
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
23
28
|
location: Optional[pulumi.Input[str]] = None,
|
|
24
29
|
name: Optional[pulumi.Input[str]] = None,
|
|
25
30
|
network_zone: Optional[pulumi.Input[str]] = None,
|
|
@@ -29,8 +34,8 @@ class LoadBalancerArgs:
|
|
|
29
34
|
:param pulumi.Input[str] load_balancer_type: Type of the Load Balancer.
|
|
30
35
|
:param pulumi.Input['LoadBalancerAlgorithmArgs'] algorithm: Configuration of the algorithm the Load Balancer use.
|
|
31
36
|
:param pulumi.Input[bool] delete_protection: Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
|
|
32
|
-
:param pulumi.Input[Mapping[str,
|
|
33
|
-
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set.
|
|
37
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
38
|
+
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
34
39
|
:param pulumi.Input[str] name: Name of the Load Balancer.
|
|
35
40
|
:param pulumi.Input[str] network_zone: The Network Zone of the Load Balancer. Require when no location is set.
|
|
36
41
|
"""
|
|
@@ -48,8 +53,8 @@ class LoadBalancerArgs:
|
|
|
48
53
|
if network_zone is not None:
|
|
49
54
|
pulumi.set(__self__, "network_zone", network_zone)
|
|
50
55
|
if targets is not None:
|
|
51
|
-
warnings.warn("""Use
|
|
52
|
-
pulumi.log.warn("""targets is deprecated: Use
|
|
56
|
+
warnings.warn("""Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""", DeprecationWarning)
|
|
57
|
+
pulumi.log.warn("""targets is deprecated: Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""")
|
|
53
58
|
if targets is not None:
|
|
54
59
|
pulumi.set(__self__, "targets", targets)
|
|
55
60
|
|
|
@@ -91,21 +96,21 @@ class LoadBalancerArgs:
|
|
|
91
96
|
|
|
92
97
|
@property
|
|
93
98
|
@pulumi.getter
|
|
94
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
99
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
95
100
|
"""
|
|
96
101
|
User-defined labels (key-value pairs) should be created with.
|
|
97
102
|
"""
|
|
98
103
|
return pulumi.get(self, "labels")
|
|
99
104
|
|
|
100
105
|
@labels.setter
|
|
101
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
106
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
102
107
|
pulumi.set(self, "labels", value)
|
|
103
108
|
|
|
104
109
|
@property
|
|
105
110
|
@pulumi.getter
|
|
106
111
|
def location(self) -> Optional[pulumi.Input[str]]:
|
|
107
112
|
"""
|
|
108
|
-
The location name of the Load Balancer. Require when no network_zone is set.
|
|
113
|
+
The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
109
114
|
"""
|
|
110
115
|
return pulumi.get(self, "location")
|
|
111
116
|
|
|
@@ -139,10 +144,8 @@ class LoadBalancerArgs:
|
|
|
139
144
|
|
|
140
145
|
@property
|
|
141
146
|
@pulumi.getter
|
|
147
|
+
@_utilities.deprecated("""Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""")
|
|
142
148
|
def targets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LoadBalancerTargetArgs']]]]:
|
|
143
|
-
warnings.warn("""Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""", DeprecationWarning)
|
|
144
|
-
pulumi.log.warn("""targets is deprecated: Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""")
|
|
145
|
-
|
|
146
149
|
return pulumi.get(self, "targets")
|
|
147
150
|
|
|
148
151
|
@targets.setter
|
|
@@ -157,7 +160,7 @@ class _LoadBalancerState:
|
|
|
157
160
|
delete_protection: Optional[pulumi.Input[bool]] = None,
|
|
158
161
|
ipv4: Optional[pulumi.Input[str]] = None,
|
|
159
162
|
ipv6: Optional[pulumi.Input[str]] = None,
|
|
160
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
163
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
161
164
|
load_balancer_type: Optional[pulumi.Input[str]] = None,
|
|
162
165
|
location: Optional[pulumi.Input[str]] = None,
|
|
163
166
|
name: Optional[pulumi.Input[str]] = None,
|
|
@@ -171,9 +174,9 @@ class _LoadBalancerState:
|
|
|
171
174
|
:param pulumi.Input[bool] delete_protection: Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
|
|
172
175
|
:param pulumi.Input[str] ipv4: (string) IPv4 Address of the Load Balancer.
|
|
173
176
|
:param pulumi.Input[str] ipv6: (string) IPv6 Address of the Load Balancer.
|
|
174
|
-
:param pulumi.Input[Mapping[str,
|
|
177
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
175
178
|
:param pulumi.Input[str] load_balancer_type: Type of the Load Balancer.
|
|
176
|
-
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set.
|
|
179
|
+
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
177
180
|
:param pulumi.Input[str] name: Name of the Load Balancer.
|
|
178
181
|
:param pulumi.Input[int] network_id: (int) ID of the first private network that this Load Balancer is connected to.
|
|
179
182
|
:param pulumi.Input[str] network_ip: (string) IP of the Load Balancer in the first private network that it is connected to.
|
|
@@ -202,8 +205,8 @@ class _LoadBalancerState:
|
|
|
202
205
|
if network_zone is not None:
|
|
203
206
|
pulumi.set(__self__, "network_zone", network_zone)
|
|
204
207
|
if targets is not None:
|
|
205
|
-
warnings.warn("""Use
|
|
206
|
-
pulumi.log.warn("""targets is deprecated: Use
|
|
208
|
+
warnings.warn("""Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""", DeprecationWarning)
|
|
209
|
+
pulumi.log.warn("""targets is deprecated: Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""")
|
|
207
210
|
if targets is not None:
|
|
208
211
|
pulumi.set(__self__, "targets", targets)
|
|
209
212
|
|
|
@@ -257,14 +260,14 @@ class _LoadBalancerState:
|
|
|
257
260
|
|
|
258
261
|
@property
|
|
259
262
|
@pulumi.getter
|
|
260
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
263
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
261
264
|
"""
|
|
262
265
|
User-defined labels (key-value pairs) should be created with.
|
|
263
266
|
"""
|
|
264
267
|
return pulumi.get(self, "labels")
|
|
265
268
|
|
|
266
269
|
@labels.setter
|
|
267
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
270
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
268
271
|
pulumi.set(self, "labels", value)
|
|
269
272
|
|
|
270
273
|
@property
|
|
@@ -283,7 +286,7 @@ class _LoadBalancerState:
|
|
|
283
286
|
@pulumi.getter
|
|
284
287
|
def location(self) -> Optional[pulumi.Input[str]]:
|
|
285
288
|
"""
|
|
286
|
-
The location name of the Load Balancer. Require when no network_zone is set.
|
|
289
|
+
The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
287
290
|
"""
|
|
288
291
|
return pulumi.get(self, "location")
|
|
289
292
|
|
|
@@ -341,10 +344,8 @@ class _LoadBalancerState:
|
|
|
341
344
|
|
|
342
345
|
@property
|
|
343
346
|
@pulumi.getter
|
|
347
|
+
@_utilities.deprecated("""Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""")
|
|
344
348
|
def targets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LoadBalancerTargetArgs']]]]:
|
|
345
|
-
warnings.warn("""Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""", DeprecationWarning)
|
|
346
|
-
pulumi.log.warn("""targets is deprecated: Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""")
|
|
347
|
-
|
|
348
349
|
return pulumi.get(self, "targets")
|
|
349
350
|
|
|
350
351
|
@targets.setter
|
|
@@ -357,14 +358,14 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
357
358
|
def __init__(__self__,
|
|
358
359
|
resource_name: str,
|
|
359
360
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
360
|
-
algorithm: Optional[pulumi.Input[
|
|
361
|
+
algorithm: Optional[pulumi.Input[Union['LoadBalancerAlgorithmArgs', 'LoadBalancerAlgorithmArgsDict']]] = None,
|
|
361
362
|
delete_protection: Optional[pulumi.Input[bool]] = None,
|
|
362
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
363
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
363
364
|
load_balancer_type: Optional[pulumi.Input[str]] = None,
|
|
364
365
|
location: Optional[pulumi.Input[str]] = None,
|
|
365
366
|
name: Optional[pulumi.Input[str]] = None,
|
|
366
367
|
network_zone: Optional[pulumi.Input[str]] = None,
|
|
367
|
-
targets: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
368
|
+
targets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LoadBalancerTargetArgs', 'LoadBalancerTargetArgsDict']]]]] = None,
|
|
368
369
|
__props__=None):
|
|
369
370
|
"""
|
|
370
371
|
Provides a Hetzner Cloud Load Balancer to represent a Load Balancer in the Hetzner Cloud.
|
|
@@ -375,16 +376,18 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
375
376
|
import pulumi
|
|
376
377
|
import pulumi_hcloud as hcloud
|
|
377
378
|
|
|
378
|
-
|
|
379
|
-
|
|
379
|
+
my_server = hcloud.Server("my_server",
|
|
380
|
+
name="server-%d",
|
|
381
|
+
server_type="cx22",
|
|
380
382
|
image="ubuntu-18.04")
|
|
381
|
-
load_balancer = hcloud.LoadBalancer("
|
|
383
|
+
load_balancer = hcloud.LoadBalancer("load_balancer",
|
|
384
|
+
name="my-load-balancer",
|
|
382
385
|
load_balancer_type="lb11",
|
|
383
|
-
location="nbg1"
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
)
|
|
386
|
+
location="nbg1")
|
|
387
|
+
load_balancer_target = hcloud.LoadBalancerTarget("load_balancer_target",
|
|
388
|
+
type="server",
|
|
389
|
+
load_balancer_id=load_balancer.id,
|
|
390
|
+
server_id=my_server.id)
|
|
388
391
|
```
|
|
389
392
|
|
|
390
393
|
## Import
|
|
@@ -392,16 +395,16 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
392
395
|
Load Balancers can be imported using its `id`:
|
|
393
396
|
|
|
394
397
|
```sh
|
|
395
|
-
$ pulumi import hcloud:index/loadBalancer:LoadBalancer
|
|
398
|
+
$ pulumi import hcloud:index/loadBalancer:LoadBalancer example "$LOAD_BALANCER_ID"
|
|
396
399
|
```
|
|
397
400
|
|
|
398
401
|
:param str resource_name: The name of the resource.
|
|
399
402
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
400
|
-
:param pulumi.Input[
|
|
403
|
+
:param pulumi.Input[Union['LoadBalancerAlgorithmArgs', 'LoadBalancerAlgorithmArgsDict']] algorithm: Configuration of the algorithm the Load Balancer use.
|
|
401
404
|
:param pulumi.Input[bool] delete_protection: Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
|
|
402
|
-
:param pulumi.Input[Mapping[str,
|
|
405
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
403
406
|
:param pulumi.Input[str] load_balancer_type: Type of the Load Balancer.
|
|
404
|
-
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set.
|
|
407
|
+
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
405
408
|
:param pulumi.Input[str] name: Name of the Load Balancer.
|
|
406
409
|
:param pulumi.Input[str] network_zone: The Network Zone of the Load Balancer. Require when no location is set.
|
|
407
410
|
"""
|
|
@@ -420,16 +423,18 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
420
423
|
import pulumi
|
|
421
424
|
import pulumi_hcloud as hcloud
|
|
422
425
|
|
|
423
|
-
|
|
424
|
-
|
|
426
|
+
my_server = hcloud.Server("my_server",
|
|
427
|
+
name="server-%d",
|
|
428
|
+
server_type="cx22",
|
|
425
429
|
image="ubuntu-18.04")
|
|
426
|
-
load_balancer = hcloud.LoadBalancer("
|
|
430
|
+
load_balancer = hcloud.LoadBalancer("load_balancer",
|
|
431
|
+
name="my-load-balancer",
|
|
427
432
|
load_balancer_type="lb11",
|
|
428
|
-
location="nbg1"
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
)
|
|
433
|
+
location="nbg1")
|
|
434
|
+
load_balancer_target = hcloud.LoadBalancerTarget("load_balancer_target",
|
|
435
|
+
type="server",
|
|
436
|
+
load_balancer_id=load_balancer.id,
|
|
437
|
+
server_id=my_server.id)
|
|
433
438
|
```
|
|
434
439
|
|
|
435
440
|
## Import
|
|
@@ -437,7 +442,7 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
437
442
|
Load Balancers can be imported using its `id`:
|
|
438
443
|
|
|
439
444
|
```sh
|
|
440
|
-
$ pulumi import hcloud:index/loadBalancer:LoadBalancer
|
|
445
|
+
$ pulumi import hcloud:index/loadBalancer:LoadBalancer example "$LOAD_BALANCER_ID"
|
|
441
446
|
```
|
|
442
447
|
|
|
443
448
|
:param str resource_name: The name of the resource.
|
|
@@ -455,14 +460,14 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
455
460
|
def _internal_init(__self__,
|
|
456
461
|
resource_name: str,
|
|
457
462
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
458
|
-
algorithm: Optional[pulumi.Input[
|
|
463
|
+
algorithm: Optional[pulumi.Input[Union['LoadBalancerAlgorithmArgs', 'LoadBalancerAlgorithmArgsDict']]] = None,
|
|
459
464
|
delete_protection: Optional[pulumi.Input[bool]] = None,
|
|
460
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
465
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
461
466
|
load_balancer_type: Optional[pulumi.Input[str]] = None,
|
|
462
467
|
location: Optional[pulumi.Input[str]] = None,
|
|
463
468
|
name: Optional[pulumi.Input[str]] = None,
|
|
464
469
|
network_zone: Optional[pulumi.Input[str]] = None,
|
|
465
|
-
targets: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
470
|
+
targets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LoadBalancerTargetArgs', 'LoadBalancerTargetArgsDict']]]]] = None,
|
|
466
471
|
__props__=None):
|
|
467
472
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
468
473
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -496,18 +501,18 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
496
501
|
def get(resource_name: str,
|
|
497
502
|
id: pulumi.Input[str],
|
|
498
503
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
499
|
-
algorithm: Optional[pulumi.Input[
|
|
504
|
+
algorithm: Optional[pulumi.Input[Union['LoadBalancerAlgorithmArgs', 'LoadBalancerAlgorithmArgsDict']]] = None,
|
|
500
505
|
delete_protection: Optional[pulumi.Input[bool]] = None,
|
|
501
506
|
ipv4: Optional[pulumi.Input[str]] = None,
|
|
502
507
|
ipv6: Optional[pulumi.Input[str]] = None,
|
|
503
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
508
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
504
509
|
load_balancer_type: Optional[pulumi.Input[str]] = None,
|
|
505
510
|
location: Optional[pulumi.Input[str]] = None,
|
|
506
511
|
name: Optional[pulumi.Input[str]] = None,
|
|
507
512
|
network_id: Optional[pulumi.Input[int]] = None,
|
|
508
513
|
network_ip: Optional[pulumi.Input[str]] = None,
|
|
509
514
|
network_zone: Optional[pulumi.Input[str]] = None,
|
|
510
|
-
targets: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
515
|
+
targets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LoadBalancerTargetArgs', 'LoadBalancerTargetArgsDict']]]]] = None) -> 'LoadBalancer':
|
|
511
516
|
"""
|
|
512
517
|
Get an existing LoadBalancer resource's state with the given name, id, and optional extra
|
|
513
518
|
properties used to qualify the lookup.
|
|
@@ -515,13 +520,13 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
515
520
|
:param str resource_name: The unique name of the resulting resource.
|
|
516
521
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
517
522
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
518
|
-
:param pulumi.Input[
|
|
523
|
+
:param pulumi.Input[Union['LoadBalancerAlgorithmArgs', 'LoadBalancerAlgorithmArgsDict']] algorithm: Configuration of the algorithm the Load Balancer use.
|
|
519
524
|
:param pulumi.Input[bool] delete_protection: Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
|
|
520
525
|
:param pulumi.Input[str] ipv4: (string) IPv4 Address of the Load Balancer.
|
|
521
526
|
:param pulumi.Input[str] ipv6: (string) IPv6 Address of the Load Balancer.
|
|
522
|
-
:param pulumi.Input[Mapping[str,
|
|
527
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
523
528
|
:param pulumi.Input[str] load_balancer_type: Type of the Load Balancer.
|
|
524
|
-
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set.
|
|
529
|
+
:param pulumi.Input[str] location: The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
525
530
|
:param pulumi.Input[str] name: Name of the Load Balancer.
|
|
526
531
|
:param pulumi.Input[int] network_id: (int) ID of the first private network that this Load Balancer is connected to.
|
|
527
532
|
:param pulumi.Input[str] network_ip: (string) IP of the Load Balancer in the first private network that it is connected to.
|
|
@@ -579,7 +584,7 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
579
584
|
|
|
580
585
|
@property
|
|
581
586
|
@pulumi.getter
|
|
582
|
-
def labels(self) -> pulumi.Output[Mapping[str,
|
|
587
|
+
def labels(self) -> pulumi.Output[Mapping[str, str]]:
|
|
583
588
|
"""
|
|
584
589
|
User-defined labels (key-value pairs) should be created with.
|
|
585
590
|
"""
|
|
@@ -597,7 +602,7 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
597
602
|
@pulumi.getter
|
|
598
603
|
def location(self) -> pulumi.Output[str]:
|
|
599
604
|
"""
|
|
600
|
-
The location name of the Load Balancer. Require when no network_zone is set.
|
|
605
|
+
The location name of the Load Balancer. Require when no network_zone is set. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
|
|
601
606
|
"""
|
|
602
607
|
return pulumi.get(self, "location")
|
|
603
608
|
|
|
@@ -635,9 +640,7 @@ class LoadBalancer(pulumi.CustomResource):
|
|
|
635
640
|
|
|
636
641
|
@property
|
|
637
642
|
@pulumi.getter
|
|
643
|
+
@_utilities.deprecated("""Use LoadBalancerTarget resource instead. This allows the full control over the selected targets.""")
|
|
638
644
|
def targets(self) -> pulumi.Output[Sequence['outputs.LoadBalancerTarget']]:
|
|
639
|
-
warnings.warn("""Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""", DeprecationWarning)
|
|
640
|
-
pulumi.log.warn("""targets is deprecated: Use hcloud_load_balancer_target resource instead. This allows the full control over the selected targets.""")
|
|
641
|
-
|
|
642
645
|
return pulumi.get(self, "targets")
|
|
643
646
|
|
|
@@ -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__ = ['LoadBalancerNetworkArgs', 'LoadBalancerNetwork']
|
|
@@ -37,7 +42,7 @@ class LoadBalancerNetworkArgs:
|
|
|
37
42
|
`LoadBalancerNetwork` and the existence of a subnet.
|
|
38
43
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
39
44
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
40
|
-
|
|
45
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
41
46
|
currently added to the last created subnet.
|
|
42
47
|
"""
|
|
43
48
|
pulumi.set(__self__, "load_balancer_id", load_balancer_id)
|
|
@@ -114,7 +119,7 @@ class LoadBalancerNetworkArgs:
|
|
|
114
119
|
"""
|
|
115
120
|
ID of the sub-network which should be
|
|
116
121
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
117
|
-
|
|
122
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
118
123
|
currently added to the last created subnet.
|
|
119
124
|
"""
|
|
120
125
|
return pulumi.get(self, "subnet_id")
|
|
@@ -150,7 +155,7 @@ class _LoadBalancerNetworkState:
|
|
|
150
155
|
`LoadBalancerNetwork` and the existence of a subnet.
|
|
151
156
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
152
157
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
153
|
-
|
|
158
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
154
159
|
currently added to the last created subnet.
|
|
155
160
|
"""
|
|
156
161
|
if enable_public_interface is not None:
|
|
@@ -228,7 +233,7 @@ class _LoadBalancerNetworkState:
|
|
|
228
233
|
"""
|
|
229
234
|
ID of the sub-network which should be
|
|
230
235
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
231
|
-
|
|
236
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
232
237
|
currently added to the last created subnet.
|
|
233
238
|
"""
|
|
234
239
|
return pulumi.get(self, "subnet_id")
|
|
@@ -259,9 +264,12 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
259
264
|
import pulumi_hcloud as hcloud
|
|
260
265
|
|
|
261
266
|
lb1 = hcloud.LoadBalancer("lb1",
|
|
267
|
+
name="lb1",
|
|
262
268
|
load_balancer_type="lb11",
|
|
263
269
|
network_zone="eu-central")
|
|
264
|
-
mynet = hcloud.Network("mynet",
|
|
270
|
+
mynet = hcloud.Network("mynet",
|
|
271
|
+
name="my-net",
|
|
272
|
+
ip_range="10.0.0.0/8")
|
|
265
273
|
foonet = hcloud.NetworkSubnet("foonet",
|
|
266
274
|
network_id=mynet.id,
|
|
267
275
|
type="cloud",
|
|
@@ -270,17 +278,18 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
270
278
|
srvnetwork = hcloud.LoadBalancerNetwork("srvnetwork",
|
|
271
279
|
load_balancer_id=lb1.id,
|
|
272
280
|
network_id=mynet.id,
|
|
273
|
-
ip="10.0.1.5"
|
|
281
|
+
ip="10.0.1.5",
|
|
282
|
+
opts = pulumi.ResourceOptions(depends_on=[srvnetwork_hcloud_network_subnet]))
|
|
274
283
|
```
|
|
275
284
|
|
|
276
285
|
## Import
|
|
277
286
|
|
|
278
287
|
Load Balancer Network entries can be imported using a compound ID with the following format:
|
|
279
288
|
|
|
280
|
-
|
|
289
|
+
`<load-balancer-id>-<network-id>`
|
|
281
290
|
|
|
282
291
|
```sh
|
|
283
|
-
$ pulumi import hcloud:index/loadBalancerNetwork:LoadBalancerNetwork
|
|
292
|
+
$ pulumi import hcloud:index/loadBalancerNetwork:LoadBalancerNetwork example "$LOAD_BALANCER_ID-$NETWORK_ID"
|
|
284
293
|
```
|
|
285
294
|
|
|
286
295
|
:param str resource_name: The name of the resource.
|
|
@@ -301,7 +310,7 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
301
310
|
`LoadBalancerNetwork` and the existence of a subnet.
|
|
302
311
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
303
312
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
304
|
-
|
|
313
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
305
314
|
currently added to the last created subnet.
|
|
306
315
|
"""
|
|
307
316
|
...
|
|
@@ -320,9 +329,12 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
320
329
|
import pulumi_hcloud as hcloud
|
|
321
330
|
|
|
322
331
|
lb1 = hcloud.LoadBalancer("lb1",
|
|
332
|
+
name="lb1",
|
|
323
333
|
load_balancer_type="lb11",
|
|
324
334
|
network_zone="eu-central")
|
|
325
|
-
mynet = hcloud.Network("mynet",
|
|
335
|
+
mynet = hcloud.Network("mynet",
|
|
336
|
+
name="my-net",
|
|
337
|
+
ip_range="10.0.0.0/8")
|
|
326
338
|
foonet = hcloud.NetworkSubnet("foonet",
|
|
327
339
|
network_id=mynet.id,
|
|
328
340
|
type="cloud",
|
|
@@ -331,17 +343,18 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
331
343
|
srvnetwork = hcloud.LoadBalancerNetwork("srvnetwork",
|
|
332
344
|
load_balancer_id=lb1.id,
|
|
333
345
|
network_id=mynet.id,
|
|
334
|
-
ip="10.0.1.5"
|
|
346
|
+
ip="10.0.1.5",
|
|
347
|
+
opts = pulumi.ResourceOptions(depends_on=[srvnetwork_hcloud_network_subnet]))
|
|
335
348
|
```
|
|
336
349
|
|
|
337
350
|
## Import
|
|
338
351
|
|
|
339
352
|
Load Balancer Network entries can be imported using a compound ID with the following format:
|
|
340
353
|
|
|
341
|
-
|
|
354
|
+
`<load-balancer-id>-<network-id>`
|
|
342
355
|
|
|
343
356
|
```sh
|
|
344
|
-
$ pulumi import hcloud:index/loadBalancerNetwork:LoadBalancerNetwork
|
|
357
|
+
$ pulumi import hcloud:index/loadBalancerNetwork:LoadBalancerNetwork example "$LOAD_BALANCER_ID-$NETWORK_ID"
|
|
345
358
|
```
|
|
346
359
|
|
|
347
360
|
:param str resource_name: The name of the resource.
|
|
@@ -418,7 +431,7 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
418
431
|
`LoadBalancerNetwork` and the existence of a subnet.
|
|
419
432
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
420
433
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
421
|
-
|
|
434
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
422
435
|
currently added to the last created subnet.
|
|
423
436
|
"""
|
|
424
437
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -480,7 +493,7 @@ class LoadBalancerNetwork(pulumi.CustomResource):
|
|
|
480
493
|
"""
|
|
481
494
|
ID of the sub-network which should be
|
|
482
495
|
added to the Load Balancer. Required if `network_id` is not set.
|
|
483
|
-
|
|
496
|
+
_Note_: if the `ip` property is missing, the Load Balancer is
|
|
484
497
|
currently added to the last created subnet.
|
|
485
498
|
"""
|
|
486
499
|
return pulumi.get(self, "subnet_id")
|