pulumi-hcloud 1.18.0a1710156455__py3-none-any.whl → 1.22.0a1736849475__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 -70
- pulumi_hcloud/firewall_attachment.py +27 -26
- pulumi_hcloud/floating_ip.py +39 -36
- pulumi_hcloud/floating_ip_assignment.py +11 -8
- pulumi_hcloud/get_certificate.py +25 -10
- pulumi_hcloud/get_certificates.py +14 -9
- pulumi_hcloud/get_datacenter.py +38 -27
- pulumi_hcloud/get_datacenters.py +28 -53
- pulumi_hcloud/get_firewall.py +38 -23
- pulumi_hcloud/get_firewalls.py +16 -9
- pulumi_hcloud/get_floating_ip.py +37 -17
- pulumi_hcloud/get_floating_ips.py +14 -9
- pulumi_hcloud/get_image.py +37 -13
- pulumi_hcloud/get_images.py +22 -9
- pulumi_hcloud/get_load_balancer.py +30 -11
- 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 -9
- pulumi_hcloud/get_location.py +42 -29
- pulumi_hcloud/get_locations.py +28 -53
- pulumi_hcloud/get_network.py +28 -15
- pulumi_hcloud/get_networks.py +14 -9
- pulumi_hcloud/get_placement_group.py +31 -17
- pulumi_hcloud/get_placement_groups.py +16 -9
- pulumi_hcloud/get_primary_ip.py +42 -22
- pulumi_hcloud/get_primary_ips.py +14 -9
- pulumi_hcloud/get_server.py +43 -15
- pulumi_hcloud/get_server_type.py +75 -53
- pulumi_hcloud/get_server_types.py +39 -23
- pulumi_hcloud/get_servers.py +16 -9
- pulumi_hcloud/get_ssh_key.py +58 -36
- pulumi_hcloud/get_ssh_keys.py +35 -24
- pulumi_hcloud/get_volume.py +33 -16
- pulumi_hcloud/get_volumes.py +18 -11
- pulumi_hcloud/load_balancer.py +63 -64
- pulumi_hcloud/load_balancer_network.py +26 -17
- pulumi_hcloud/load_balancer_service.py +57 -54
- pulumi_hcloud/load_balancer_target.py +23 -18
- pulumi_hcloud/managed_certificate.py +57 -20
- pulumi_hcloud/network.py +27 -22
- pulumi_hcloud/network_route.py +13 -8
- pulumi_hcloud/network_subnet.py +13 -8
- pulumi_hcloud/outputs.py +265 -46
- pulumi_hcloud/placement_group.py +27 -22
- pulumi_hcloud/primary_ip.py +66 -47
- pulumi_hcloud/provider.py +5 -0
- pulumi_hcloud/pulumi-plugin.json +2 -1
- pulumi_hcloud/rdns.py +41 -40
- pulumi_hcloud/server.py +123 -176
- pulumi_hcloud/server_network.py +24 -17
- pulumi_hcloud/snapshot.py +25 -22
- pulumi_hcloud/ssh_key.py +52 -51
- pulumi_hcloud/uploaded_certificate.py +73 -20
- pulumi_hcloud/volume.py +37 -32
- pulumi_hcloud/volume_attachment.py +11 -8
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/METADATA +7 -6
- pulumi_hcloud-1.22.0a1736849475.dist-info/RECORD +67 -0
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/WHEEL +1 -1
- pulumi_hcloud-1.18.0a1710156455.dist-info/RECORD +0 -65
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/top_level.txt +0 -0
pulumi_hcloud/server_network.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
|
|
|
12
17
|
__all__ = ['ServerNetworkInitArgs', 'ServerNetwork']
|
|
@@ -37,7 +42,7 @@ class ServerNetworkInitArgs:
|
|
|
37
42
|
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 Server. Required if `network_id` is not set.
|
|
40
|
-
|
|
45
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
41
46
|
to the last created subnet.
|
|
42
47
|
"""
|
|
43
48
|
pulumi.set(__self__, "server_id", server_id)
|
|
@@ -114,7 +119,7 @@ class ServerNetworkInitArgs:
|
|
|
114
119
|
"""
|
|
115
120
|
ID of the sub-network which should be
|
|
116
121
|
added to the Server. Required if `network_id` is not set.
|
|
117
|
-
|
|
122
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
118
123
|
to the last created subnet.
|
|
119
124
|
"""
|
|
120
125
|
return pulumi.get(self, "subnet_id")
|
|
@@ -151,7 +156,7 @@ class _ServerNetworkState:
|
|
|
151
156
|
:param pulumi.Input[int] server_id: ID of the server.
|
|
152
157
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
153
158
|
added to the Server. Required if `network_id` is not set.
|
|
154
|
-
|
|
159
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
155
160
|
to the last created subnet.
|
|
156
161
|
"""
|
|
157
162
|
if alias_ips is not None:
|
|
@@ -240,7 +245,7 @@ class _ServerNetworkState:
|
|
|
240
245
|
"""
|
|
241
246
|
ID of the sub-network which should be
|
|
242
247
|
added to the Server. Required if `network_id` is not set.
|
|
243
|
-
|
|
248
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
244
249
|
to the last created subnet.
|
|
245
250
|
"""
|
|
246
251
|
return pulumi.get(self, "subnet_id")
|
|
@@ -266,15 +271,17 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
266
271
|
|
|
267
272
|
## Example Usage
|
|
268
273
|
|
|
269
|
-
<!--Start PulumiCodeChooser -->
|
|
270
274
|
```python
|
|
271
275
|
import pulumi
|
|
272
276
|
import pulumi_hcloud as hcloud
|
|
273
277
|
|
|
274
278
|
node1 = hcloud.Server("node1",
|
|
279
|
+
name="node1",
|
|
275
280
|
image="debian-11",
|
|
276
|
-
server_type="
|
|
277
|
-
mynet = hcloud.Network("mynet",
|
|
281
|
+
server_type="cx22")
|
|
282
|
+
mynet = hcloud.Network("mynet",
|
|
283
|
+
name="my-net",
|
|
284
|
+
ip_range="10.0.0.0/8")
|
|
278
285
|
foonet = hcloud.NetworkSubnet("foonet",
|
|
279
286
|
network_id=mynet.id,
|
|
280
287
|
type="cloud",
|
|
@@ -285,7 +292,6 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
285
292
|
network_id=mynet.id,
|
|
286
293
|
ip="10.0.1.5")
|
|
287
294
|
```
|
|
288
|
-
<!--End PulumiCodeChooser -->
|
|
289
295
|
|
|
290
296
|
## Import
|
|
291
297
|
|
|
@@ -294,7 +300,7 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
294
300
|
`<server-id>-<network-id>`
|
|
295
301
|
|
|
296
302
|
```sh
|
|
297
|
-
$ pulumi import hcloud:index/serverNetwork:ServerNetwork
|
|
303
|
+
$ pulumi import hcloud:index/serverNetwork:ServerNetwork example "$SERVER_ID-$NETWORK_ID"
|
|
298
304
|
```
|
|
299
305
|
|
|
300
306
|
:param str resource_name: The name of the resource.
|
|
@@ -315,7 +321,7 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
315
321
|
:param pulumi.Input[int] server_id: ID of the server.
|
|
316
322
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
317
323
|
added to the Server. Required if `network_id` is not set.
|
|
318
|
-
|
|
324
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
319
325
|
to the last created subnet.
|
|
320
326
|
"""
|
|
321
327
|
...
|
|
@@ -329,15 +335,17 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
329
335
|
|
|
330
336
|
## Example Usage
|
|
331
337
|
|
|
332
|
-
<!--Start PulumiCodeChooser -->
|
|
333
338
|
```python
|
|
334
339
|
import pulumi
|
|
335
340
|
import pulumi_hcloud as hcloud
|
|
336
341
|
|
|
337
342
|
node1 = hcloud.Server("node1",
|
|
343
|
+
name="node1",
|
|
338
344
|
image="debian-11",
|
|
339
|
-
server_type="
|
|
340
|
-
mynet = hcloud.Network("mynet",
|
|
345
|
+
server_type="cx22")
|
|
346
|
+
mynet = hcloud.Network("mynet",
|
|
347
|
+
name="my-net",
|
|
348
|
+
ip_range="10.0.0.0/8")
|
|
341
349
|
foonet = hcloud.NetworkSubnet("foonet",
|
|
342
350
|
network_id=mynet.id,
|
|
343
351
|
type="cloud",
|
|
@@ -348,7 +356,6 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
348
356
|
network_id=mynet.id,
|
|
349
357
|
ip="10.0.1.5")
|
|
350
358
|
```
|
|
351
|
-
<!--End PulumiCodeChooser -->
|
|
352
359
|
|
|
353
360
|
## Import
|
|
354
361
|
|
|
@@ -357,7 +364,7 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
357
364
|
`<server-id>-<network-id>`
|
|
358
365
|
|
|
359
366
|
```sh
|
|
360
|
-
$ pulumi import hcloud:index/serverNetwork:ServerNetwork
|
|
367
|
+
$ pulumi import hcloud:index/serverNetwork:ServerNetwork example "$SERVER_ID-$NETWORK_ID"
|
|
361
368
|
```
|
|
362
369
|
|
|
363
370
|
:param str resource_name: The name of the resource.
|
|
@@ -436,7 +443,7 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
436
443
|
:param pulumi.Input[int] server_id: ID of the server.
|
|
437
444
|
:param pulumi.Input[str] subnet_id: ID of the sub-network which should be
|
|
438
445
|
added to the Server. Required if `network_id` is not set.
|
|
439
|
-
|
|
446
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
440
447
|
to the last created subnet.
|
|
441
448
|
"""
|
|
442
449
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -504,7 +511,7 @@ class ServerNetwork(pulumi.CustomResource):
|
|
|
504
511
|
"""
|
|
505
512
|
ID of the sub-network which should be
|
|
506
513
|
added to the Server. Required if `network_id` is not set.
|
|
507
|
-
|
|
514
|
+
_Note_: if the `ip` property is missing, the Server is currently added
|
|
508
515
|
to the last created subnet.
|
|
509
516
|
"""
|
|
510
517
|
return pulumi.get(self, "subnet_id")
|
pulumi_hcloud/snapshot.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
|
|
|
12
17
|
__all__ = ['SnapshotArgs', 'Snapshot']
|
|
@@ -16,12 +21,12 @@ class SnapshotArgs:
|
|
|
16
21
|
def __init__(__self__, *,
|
|
17
22
|
server_id: pulumi.Input[int],
|
|
18
23
|
description: Optional[pulumi.Input[str]] = None,
|
|
19
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
24
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
20
25
|
"""
|
|
21
26
|
The set of arguments for constructing a Snapshot resource.
|
|
22
27
|
:param pulumi.Input[int] server_id: Server to the snapshot should be created from.
|
|
23
28
|
:param pulumi.Input[str] description: Description of the snapshot.
|
|
24
|
-
:param pulumi.Input[Mapping[str,
|
|
29
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
25
30
|
"""
|
|
26
31
|
pulumi.set(__self__, "server_id", server_id)
|
|
27
32
|
if description is not None:
|
|
@@ -55,14 +60,14 @@ class SnapshotArgs:
|
|
|
55
60
|
|
|
56
61
|
@property
|
|
57
62
|
@pulumi.getter
|
|
58
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
63
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
59
64
|
"""
|
|
60
65
|
User-defined labels (key-value pairs) should be created with.
|
|
61
66
|
"""
|
|
62
67
|
return pulumi.get(self, "labels")
|
|
63
68
|
|
|
64
69
|
@labels.setter
|
|
65
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
70
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
66
71
|
pulumi.set(self, "labels", value)
|
|
67
72
|
|
|
68
73
|
|
|
@@ -70,12 +75,12 @@ class SnapshotArgs:
|
|
|
70
75
|
class _SnapshotState:
|
|
71
76
|
def __init__(__self__, *,
|
|
72
77
|
description: Optional[pulumi.Input[str]] = None,
|
|
73
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
78
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
74
79
|
server_id: Optional[pulumi.Input[int]] = None):
|
|
75
80
|
"""
|
|
76
81
|
Input properties used for looking up and filtering Snapshot resources.
|
|
77
82
|
:param pulumi.Input[str] description: Description of the snapshot.
|
|
78
|
-
:param pulumi.Input[Mapping[str,
|
|
83
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
79
84
|
:param pulumi.Input[int] server_id: Server to the snapshot should be created from.
|
|
80
85
|
"""
|
|
81
86
|
if description is not None:
|
|
@@ -99,14 +104,14 @@ class _SnapshotState:
|
|
|
99
104
|
|
|
100
105
|
@property
|
|
101
106
|
@pulumi.getter
|
|
102
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
107
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
103
108
|
"""
|
|
104
109
|
User-defined labels (key-value pairs) should be created with.
|
|
105
110
|
"""
|
|
106
111
|
return pulumi.get(self, "labels")
|
|
107
112
|
|
|
108
113
|
@labels.setter
|
|
109
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
114
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
110
115
|
pulumi.set(self, "labels", value)
|
|
111
116
|
|
|
112
117
|
@property
|
|
@@ -128,7 +133,7 @@ class Snapshot(pulumi.CustomResource):
|
|
|
128
133
|
resource_name: str,
|
|
129
134
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
130
135
|
description: Optional[pulumi.Input[str]] = None,
|
|
131
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
136
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
132
137
|
server_id: Optional[pulumi.Input[int]] = None,
|
|
133
138
|
__props__=None):
|
|
134
139
|
"""
|
|
@@ -136,30 +141,29 @@ class Snapshot(pulumi.CustomResource):
|
|
|
136
141
|
|
|
137
142
|
## Example Usage
|
|
138
143
|
|
|
139
|
-
<!--Start PulumiCodeChooser -->
|
|
140
144
|
```python
|
|
141
145
|
import pulumi
|
|
142
146
|
import pulumi_hcloud as hcloud
|
|
143
147
|
|
|
144
148
|
node1 = hcloud.Server("node1",
|
|
149
|
+
name="node1",
|
|
145
150
|
image="debian-11",
|
|
146
|
-
server_type="
|
|
151
|
+
server_type="cx22")
|
|
147
152
|
my_snapshot = hcloud.Snapshot("my-snapshot", server_id=node1.id)
|
|
148
153
|
```
|
|
149
|
-
<!--End PulumiCodeChooser -->
|
|
150
154
|
|
|
151
155
|
## Import
|
|
152
156
|
|
|
153
157
|
Snapshots can be imported using its image `id`:
|
|
154
158
|
|
|
155
159
|
```sh
|
|
156
|
-
$ pulumi import hcloud:index/snapshot:Snapshot
|
|
160
|
+
$ pulumi import hcloud:index/snapshot:Snapshot example "$IMAGE_ID"
|
|
157
161
|
```
|
|
158
162
|
|
|
159
163
|
:param str resource_name: The name of the resource.
|
|
160
164
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
161
165
|
:param pulumi.Input[str] description: Description of the snapshot.
|
|
162
|
-
:param pulumi.Input[Mapping[str,
|
|
166
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
163
167
|
:param pulumi.Input[int] server_id: Server to the snapshot should be created from.
|
|
164
168
|
"""
|
|
165
169
|
...
|
|
@@ -173,24 +177,23 @@ class Snapshot(pulumi.CustomResource):
|
|
|
173
177
|
|
|
174
178
|
## Example Usage
|
|
175
179
|
|
|
176
|
-
<!--Start PulumiCodeChooser -->
|
|
177
180
|
```python
|
|
178
181
|
import pulumi
|
|
179
182
|
import pulumi_hcloud as hcloud
|
|
180
183
|
|
|
181
184
|
node1 = hcloud.Server("node1",
|
|
185
|
+
name="node1",
|
|
182
186
|
image="debian-11",
|
|
183
|
-
server_type="
|
|
187
|
+
server_type="cx22")
|
|
184
188
|
my_snapshot = hcloud.Snapshot("my-snapshot", server_id=node1.id)
|
|
185
189
|
```
|
|
186
|
-
<!--End PulumiCodeChooser -->
|
|
187
190
|
|
|
188
191
|
## Import
|
|
189
192
|
|
|
190
193
|
Snapshots can be imported using its image `id`:
|
|
191
194
|
|
|
192
195
|
```sh
|
|
193
|
-
$ pulumi import hcloud:index/snapshot:Snapshot
|
|
196
|
+
$ pulumi import hcloud:index/snapshot:Snapshot example "$IMAGE_ID"
|
|
194
197
|
```
|
|
195
198
|
|
|
196
199
|
:param str resource_name: The name of the resource.
|
|
@@ -209,7 +212,7 @@ class Snapshot(pulumi.CustomResource):
|
|
|
209
212
|
resource_name: str,
|
|
210
213
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
211
214
|
description: Optional[pulumi.Input[str]] = None,
|
|
212
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
215
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
213
216
|
server_id: Optional[pulumi.Input[int]] = None,
|
|
214
217
|
__props__=None):
|
|
215
218
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
@@ -236,7 +239,7 @@ class Snapshot(pulumi.CustomResource):
|
|
|
236
239
|
id: pulumi.Input[str],
|
|
237
240
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
238
241
|
description: Optional[pulumi.Input[str]] = None,
|
|
239
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
242
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
240
243
|
server_id: Optional[pulumi.Input[int]] = None) -> 'Snapshot':
|
|
241
244
|
"""
|
|
242
245
|
Get an existing Snapshot resource's state with the given name, id, and optional extra
|
|
@@ -246,7 +249,7 @@ class Snapshot(pulumi.CustomResource):
|
|
|
246
249
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
247
250
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
248
251
|
:param pulumi.Input[str] description: Description of the snapshot.
|
|
249
|
-
:param pulumi.Input[Mapping[str,
|
|
252
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined labels (key-value pairs) should be created with.
|
|
250
253
|
:param pulumi.Input[int] server_id: Server to the snapshot should be created from.
|
|
251
254
|
"""
|
|
252
255
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -268,7 +271,7 @@ class Snapshot(pulumi.CustomResource):
|
|
|
268
271
|
|
|
269
272
|
@property
|
|
270
273
|
@pulumi.getter
|
|
271
|
-
def labels(self) -> pulumi.Output[Optional[Mapping[str,
|
|
274
|
+
def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
|
272
275
|
"""
|
|
273
276
|
User-defined labels (key-value pairs) should be created with.
|
|
274
277
|
"""
|
pulumi_hcloud/ssh_key.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
|
|
|
12
17
|
__all__ = ['SshKeyArgs', 'SshKey']
|
|
@@ -15,13 +20,13 @@ __all__ = ['SshKeyArgs', 'SshKey']
|
|
|
15
20
|
class SshKeyArgs:
|
|
16
21
|
def __init__(__self__, *,
|
|
17
22
|
public_key: pulumi.Input[str],
|
|
18
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
23
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
19
24
|
name: Optional[pulumi.Input[str]] = None):
|
|
20
25
|
"""
|
|
21
26
|
The set of arguments for constructing a SshKey resource.
|
|
22
|
-
:param pulumi.Input[str] public_key:
|
|
23
|
-
:param pulumi.Input[Mapping[str,
|
|
24
|
-
:param pulumi.Input[str] name: Name of the SSH
|
|
27
|
+
:param pulumi.Input[str] public_key: Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
28
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
29
|
+
:param pulumi.Input[str] name: Name of the SSH Key.
|
|
25
30
|
"""
|
|
26
31
|
pulumi.set(__self__, "public_key", public_key)
|
|
27
32
|
if labels is not None:
|
|
@@ -33,7 +38,7 @@ class SshKeyArgs:
|
|
|
33
38
|
@pulumi.getter(name="publicKey")
|
|
34
39
|
def public_key(self) -> pulumi.Input[str]:
|
|
35
40
|
"""
|
|
36
|
-
|
|
41
|
+
Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
37
42
|
"""
|
|
38
43
|
return pulumi.get(self, "public_key")
|
|
39
44
|
|
|
@@ -43,21 +48,21 @@ class SshKeyArgs:
|
|
|
43
48
|
|
|
44
49
|
@property
|
|
45
50
|
@pulumi.getter
|
|
46
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
51
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
47
52
|
"""
|
|
48
|
-
User-defined labels (key-value pairs)
|
|
53
|
+
User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
49
54
|
"""
|
|
50
55
|
return pulumi.get(self, "labels")
|
|
51
56
|
|
|
52
57
|
@labels.setter
|
|
53
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
58
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
54
59
|
pulumi.set(self, "labels", value)
|
|
55
60
|
|
|
56
61
|
@property
|
|
57
62
|
@pulumi.getter
|
|
58
63
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
59
64
|
"""
|
|
60
|
-
Name of the SSH
|
|
65
|
+
Name of the SSH Key.
|
|
61
66
|
"""
|
|
62
67
|
return pulumi.get(self, "name")
|
|
63
68
|
|
|
@@ -70,15 +75,15 @@ class SshKeyArgs:
|
|
|
70
75
|
class _SshKeyState:
|
|
71
76
|
def __init__(__self__, *,
|
|
72
77
|
fingerprint: Optional[pulumi.Input[str]] = None,
|
|
73
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
78
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
74
79
|
name: Optional[pulumi.Input[str]] = None,
|
|
75
80
|
public_key: Optional[pulumi.Input[str]] = None):
|
|
76
81
|
"""
|
|
77
82
|
Input properties used for looking up and filtering SshKey resources.
|
|
78
|
-
:param pulumi.Input[str] fingerprint:
|
|
79
|
-
:param pulumi.Input[Mapping[str,
|
|
80
|
-
:param pulumi.Input[str] name: Name of the SSH
|
|
81
|
-
:param pulumi.Input[str] public_key:
|
|
83
|
+
:param pulumi.Input[str] fingerprint: Fingerprint of the SSH public key.
|
|
84
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
85
|
+
:param pulumi.Input[str] name: Name of the SSH Key.
|
|
86
|
+
:param pulumi.Input[str] public_key: Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
82
87
|
"""
|
|
83
88
|
if fingerprint is not None:
|
|
84
89
|
pulumi.set(__self__, "fingerprint", fingerprint)
|
|
@@ -93,7 +98,7 @@ class _SshKeyState:
|
|
|
93
98
|
@pulumi.getter
|
|
94
99
|
def fingerprint(self) -> Optional[pulumi.Input[str]]:
|
|
95
100
|
"""
|
|
96
|
-
|
|
101
|
+
Fingerprint of the SSH public key.
|
|
97
102
|
"""
|
|
98
103
|
return pulumi.get(self, "fingerprint")
|
|
99
104
|
|
|
@@ -103,21 +108,21 @@ class _SshKeyState:
|
|
|
103
108
|
|
|
104
109
|
@property
|
|
105
110
|
@pulumi.getter
|
|
106
|
-
def labels(self) -> Optional[pulumi.Input[Mapping[str,
|
|
111
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
107
112
|
"""
|
|
108
|
-
User-defined labels (key-value pairs)
|
|
113
|
+
User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
109
114
|
"""
|
|
110
115
|
return pulumi.get(self, "labels")
|
|
111
116
|
|
|
112
117
|
@labels.setter
|
|
113
|
-
def labels(self, value: Optional[pulumi.Input[Mapping[str,
|
|
118
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
114
119
|
pulumi.set(self, "labels", value)
|
|
115
120
|
|
|
116
121
|
@property
|
|
117
122
|
@pulumi.getter
|
|
118
123
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
119
124
|
"""
|
|
120
|
-
Name of the SSH
|
|
125
|
+
Name of the SSH Key.
|
|
121
126
|
"""
|
|
122
127
|
return pulumi.get(self, "name")
|
|
123
128
|
|
|
@@ -129,7 +134,7 @@ class _SshKeyState:
|
|
|
129
134
|
@pulumi.getter(name="publicKey")
|
|
130
135
|
def public_key(self) -> Optional[pulumi.Input[str]]:
|
|
131
136
|
"""
|
|
132
|
-
|
|
137
|
+
Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
133
138
|
"""
|
|
134
139
|
return pulumi.get(self, "public_key")
|
|
135
140
|
|
|
@@ -143,38 +148,36 @@ class SshKey(pulumi.CustomResource):
|
|
|
143
148
|
def __init__(__self__,
|
|
144
149
|
resource_name: str,
|
|
145
150
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
146
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
151
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
147
152
|
name: Optional[pulumi.Input[str]] = None,
|
|
148
153
|
public_key: Optional[pulumi.Input[str]] = None,
|
|
149
154
|
__props__=None):
|
|
150
155
|
"""
|
|
151
|
-
Provides a Hetzner Cloud SSH
|
|
156
|
+
Provides a Hetzner Cloud SSH Key resource to manage SSH Keys for server access.
|
|
152
157
|
|
|
153
158
|
## Example Usage
|
|
154
159
|
|
|
155
|
-
<!--Start PulumiCodeChooser -->
|
|
156
160
|
```python
|
|
157
161
|
import pulumi
|
|
158
162
|
import pulumi_hcloud as hcloud
|
|
163
|
+
import pulumi_std as std
|
|
159
164
|
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
main = hcloud.SshKey("main",
|
|
166
|
+
name="my-ssh-key",
|
|
167
|
+
public_key=std.file(input="~/.ssh/id_ed25519.pub").result)
|
|
162
168
|
```
|
|
163
|
-
<!--End PulumiCodeChooser -->
|
|
164
169
|
|
|
165
170
|
## Import
|
|
166
171
|
|
|
167
|
-
SSH keys can be imported using the SSH key `id`:
|
|
168
|
-
|
|
169
172
|
```sh
|
|
170
|
-
$ pulumi import hcloud:index/sshKey:SshKey
|
|
173
|
+
$ pulumi import hcloud:index/sshKey:SshKey example "$SSH_KEY_ID"
|
|
171
174
|
```
|
|
172
175
|
|
|
173
176
|
:param str resource_name: The name of the resource.
|
|
174
177
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
175
|
-
:param pulumi.Input[Mapping[str,
|
|
176
|
-
:param pulumi.Input[str] name: Name of the SSH
|
|
177
|
-
:param pulumi.Input[str] public_key:
|
|
178
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
179
|
+
:param pulumi.Input[str] name: Name of the SSH Key.
|
|
180
|
+
:param pulumi.Input[str] public_key: Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
178
181
|
"""
|
|
179
182
|
...
|
|
180
183
|
@overload
|
|
@@ -183,26 +186,24 @@ class SshKey(pulumi.CustomResource):
|
|
|
183
186
|
args: SshKeyArgs,
|
|
184
187
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
185
188
|
"""
|
|
186
|
-
Provides a Hetzner Cloud SSH
|
|
189
|
+
Provides a Hetzner Cloud SSH Key resource to manage SSH Keys for server access.
|
|
187
190
|
|
|
188
191
|
## Example Usage
|
|
189
192
|
|
|
190
|
-
<!--Start PulumiCodeChooser -->
|
|
191
193
|
```python
|
|
192
194
|
import pulumi
|
|
193
195
|
import pulumi_hcloud as hcloud
|
|
196
|
+
import pulumi_std as std
|
|
194
197
|
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
main = hcloud.SshKey("main",
|
|
199
|
+
name="my-ssh-key",
|
|
200
|
+
public_key=std.file(input="~/.ssh/id_ed25519.pub").result)
|
|
197
201
|
```
|
|
198
|
-
<!--End PulumiCodeChooser -->
|
|
199
202
|
|
|
200
203
|
## Import
|
|
201
204
|
|
|
202
|
-
SSH keys can be imported using the SSH key `id`:
|
|
203
|
-
|
|
204
205
|
```sh
|
|
205
|
-
$ pulumi import hcloud:index/sshKey:SshKey
|
|
206
|
+
$ pulumi import hcloud:index/sshKey:SshKey example "$SSH_KEY_ID"
|
|
206
207
|
```
|
|
207
208
|
|
|
208
209
|
:param str resource_name: The name of the resource.
|
|
@@ -220,7 +221,7 @@ class SshKey(pulumi.CustomResource):
|
|
|
220
221
|
def _internal_init(__self__,
|
|
221
222
|
resource_name: str,
|
|
222
223
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
223
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
224
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
224
225
|
name: Optional[pulumi.Input[str]] = None,
|
|
225
226
|
public_key: Optional[pulumi.Input[str]] = None,
|
|
226
227
|
__props__=None):
|
|
@@ -249,7 +250,7 @@ class SshKey(pulumi.CustomResource):
|
|
|
249
250
|
id: pulumi.Input[str],
|
|
250
251
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
251
252
|
fingerprint: Optional[pulumi.Input[str]] = None,
|
|
252
|
-
labels: Optional[pulumi.Input[Mapping[str,
|
|
253
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
253
254
|
name: Optional[pulumi.Input[str]] = None,
|
|
254
255
|
public_key: Optional[pulumi.Input[str]] = None) -> 'SshKey':
|
|
255
256
|
"""
|
|
@@ -259,10 +260,10 @@ class SshKey(pulumi.CustomResource):
|
|
|
259
260
|
:param str resource_name: The unique name of the resulting resource.
|
|
260
261
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
261
262
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
262
|
-
:param pulumi.Input[str] fingerprint:
|
|
263
|
-
:param pulumi.Input[Mapping[str,
|
|
264
|
-
:param pulumi.Input[str] name: Name of the SSH
|
|
265
|
-
:param pulumi.Input[str] public_key:
|
|
263
|
+
:param pulumi.Input[str] fingerprint: Fingerprint of the SSH public key.
|
|
264
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
265
|
+
:param pulumi.Input[str] name: Name of the SSH Key.
|
|
266
|
+
:param pulumi.Input[str] public_key: Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
266
267
|
"""
|
|
267
268
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
268
269
|
|
|
@@ -278,15 +279,15 @@ class SshKey(pulumi.CustomResource):
|
|
|
278
279
|
@pulumi.getter
|
|
279
280
|
def fingerprint(self) -> pulumi.Output[str]:
|
|
280
281
|
"""
|
|
281
|
-
|
|
282
|
+
Fingerprint of the SSH public key.
|
|
282
283
|
"""
|
|
283
284
|
return pulumi.get(self, "fingerprint")
|
|
284
285
|
|
|
285
286
|
@property
|
|
286
287
|
@pulumi.getter
|
|
287
|
-
def labels(self) -> pulumi.Output[
|
|
288
|
+
def labels(self) -> pulumi.Output[Mapping[str, str]]:
|
|
288
289
|
"""
|
|
289
|
-
User-defined labels (key-value pairs)
|
|
290
|
+
User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
|
|
290
291
|
"""
|
|
291
292
|
return pulumi.get(self, "labels")
|
|
292
293
|
|
|
@@ -294,7 +295,7 @@ class SshKey(pulumi.CustomResource):
|
|
|
294
295
|
@pulumi.getter
|
|
295
296
|
def name(self) -> pulumi.Output[str]:
|
|
296
297
|
"""
|
|
297
|
-
Name of the SSH
|
|
298
|
+
Name of the SSH Key.
|
|
298
299
|
"""
|
|
299
300
|
return pulumi.get(self, "name")
|
|
300
301
|
|
|
@@ -302,7 +303,7 @@ class SshKey(pulumi.CustomResource):
|
|
|
302
303
|
@pulumi.getter(name="publicKey")
|
|
303
304
|
def public_key(self) -> pulumi.Output[str]:
|
|
304
305
|
"""
|
|
305
|
-
|
|
306
|
+
Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
|
|
306
307
|
"""
|
|
307
308
|
return pulumi.get(self, "public_key")
|
|
308
309
|
|