pulumi-digitalocean 4.27.0a1710332933__py3-none-any.whl → 4.39.0a1736849637__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-digitalocean might be problematic. Click here for more details.
- pulumi_digitalocean/__init__.py +75 -0
- pulumi_digitalocean/_enums.py +131 -52
- pulumi_digitalocean/_inputs.py +5767 -399
- pulumi_digitalocean/_utilities.py +41 -5
- pulumi_digitalocean/app.py +199 -67
- pulumi_digitalocean/cdn.py +20 -23
- pulumi_digitalocean/certificate.py +45 -42
- pulumi_digitalocean/config/__init__.pyi +5 -0
- pulumi_digitalocean/config/vars.py +5 -0
- pulumi_digitalocean/container_registry.py +11 -6
- pulumi_digitalocean/container_registry_docker_credentials.py +53 -12
- pulumi_digitalocean/custom_image.py +13 -8
- pulumi_digitalocean/database_cluster.py +298 -120
- pulumi_digitalocean/database_connection_pool.py +15 -10
- pulumi_digitalocean/database_db.py +19 -12
- pulumi_digitalocean/database_firewall.py +78 -75
- pulumi_digitalocean/database_kafka_config.py +1040 -0
- pulumi_digitalocean/database_kafka_topic.py +66 -61
- pulumi_digitalocean/database_mongodb_config.py +452 -0
- pulumi_digitalocean/database_mysql_config.py +15 -12
- pulumi_digitalocean/database_opensearch_config.py +2069 -0
- pulumi_digitalocean/database_postgresql_config.py +2614 -0
- pulumi_digitalocean/database_redis_config.py +29 -12
- pulumi_digitalocean/database_replica.py +29 -24
- pulumi_digitalocean/database_user.py +90 -75
- pulumi_digitalocean/dns_record.py +13 -8
- pulumi_digitalocean/domain.py +7 -6
- pulumi_digitalocean/droplet.py +89 -31
- pulumi_digitalocean/droplet_autoscale.py +474 -0
- pulumi_digitalocean/droplet_snapshot.py +23 -14
- pulumi_digitalocean/firewall.py +118 -106
- pulumi_digitalocean/floating_ip.py +19 -16
- pulumi_digitalocean/floating_ip_assignment.py +19 -16
- pulumi_digitalocean/get_account.py +18 -9
- pulumi_digitalocean/get_app.py +57 -10
- pulumi_digitalocean/get_certificate.py +19 -9
- pulumi_digitalocean/get_container_registry.py +19 -9
- pulumi_digitalocean/get_database_ca.py +14 -9
- pulumi_digitalocean/get_database_cluster.py +119 -11
- pulumi_digitalocean/get_database_connection_pool.py +25 -9
- pulumi_digitalocean/get_database_replica.py +29 -9
- pulumi_digitalocean/get_database_user.py +21 -9
- pulumi_digitalocean/get_domain.py +16 -9
- pulumi_digitalocean/get_domains.py +34 -27
- pulumi_digitalocean/get_droplet.py +66 -23
- pulumi_digitalocean/get_droplet_autoscale.py +197 -0
- pulumi_digitalocean/get_droplet_snapshot.py +36 -23
- pulumi_digitalocean/get_droplets.py +80 -54
- pulumi_digitalocean/get_firewall.py +29 -13
- pulumi_digitalocean/get_floating_ip.py +16 -9
- pulumi_digitalocean/get_image.py +42 -27
- pulumi_digitalocean/get_images.py +56 -53
- pulumi_digitalocean/get_kubernetes_cluster.py +53 -6
- pulumi_digitalocean/get_kubernetes_versions.py +43 -41
- pulumi_digitalocean/get_load_balancer.py +81 -17
- pulumi_digitalocean/get_project.py +23 -9
- pulumi_digitalocean/get_projects.py +56 -53
- pulumi_digitalocean/get_record.py +23 -9
- pulumi_digitalocean/get_records.py +62 -13
- pulumi_digitalocean/get_region.py +17 -9
- pulumi_digitalocean/get_regions.py +56 -53
- pulumi_digitalocean/get_reserved_ip.py +16 -9
- pulumi_digitalocean/get_reserved_ipv6.py +118 -0
- pulumi_digitalocean/get_sizes.py +24 -13
- pulumi_digitalocean/get_spaces_bucket.py +18 -9
- pulumi_digitalocean/get_spaces_bucket_object.py +41 -14
- pulumi_digitalocean/get_spaces_bucket_objects.py +26 -5
- pulumi_digitalocean/get_spaces_buckets.py +48 -45
- pulumi_digitalocean/get_ssh_key.py +27 -19
- pulumi_digitalocean/get_ssh_keys.py +40 -37
- pulumi_digitalocean/get_tag.py +31 -19
- pulumi_digitalocean/get_tags.py +32 -25
- pulumi_digitalocean/get_volume.py +35 -23
- pulumi_digitalocean/get_volume_snapshot.py +35 -21
- pulumi_digitalocean/get_vpc.py +33 -23
- pulumi_digitalocean/get_vpc_peering.py +244 -0
- pulumi_digitalocean/kubernetes_cluster.py +86 -35
- pulumi_digitalocean/kubernetes_node_pool.py +46 -43
- pulumi_digitalocean/load_balancer.py +320 -157
- pulumi_digitalocean/monitor_alert.py +17 -12
- pulumi_digitalocean/outputs.py +3419 -344
- pulumi_digitalocean/project.py +19 -16
- pulumi_digitalocean/project_resources.py +11 -8
- pulumi_digitalocean/provider.py +5 -0
- pulumi_digitalocean/pulumi-plugin.json +2 -1
- pulumi_digitalocean/reserved_ip.py +19 -16
- pulumi_digitalocean/reserved_ip_assignment.py +19 -16
- pulumi_digitalocean/reserved_ipv6.py +232 -0
- pulumi_digitalocean/reserved_ipv6_assignment.py +171 -0
- pulumi_digitalocean/spaces_bucket.py +70 -79
- pulumi_digitalocean/spaces_bucket_cors_configuration.py +30 -25
- pulumi_digitalocean/spaces_bucket_object.py +11 -12
- pulumi_digitalocean/spaces_bucket_policy.py +21 -16
- pulumi_digitalocean/ssh_key.py +19 -10
- pulumi_digitalocean/tag.py +13 -10
- pulumi_digitalocean/uptime_alert.py +10 -5
- pulumi_digitalocean/uptime_check.py +5 -0
- pulumi_digitalocean/volume.py +47 -50
- pulumi_digitalocean/volume_attachment.py +25 -20
- pulumi_digitalocean/volume_snapshot.py +17 -10
- pulumi_digitalocean/vpc.py +27 -22
- pulumi_digitalocean/vpc_peering.py +378 -0
- {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736849637.dist-info}/METADATA +7 -6
- pulumi_digitalocean-4.39.0a1736849637.dist-info/RECORD +108 -0
- {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736849637.dist-info}/WHEEL +1 -1
- pulumi_digitalocean-4.27.0a1710332933.dist-info/RECORD +0 -97
- {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736849637.dist-info}/top_level.txt +0 -0
pulumi_digitalocean/cdn.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__ = ['CdnArgs', 'Cdn']
|
|
@@ -54,13 +59,11 @@ class CdnArgs:
|
|
|
54
59
|
|
|
55
60
|
@property
|
|
56
61
|
@pulumi.getter(name="certificateId")
|
|
62
|
+
@_utilities.deprecated("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
57
63
|
def certificate_id(self) -> Optional[pulumi.Input[str]]:
|
|
58
64
|
"""
|
|
59
65
|
**Deprecated** The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
|
|
60
66
|
"""
|
|
61
|
-
warnings.warn("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""", DeprecationWarning)
|
|
62
|
-
pulumi.log.warn("""certificate_id is deprecated: Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
63
|
-
|
|
64
67
|
return pulumi.get(self, "certificate_id")
|
|
65
68
|
|
|
66
69
|
@certificate_id.setter
|
|
@@ -144,13 +147,11 @@ class _CdnState:
|
|
|
144
147
|
|
|
145
148
|
@property
|
|
146
149
|
@pulumi.getter(name="certificateId")
|
|
150
|
+
@_utilities.deprecated("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
147
151
|
def certificate_id(self) -> Optional[pulumi.Input[str]]:
|
|
148
152
|
"""
|
|
149
153
|
**Deprecated** The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
|
|
150
154
|
"""
|
|
151
|
-
warnings.warn("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""", DeprecationWarning)
|
|
152
|
-
pulumi.log.warn("""certificate_id is deprecated: Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
153
|
-
|
|
154
155
|
return pulumi.get(self, "certificate_id")
|
|
155
156
|
|
|
156
157
|
@certificate_id.setter
|
|
@@ -248,35 +249,35 @@ class Cdn(pulumi.CustomResource):
|
|
|
248
249
|
|
|
249
250
|
### Basic Example
|
|
250
251
|
|
|
251
|
-
<!--Start PulumiCodeChooser -->
|
|
252
252
|
```python
|
|
253
253
|
import pulumi
|
|
254
254
|
import pulumi_digitalocean as digitalocean
|
|
255
255
|
|
|
256
256
|
# Create a new Spaces Bucket
|
|
257
257
|
mybucket = digitalocean.SpacesBucket("mybucket",
|
|
258
|
-
|
|
258
|
+
name="example",
|
|
259
|
+
region=digitalocean.Region.SFO2,
|
|
259
260
|
acl="public-read")
|
|
260
261
|
# Add a CDN endpoint to the Spaces Bucket
|
|
261
262
|
mycdn = digitalocean.Cdn("mycdn", origin=mybucket.bucket_domain_name)
|
|
262
263
|
pulumi.export("fqdn", mycdn.endpoint)
|
|
263
264
|
```
|
|
264
|
-
<!--End PulumiCodeChooser -->
|
|
265
265
|
|
|
266
266
|
### Custom Sub-Domain Example
|
|
267
267
|
|
|
268
|
-
<!--Start PulumiCodeChooser -->
|
|
269
268
|
```python
|
|
270
269
|
import pulumi
|
|
271
270
|
import pulumi_digitalocean as digitalocean
|
|
272
271
|
|
|
273
272
|
# Create a new Spaces Bucket
|
|
274
273
|
mybucket = digitalocean.SpacesBucket("mybucket",
|
|
275
|
-
|
|
274
|
+
name="example",
|
|
275
|
+
region=digitalocean.Region.SFO2,
|
|
276
276
|
acl="public-read")
|
|
277
277
|
# Create a DigitalOcean managed Let's Encrypt Certificate
|
|
278
278
|
cert = digitalocean.Certificate("cert",
|
|
279
|
-
|
|
279
|
+
name="cdn-cert",
|
|
280
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
280
281
|
domains=["static.example.com"])
|
|
281
282
|
# Add a CDN endpoint with a custom sub-domain to the Spaces Bucket
|
|
282
283
|
mycdn = digitalocean.Cdn("mycdn",
|
|
@@ -284,7 +285,6 @@ class Cdn(pulumi.CustomResource):
|
|
|
284
285
|
custom_domain="static.example.com",
|
|
285
286
|
certificate_name=cert.name)
|
|
286
287
|
```
|
|
287
|
-
<!--End PulumiCodeChooser -->
|
|
288
288
|
|
|
289
289
|
## Import
|
|
290
290
|
|
|
@@ -315,35 +315,35 @@ class Cdn(pulumi.CustomResource):
|
|
|
315
315
|
|
|
316
316
|
### Basic Example
|
|
317
317
|
|
|
318
|
-
<!--Start PulumiCodeChooser -->
|
|
319
318
|
```python
|
|
320
319
|
import pulumi
|
|
321
320
|
import pulumi_digitalocean as digitalocean
|
|
322
321
|
|
|
323
322
|
# Create a new Spaces Bucket
|
|
324
323
|
mybucket = digitalocean.SpacesBucket("mybucket",
|
|
325
|
-
|
|
324
|
+
name="example",
|
|
325
|
+
region=digitalocean.Region.SFO2,
|
|
326
326
|
acl="public-read")
|
|
327
327
|
# Add a CDN endpoint to the Spaces Bucket
|
|
328
328
|
mycdn = digitalocean.Cdn("mycdn", origin=mybucket.bucket_domain_name)
|
|
329
329
|
pulumi.export("fqdn", mycdn.endpoint)
|
|
330
330
|
```
|
|
331
|
-
<!--End PulumiCodeChooser -->
|
|
332
331
|
|
|
333
332
|
### Custom Sub-Domain Example
|
|
334
333
|
|
|
335
|
-
<!--Start PulumiCodeChooser -->
|
|
336
334
|
```python
|
|
337
335
|
import pulumi
|
|
338
336
|
import pulumi_digitalocean as digitalocean
|
|
339
337
|
|
|
340
338
|
# Create a new Spaces Bucket
|
|
341
339
|
mybucket = digitalocean.SpacesBucket("mybucket",
|
|
342
|
-
|
|
340
|
+
name="example",
|
|
341
|
+
region=digitalocean.Region.SFO2,
|
|
343
342
|
acl="public-read")
|
|
344
343
|
# Create a DigitalOcean managed Let's Encrypt Certificate
|
|
345
344
|
cert = digitalocean.Certificate("cert",
|
|
346
|
-
|
|
345
|
+
name="cdn-cert",
|
|
346
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
347
347
|
domains=["static.example.com"])
|
|
348
348
|
# Add a CDN endpoint with a custom sub-domain to the Spaces Bucket
|
|
349
349
|
mycdn = digitalocean.Cdn("mycdn",
|
|
@@ -351,7 +351,6 @@ class Cdn(pulumi.CustomResource):
|
|
|
351
351
|
custom_domain="static.example.com",
|
|
352
352
|
certificate_name=cert.name)
|
|
353
353
|
```
|
|
354
|
-
<!--End PulumiCodeChooser -->
|
|
355
354
|
|
|
356
355
|
## Import
|
|
357
356
|
|
|
@@ -446,13 +445,11 @@ class Cdn(pulumi.CustomResource):
|
|
|
446
445
|
|
|
447
446
|
@property
|
|
448
447
|
@pulumi.getter(name="certificateId")
|
|
448
|
+
@_utilities.deprecated("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
449
449
|
def certificate_id(self) -> pulumi.Output[str]:
|
|
450
450
|
"""
|
|
451
451
|
**Deprecated** The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
|
|
452
452
|
"""
|
|
453
|
-
warnings.warn("""Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""", DeprecationWarning)
|
|
454
|
-
pulumi.log.warn("""certificate_id is deprecated: Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.""")
|
|
455
|
-
|
|
456
453
|
return pulumi.get(self, "certificate_id")
|
|
457
454
|
|
|
458
455
|
@property
|
|
@@ -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 ._enums import *
|
|
12
17
|
|
|
@@ -332,58 +337,57 @@ class Certificate(pulumi.CustomResource):
|
|
|
332
337
|
|
|
333
338
|
### Custom Certificate
|
|
334
339
|
|
|
335
|
-
<!--Start PulumiCodeChooser -->
|
|
336
340
|
```python
|
|
337
341
|
import pulumi
|
|
338
342
|
import pulumi_digitalocean as digitalocean
|
|
343
|
+
import pulumi_std as std
|
|
339
344
|
|
|
340
345
|
cert = digitalocean.Certificate("cert",
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
346
|
+
name="custom-example",
|
|
347
|
+
type=digitalocean.CertificateType.CUSTOM,
|
|
348
|
+
private_key=std.file(input="/Users/myuser/certs/privkey.pem").result,
|
|
349
|
+
leaf_certificate=std.file(input="/Users/myuser/certs/cert.pem").result,
|
|
350
|
+
certificate_chain=std.file(input="/Users/myuser/certs/fullchain.pem").result)
|
|
345
351
|
```
|
|
346
|
-
<!--End PulumiCodeChooser -->
|
|
347
352
|
|
|
348
353
|
### Let's Encrypt Certificate
|
|
349
354
|
|
|
350
|
-
<!--Start PulumiCodeChooser -->
|
|
351
355
|
```python
|
|
352
356
|
import pulumi
|
|
353
357
|
import pulumi_digitalocean as digitalocean
|
|
354
358
|
|
|
355
359
|
cert = digitalocean.Certificate("cert",
|
|
356
|
-
|
|
357
|
-
type=
|
|
360
|
+
name="le-example",
|
|
361
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
362
|
+
domains=["example.com"])
|
|
358
363
|
```
|
|
359
|
-
<!--End PulumiCodeChooser -->
|
|
360
364
|
|
|
361
365
|
### Use with Other Resources
|
|
362
366
|
|
|
363
367
|
Both custom and Let's Encrypt certificates can be used with other resources
|
|
364
368
|
including the `LoadBalancer` and `Cdn` resources.
|
|
365
369
|
|
|
366
|
-
<!--Start PulumiCodeChooser -->
|
|
367
370
|
```python
|
|
368
371
|
import pulumi
|
|
369
372
|
import pulumi_digitalocean as digitalocean
|
|
370
373
|
|
|
371
374
|
cert = digitalocean.Certificate("cert",
|
|
372
|
-
|
|
375
|
+
name="le-example",
|
|
376
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
373
377
|
domains=["example.com"])
|
|
374
378
|
# Create a new Load Balancer with TLS termination
|
|
375
379
|
public = digitalocean.LoadBalancer("public",
|
|
376
|
-
|
|
380
|
+
name="secure-loadbalancer-1",
|
|
381
|
+
region=digitalocean.Region.NYC3,
|
|
377
382
|
droplet_tag="backend",
|
|
378
|
-
forwarding_rules=[
|
|
379
|
-
entry_port
|
|
380
|
-
entry_protocol
|
|
381
|
-
target_port
|
|
382
|
-
target_protocol
|
|
383
|
-
certificate_name
|
|
384
|
-
|
|
383
|
+
forwarding_rules=[{
|
|
384
|
+
"entry_port": 443,
|
|
385
|
+
"entry_protocol": "https",
|
|
386
|
+
"target_port": 80,
|
|
387
|
+
"target_protocol": "http",
|
|
388
|
+
"certificate_name": cert.name,
|
|
389
|
+
}])
|
|
385
390
|
```
|
|
386
|
-
<!--End PulumiCodeChooser -->
|
|
387
391
|
|
|
388
392
|
## Import
|
|
389
393
|
|
|
@@ -427,58 +431,57 @@ class Certificate(pulumi.CustomResource):
|
|
|
427
431
|
|
|
428
432
|
### Custom Certificate
|
|
429
433
|
|
|
430
|
-
<!--Start PulumiCodeChooser -->
|
|
431
434
|
```python
|
|
432
435
|
import pulumi
|
|
433
436
|
import pulumi_digitalocean as digitalocean
|
|
437
|
+
import pulumi_std as std
|
|
434
438
|
|
|
435
439
|
cert = digitalocean.Certificate("cert",
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
+
name="custom-example",
|
|
441
|
+
type=digitalocean.CertificateType.CUSTOM,
|
|
442
|
+
private_key=std.file(input="/Users/myuser/certs/privkey.pem").result,
|
|
443
|
+
leaf_certificate=std.file(input="/Users/myuser/certs/cert.pem").result,
|
|
444
|
+
certificate_chain=std.file(input="/Users/myuser/certs/fullchain.pem").result)
|
|
440
445
|
```
|
|
441
|
-
<!--End PulumiCodeChooser -->
|
|
442
446
|
|
|
443
447
|
### Let's Encrypt Certificate
|
|
444
448
|
|
|
445
|
-
<!--Start PulumiCodeChooser -->
|
|
446
449
|
```python
|
|
447
450
|
import pulumi
|
|
448
451
|
import pulumi_digitalocean as digitalocean
|
|
449
452
|
|
|
450
453
|
cert = digitalocean.Certificate("cert",
|
|
451
|
-
|
|
452
|
-
type=
|
|
454
|
+
name="le-example",
|
|
455
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
456
|
+
domains=["example.com"])
|
|
453
457
|
```
|
|
454
|
-
<!--End PulumiCodeChooser -->
|
|
455
458
|
|
|
456
459
|
### Use with Other Resources
|
|
457
460
|
|
|
458
461
|
Both custom and Let's Encrypt certificates can be used with other resources
|
|
459
462
|
including the `LoadBalancer` and `Cdn` resources.
|
|
460
463
|
|
|
461
|
-
<!--Start PulumiCodeChooser -->
|
|
462
464
|
```python
|
|
463
465
|
import pulumi
|
|
464
466
|
import pulumi_digitalocean as digitalocean
|
|
465
467
|
|
|
466
468
|
cert = digitalocean.Certificate("cert",
|
|
467
|
-
|
|
469
|
+
name="le-example",
|
|
470
|
+
type=digitalocean.CertificateType.LETS_ENCRYPT,
|
|
468
471
|
domains=["example.com"])
|
|
469
472
|
# Create a new Load Balancer with TLS termination
|
|
470
473
|
public = digitalocean.LoadBalancer("public",
|
|
471
|
-
|
|
474
|
+
name="secure-loadbalancer-1",
|
|
475
|
+
region=digitalocean.Region.NYC3,
|
|
472
476
|
droplet_tag="backend",
|
|
473
|
-
forwarding_rules=[
|
|
474
|
-
entry_port
|
|
475
|
-
entry_protocol
|
|
476
|
-
target_port
|
|
477
|
-
target_protocol
|
|
478
|
-
certificate_name
|
|
479
|
-
|
|
477
|
+
forwarding_rules=[{
|
|
478
|
+
"entry_port": 443,
|
|
479
|
+
"entry_protocol": "https",
|
|
480
|
+
"target_port": 80,
|
|
481
|
+
"target_protocol": "http",
|
|
482
|
+
"certificate_name": cert.name,
|
|
483
|
+
}])
|
|
480
484
|
```
|
|
481
|
-
<!--End PulumiCodeChooser -->
|
|
482
485
|
|
|
483
486
|
## Import
|
|
484
487
|
|
|
@@ -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
|
apiEndpoint: str
|
|
@@ -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
|
import types
|
|
@@ -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__ = ['ContainerRegistryArgs', 'ContainerRegistry']
|
|
@@ -201,15 +206,15 @@ class ContainerRegistry(pulumi.CustomResource):
|
|
|
201
206
|
|
|
202
207
|
## Example Usage
|
|
203
208
|
|
|
204
|
-
<!--Start PulumiCodeChooser -->
|
|
205
209
|
```python
|
|
206
210
|
import pulumi
|
|
207
211
|
import pulumi_digitalocean as digitalocean
|
|
208
212
|
|
|
209
213
|
# Create a new container registry
|
|
210
|
-
foobar = digitalocean.ContainerRegistry("foobar",
|
|
214
|
+
foobar = digitalocean.ContainerRegistry("foobar",
|
|
215
|
+
name="foobar",
|
|
216
|
+
subscription_tier_slug="starter")
|
|
211
217
|
```
|
|
212
|
-
<!--End PulumiCodeChooser -->
|
|
213
218
|
|
|
214
219
|
## Import
|
|
215
220
|
|
|
@@ -237,15 +242,15 @@ class ContainerRegistry(pulumi.CustomResource):
|
|
|
237
242
|
|
|
238
243
|
## Example Usage
|
|
239
244
|
|
|
240
|
-
<!--Start PulumiCodeChooser -->
|
|
241
245
|
```python
|
|
242
246
|
import pulumi
|
|
243
247
|
import pulumi_digitalocean as digitalocean
|
|
244
248
|
|
|
245
249
|
# Create a new container registry
|
|
246
|
-
foobar = digitalocean.ContainerRegistry("foobar",
|
|
250
|
+
foobar = digitalocean.ContainerRegistry("foobar",
|
|
251
|
+
name="foobar",
|
|
252
|
+
subscription_tier_slug="starter")
|
|
247
253
|
```
|
|
248
|
-
<!--End PulumiCodeChooser -->
|
|
249
254
|
|
|
250
255
|
## Import
|
|
251
256
|
|
|
@@ -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__ = ['ContainerRegistryDockerCredentialsArgs', 'ContainerRegistryDockerCredentials']
|
|
@@ -174,28 +179,46 @@ class ContainerRegistryDockerCredentials(pulumi.CustomResource):
|
|
|
174
179
|
|
|
175
180
|
Get the container registry:
|
|
176
181
|
|
|
177
|
-
<!--Start PulumiCodeChooser -->
|
|
178
182
|
```python
|
|
179
183
|
import pulumi
|
|
180
184
|
import pulumi_digitalocean as digitalocean
|
|
181
185
|
|
|
182
186
|
example = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
183
187
|
```
|
|
184
|
-
<!--End PulumiCodeChooser -->
|
|
185
188
|
|
|
186
189
|
### Docker Provider Example
|
|
187
190
|
|
|
188
191
|
Use the `endpoint` and `docker_credentials` with the Docker provider:
|
|
189
192
|
|
|
190
|
-
<!--Start PulumiCodeChooser -->
|
|
191
193
|
```python
|
|
192
194
|
import pulumi
|
|
193
195
|
import pulumi_digitalocean as digitalocean
|
|
194
196
|
|
|
195
|
-
|
|
196
|
-
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("
|
|
197
|
+
example = digitalocean.get_container_registry(name="example")
|
|
198
|
+
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Kubernetes Example
|
|
202
|
+
|
|
203
|
+
Combined with the Kubernetes Provider's `kubernetes_secret` resource, you can
|
|
204
|
+
access the registry from inside your cluster:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
import pulumi
|
|
208
|
+
import pulumi_digitalocean as digitalocean
|
|
209
|
+
import pulumi_kubernetes as kubernetes
|
|
210
|
+
|
|
211
|
+
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
212
|
+
example = digitalocean.get_kubernetes_cluster(name="prod-cluster-01")
|
|
213
|
+
example_secret = kubernetes.core.v1.Secret("example",
|
|
214
|
+
metadata={
|
|
215
|
+
"name": "docker-cfg",
|
|
216
|
+
},
|
|
217
|
+
data={
|
|
218
|
+
".dockerconfigjson": example_container_registry_docker_credentials.docker_credentials,
|
|
219
|
+
},
|
|
220
|
+
type="kubernetes.io/dockerconfigjson")
|
|
197
221
|
```
|
|
198
|
-
<!--End PulumiCodeChooser -->
|
|
199
222
|
|
|
200
223
|
:param str resource_name: The name of the resource.
|
|
201
224
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -220,28 +243,46 @@ class ContainerRegistryDockerCredentials(pulumi.CustomResource):
|
|
|
220
243
|
|
|
221
244
|
Get the container registry:
|
|
222
245
|
|
|
223
|
-
<!--Start PulumiCodeChooser -->
|
|
224
246
|
```python
|
|
225
247
|
import pulumi
|
|
226
248
|
import pulumi_digitalocean as digitalocean
|
|
227
249
|
|
|
228
250
|
example = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
229
251
|
```
|
|
230
|
-
<!--End PulumiCodeChooser -->
|
|
231
252
|
|
|
232
253
|
### Docker Provider Example
|
|
233
254
|
|
|
234
255
|
Use the `endpoint` and `docker_credentials` with the Docker provider:
|
|
235
256
|
|
|
236
|
-
<!--Start PulumiCodeChooser -->
|
|
237
257
|
```python
|
|
238
258
|
import pulumi
|
|
239
259
|
import pulumi_digitalocean as digitalocean
|
|
240
260
|
|
|
241
|
-
|
|
242
|
-
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("
|
|
261
|
+
example = digitalocean.get_container_registry(name="example")
|
|
262
|
+
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Kubernetes Example
|
|
266
|
+
|
|
267
|
+
Combined with the Kubernetes Provider's `kubernetes_secret` resource, you can
|
|
268
|
+
access the registry from inside your cluster:
|
|
269
|
+
|
|
270
|
+
```python
|
|
271
|
+
import pulumi
|
|
272
|
+
import pulumi_digitalocean as digitalocean
|
|
273
|
+
import pulumi_kubernetes as kubernetes
|
|
274
|
+
|
|
275
|
+
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
|
|
276
|
+
example = digitalocean.get_kubernetes_cluster(name="prod-cluster-01")
|
|
277
|
+
example_secret = kubernetes.core.v1.Secret("example",
|
|
278
|
+
metadata={
|
|
279
|
+
"name": "docker-cfg",
|
|
280
|
+
},
|
|
281
|
+
data={
|
|
282
|
+
".dockerconfigjson": example_container_registry_docker_credentials.docker_credentials,
|
|
283
|
+
},
|
|
284
|
+
type="kubernetes.io/dockerconfigjson")
|
|
243
285
|
```
|
|
244
|
-
<!--End PulumiCodeChooser -->
|
|
245
286
|
|
|
246
287
|
:param str resource_name: The name of the resource.
|
|
247
288
|
:param ContainerRegistryDockerCredentialsArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -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__ = ['CustomImageArgs', 'CustomImage']
|
|
@@ -372,21 +377,21 @@ class CustomImage(pulumi.CustomResource):
|
|
|
372
377
|
|
|
373
378
|
## Example Usage
|
|
374
379
|
|
|
375
|
-
<!--Start PulumiCodeChooser -->
|
|
376
380
|
```python
|
|
377
381
|
import pulumi
|
|
378
382
|
import pulumi_digitalocean as digitalocean
|
|
379
383
|
|
|
380
384
|
flatcar = digitalocean.CustomImage("flatcar",
|
|
385
|
+
name="flatcar",
|
|
381
386
|
url="https://stable.release.flatcar-linux.net/amd64-usr/2605.7.0/flatcar_production_digitalocean_image.bin.bz2",
|
|
382
387
|
regions=["nyc3"])
|
|
383
388
|
example = digitalocean.Droplet("example",
|
|
384
389
|
image=flatcar.id,
|
|
385
|
-
|
|
386
|
-
|
|
390
|
+
name="example-01",
|
|
391
|
+
region=digitalocean.Region.NYC3,
|
|
392
|
+
size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
|
|
387
393
|
ssh_keys=["12345"])
|
|
388
394
|
```
|
|
389
|
-
<!--End PulumiCodeChooser -->
|
|
390
395
|
|
|
391
396
|
:param str resource_name: The name of the resource.
|
|
392
397
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -418,21 +423,21 @@ class CustomImage(pulumi.CustomResource):
|
|
|
418
423
|
|
|
419
424
|
## Example Usage
|
|
420
425
|
|
|
421
|
-
<!--Start PulumiCodeChooser -->
|
|
422
426
|
```python
|
|
423
427
|
import pulumi
|
|
424
428
|
import pulumi_digitalocean as digitalocean
|
|
425
429
|
|
|
426
430
|
flatcar = digitalocean.CustomImage("flatcar",
|
|
431
|
+
name="flatcar",
|
|
427
432
|
url="https://stable.release.flatcar-linux.net/amd64-usr/2605.7.0/flatcar_production_digitalocean_image.bin.bz2",
|
|
428
433
|
regions=["nyc3"])
|
|
429
434
|
example = digitalocean.Droplet("example",
|
|
430
435
|
image=flatcar.id,
|
|
431
|
-
|
|
432
|
-
|
|
436
|
+
name="example-01",
|
|
437
|
+
region=digitalocean.Region.NYC3,
|
|
438
|
+
size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
|
|
433
439
|
ssh_keys=["12345"])
|
|
434
440
|
```
|
|
435
|
-
<!--End PulumiCodeChooser -->
|
|
436
441
|
|
|
437
442
|
:param str resource_name: The name of the resource.
|
|
438
443
|
:param CustomImageArgs args: The arguments to use to populate this resource's properties.
|