pulumi-docker 4.6.0b4__py3-none-any.whl → 4.6.2__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-docker might be problematic. Click here for more details.
- pulumi_docker/__init__.py +0 -12
- pulumi_docker/_inputs.py +1500 -43
- pulumi_docker/_utilities.py +49 -9
- pulumi_docker/config/__init__.pyi +11 -8
- pulumi_docker/config/outputs.py +7 -2
- pulumi_docker/config/vars.py +11 -8
- pulumi_docker/container.py +186 -201
- pulumi_docker/get_logs.py +34 -5
- pulumi_docker/get_network.py +19 -6
- pulumi_docker/get_plugin.py +35 -11
- pulumi_docker/get_registry_image.py +24 -13
- pulumi_docker/get_remote_image.py +22 -5
- pulumi_docker/image.py +64 -54
- pulumi_docker/network.py +69 -64
- pulumi_docker/outputs.py +14 -9
- pulumi_docker/plugin.py +17 -44
- pulumi_docker/provider.py +30 -32
- pulumi_docker/pulumi-plugin.json +2 -1
- pulumi_docker/registry_image.py +19 -46
- pulumi_docker/remote_image.py +107 -48
- pulumi_docker/secret.py +12 -7
- pulumi_docker/service.py +101 -110
- pulumi_docker/service_config.py +31 -26
- pulumi_docker/tag.py +5 -0
- pulumi_docker/volume.py +50 -45
- {pulumi_docker-4.6.0b4.dist-info → pulumi_docker-4.6.2.dist-info}/METADATA +7 -6
- pulumi_docker-4.6.2.dist-info/RECORD +32 -0
- {pulumi_docker-4.6.0b4.dist-info → pulumi_docker-4.6.2.dist-info}/WHEEL +1 -1
- pulumi_docker/buildx/__init__.py +0 -12
- pulumi_docker/buildx/_enums.py +0 -84
- pulumi_docker/buildx/_inputs.py +0 -2672
- pulumi_docker/buildx/image.py +0 -1798
- pulumi_docker/buildx/index.py +0 -352
- pulumi_docker/buildx/outputs.py +0 -2399
- pulumi_docker-4.6.0b4.dist-info/RECORD +0 -38
- {pulumi_docker-4.6.0b4.dist-info → pulumi_docker-4.6.2.dist-info}/top_level.txt +0 -0
pulumi_docker/_utilities.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import asyncio
|
|
7
|
+
import functools
|
|
7
8
|
import importlib.metadata
|
|
8
9
|
import importlib.util
|
|
9
10
|
import inspect
|
|
@@ -11,14 +12,19 @@ import json
|
|
|
11
12
|
import os
|
|
12
13
|
import sys
|
|
13
14
|
import typing
|
|
15
|
+
import warnings
|
|
16
|
+
import base64
|
|
14
17
|
|
|
15
18
|
import pulumi
|
|
16
19
|
import pulumi.runtime
|
|
17
20
|
from pulumi.runtime.sync_await import _sync_await
|
|
21
|
+
from pulumi.runtime.proto import resource_pb2
|
|
18
22
|
|
|
19
23
|
from semver import VersionInfo as SemverVersion
|
|
20
24
|
from parver import Version as PEP440Version
|
|
21
25
|
|
|
26
|
+
C = typing.TypeVar("C", bound=typing.Callable)
|
|
27
|
+
|
|
22
28
|
|
|
23
29
|
def get_env(*args):
|
|
24
30
|
for v in args:
|
|
@@ -83,12 +89,16 @@ def _get_semver_version():
|
|
|
83
89
|
elif pep440_version.pre_tag == 'rc':
|
|
84
90
|
prerelease = f"rc.{pep440_version.pre}"
|
|
85
91
|
elif pep440_version.dev is not None:
|
|
92
|
+
# PEP440 has explicit support for dev builds, while semver encodes them as "prerelease" versions. To bridge
|
|
93
|
+
# between the two, we convert our dev build version into a prerelease tag. This matches what all of our other
|
|
94
|
+
# packages do when constructing their own semver string.
|
|
86
95
|
prerelease = f"dev.{pep440_version.dev}"
|
|
96
|
+
elif pep440_version.local is not None:
|
|
97
|
+
# PEP440 only allows a small set of prerelease tags, so when converting an arbitrary prerelease,
|
|
98
|
+
# PypiVersion in /pkg/codegen/python/utilities.go converts it to a local version. Therefore, we need to
|
|
99
|
+
# do the reverse conversion here and set the local version as the prerelease tag.
|
|
100
|
+
prerelease = pep440_version.local
|
|
87
101
|
|
|
88
|
-
# The only significant difference between PEP440 and semver as it pertains to us is that PEP440 has explicit support
|
|
89
|
-
# for dev builds, while semver encodes them as "prerelease" versions. In order to bridge between the two, we convert
|
|
90
|
-
# our dev build version into a prerelease tag. This matches what all of our other packages do when constructing
|
|
91
|
-
# their own semver string.
|
|
92
102
|
return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
|
|
93
103
|
|
|
94
104
|
|
|
@@ -96,10 +106,6 @@ def _get_semver_version():
|
|
|
96
106
|
_version = _get_semver_version()
|
|
97
107
|
_version_str = str(_version)
|
|
98
108
|
|
|
99
|
-
|
|
100
|
-
def get_version():
|
|
101
|
-
return _version_str
|
|
102
|
-
|
|
103
109
|
def get_resource_opts_defaults() -> pulumi.ResourceOptions:
|
|
104
110
|
return pulumi.ResourceOptions(
|
|
105
111
|
version=get_version(),
|
|
@@ -262,7 +268,7 @@ def call_plain(
|
|
|
262
268
|
output = pulumi.runtime.call(tok, props, res, typ)
|
|
263
269
|
|
|
264
270
|
# Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
265
|
-
result, known, secret, _ = _sync_await(asyncio.
|
|
271
|
+
result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
|
|
266
272
|
|
|
267
273
|
problem = None
|
|
268
274
|
if not known:
|
|
@@ -287,5 +293,39 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
|
|
|
287
293
|
await o._resources,
|
|
288
294
|
)
|
|
289
295
|
|
|
296
|
+
|
|
297
|
+
# This is included to provide an upgrade path for users who are using a version
|
|
298
|
+
# of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
|
|
299
|
+
def deprecated(message: str) -> typing.Callable[[C], C]:
|
|
300
|
+
"""
|
|
301
|
+
Decorator to indicate a function is deprecated.
|
|
302
|
+
|
|
303
|
+
As well as inserting appropriate statements to indicate that the function is
|
|
304
|
+
deprecated, this decorator also tags the function with a special attribute
|
|
305
|
+
so that Pulumi code can detect that it is deprecated and react appropriately
|
|
306
|
+
in certain situations.
|
|
307
|
+
|
|
308
|
+
message is the deprecation message that should be printed if the function is called.
|
|
309
|
+
"""
|
|
310
|
+
|
|
311
|
+
def decorator(fn: C) -> C:
|
|
312
|
+
if not callable(fn):
|
|
313
|
+
raise TypeError("Expected fn to be callable")
|
|
314
|
+
|
|
315
|
+
@functools.wraps(fn)
|
|
316
|
+
def deprecated_fn(*args, **kwargs):
|
|
317
|
+
warnings.warn(message)
|
|
318
|
+
pulumi.warn(f"{fn.__name__} is deprecated: {message}")
|
|
319
|
+
|
|
320
|
+
return fn(*args, **kwargs)
|
|
321
|
+
|
|
322
|
+
deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
|
|
323
|
+
return typing.cast(C, deprecated_fn)
|
|
324
|
+
|
|
325
|
+
return decorator
|
|
326
|
+
|
|
290
327
|
def get_plugin_download_url():
|
|
291
328
|
return None
|
|
329
|
+
|
|
330
|
+
def get_version():
|
|
331
|
+
return _version_str
|
|
@@ -4,43 +4,46 @@
|
|
|
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
|
|
|
13
18
|
caMaterial: Optional[str]
|
|
14
19
|
"""
|
|
15
|
-
PEM-encoded content of Docker host CA certificate
|
|
20
|
+
PEM-encoded content of Docker host CA certificate
|
|
16
21
|
"""
|
|
17
22
|
|
|
18
23
|
certMaterial: Optional[str]
|
|
19
24
|
"""
|
|
20
|
-
PEM-encoded content of Docker client certificate
|
|
25
|
+
PEM-encoded content of Docker client certificate
|
|
21
26
|
"""
|
|
22
27
|
|
|
23
28
|
certPath: Optional[str]
|
|
24
29
|
"""
|
|
25
|
-
Path to
|
|
26
|
-
files.
|
|
30
|
+
Path to directory with Docker TLS config
|
|
27
31
|
"""
|
|
28
32
|
|
|
29
33
|
host: Optional[str]
|
|
30
34
|
"""
|
|
31
|
-
The Docker daemon
|
|
35
|
+
The Docker daemon address
|
|
32
36
|
"""
|
|
33
37
|
|
|
34
38
|
keyMaterial: Optional[str]
|
|
35
39
|
"""
|
|
36
|
-
PEM-encoded content of Docker client private key
|
|
40
|
+
PEM-encoded content of Docker client private key
|
|
37
41
|
"""
|
|
38
42
|
|
|
39
43
|
registryAuth: Optional[str]
|
|
40
44
|
|
|
41
45
|
sshOpts: Optional[str]
|
|
42
46
|
"""
|
|
43
|
-
Additional SSH option flags to be appended when using `ssh://` protocol
|
|
44
|
-
`buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
|
|
47
|
+
Additional SSH option flags to be appended when using `ssh://` protocol
|
|
45
48
|
"""
|
|
46
49
|
|
pulumi_docker/config/outputs.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__ = [
|
|
@@ -23,7 +28,7 @@ class RegistryAuth(dict):
|
|
|
23
28
|
password: Optional[str] = None,
|
|
24
29
|
username: Optional[str] = None):
|
|
25
30
|
"""
|
|
26
|
-
:param str address: Address of the registry
|
|
31
|
+
:param str address: Address of the registry
|
|
27
32
|
:param str config_file: Path to docker json file for registry auth. Defaults to `~/.docker/config.json`. If `DOCKER_CONFIG` is set, the value of `DOCKER_CONFIG` is used as the path. `config_file` has predencen over all other options.
|
|
28
33
|
:param str config_file_content: Plain content of the docker json file for registry auth. `config_file_content` has precedence over username/password.
|
|
29
34
|
:param str password: Password for the registry. Defaults to `DOCKER_REGISTRY_PASS` env variable if set.
|
|
@@ -45,7 +50,7 @@ class RegistryAuth(dict):
|
|
|
45
50
|
@pulumi.getter
|
|
46
51
|
def address(self) -> str:
|
|
47
52
|
"""
|
|
48
|
-
Address of the registry
|
|
53
|
+
Address of the registry
|
|
49
54
|
"""
|
|
50
55
|
return pulumi.get(self, "address")
|
|
51
56
|
|
pulumi_docker/config/vars.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
|
|
|
@@ -19,36 +24,35 @@ class _ExportableConfig(types.ModuleType):
|
|
|
19
24
|
@property
|
|
20
25
|
def ca_material(self) -> Optional[str]:
|
|
21
26
|
"""
|
|
22
|
-
PEM-encoded content of Docker host CA certificate
|
|
27
|
+
PEM-encoded content of Docker host CA certificate
|
|
23
28
|
"""
|
|
24
29
|
return __config__.get('caMaterial')
|
|
25
30
|
|
|
26
31
|
@property
|
|
27
32
|
def cert_material(self) -> Optional[str]:
|
|
28
33
|
"""
|
|
29
|
-
PEM-encoded content of Docker client certificate
|
|
34
|
+
PEM-encoded content of Docker client certificate
|
|
30
35
|
"""
|
|
31
36
|
return __config__.get('certMaterial')
|
|
32
37
|
|
|
33
38
|
@property
|
|
34
39
|
def cert_path(self) -> Optional[str]:
|
|
35
40
|
"""
|
|
36
|
-
Path to
|
|
37
|
-
files.
|
|
41
|
+
Path to directory with Docker TLS config
|
|
38
42
|
"""
|
|
39
43
|
return __config__.get('certPath')
|
|
40
44
|
|
|
41
45
|
@property
|
|
42
46
|
def host(self) -> Optional[str]:
|
|
43
47
|
"""
|
|
44
|
-
The Docker daemon
|
|
48
|
+
The Docker daemon address
|
|
45
49
|
"""
|
|
46
50
|
return __config__.get('host') or _utilities.get_env('DOCKER_HOST')
|
|
47
51
|
|
|
48
52
|
@property
|
|
49
53
|
def key_material(self) -> Optional[str]:
|
|
50
54
|
"""
|
|
51
|
-
PEM-encoded content of Docker client private key
|
|
55
|
+
PEM-encoded content of Docker client private key
|
|
52
56
|
"""
|
|
53
57
|
return __config__.get('keyMaterial')
|
|
54
58
|
|
|
@@ -59,8 +63,7 @@ class _ExportableConfig(types.ModuleType):
|
|
|
59
63
|
@property
|
|
60
64
|
def ssh_opts(self) -> Optional[str]:
|
|
61
65
|
"""
|
|
62
|
-
Additional SSH option flags to be appended when using `ssh://` protocol
|
|
63
|
-
`buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
|
|
66
|
+
Additional SSH option flags to be appended when using `ssh://` protocol
|
|
64
67
|
"""
|
|
65
68
|
return __config__.get('sshOpts')
|
|
66
69
|
|