pulumi-docker 4.7.0a1705628423__py3-none-any.whl → 4.7.0a1736849606__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/_inputs.py +1583 -34
- pulumi_docker/_utilities.py +43 -7
- pulumi_docker/config/__init__.pyi +5 -0
- pulumi_docker/config/outputs.py +27 -0
- pulumi_docker/config/vars.py +5 -0
- pulumi_docker/container.py +202 -181
- 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 +73 -52
- pulumi_docker/network.py +95 -46
- pulumi_docker/outputs.py +95 -34
- pulumi_docker/plugin.py +19 -46
- pulumi_docker/provider.py +7 -2
- 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 +16 -7
- pulumi_docker/service.py +127 -82
- pulumi_docker/service_config.py +55 -10
- pulumi_docker/tag.py +5 -0
- pulumi_docker/volume.py +76 -27
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/METADATA +7 -6
- pulumi_docker-4.7.0a1736849606.dist-info/RECORD +32 -0
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/WHEEL +1 -1
- pulumi_docker-4.7.0a1705628423.dist-info/RECORD +0 -32
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/top_level.txt +0 -0
pulumi_docker/_utilities.py
CHANGED
|
@@ -4,21 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import asyncio
|
|
7
|
+
import functools
|
|
8
|
+
import importlib.metadata
|
|
7
9
|
import importlib.util
|
|
8
10
|
import inspect
|
|
9
11
|
import json
|
|
10
12
|
import os
|
|
11
|
-
import pkg_resources
|
|
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:
|
|
@@ -72,7 +78,7 @@ def _get_semver_version():
|
|
|
72
78
|
# to receive a valid semver string when receiving requests from the language host, so it's our
|
|
73
79
|
# responsibility as the library to convert our own PEP440 version into a valid semver string.
|
|
74
80
|
|
|
75
|
-
pep440_version_string =
|
|
81
|
+
pep440_version_string = importlib.metadata.version(root_package)
|
|
76
82
|
pep440_version = PEP440Version.parse(pep440_version_string)
|
|
77
83
|
(major, minor, patch) = pep440_version.release
|
|
78
84
|
prerelease = None
|
|
@@ -96,10 +102,6 @@ def _get_semver_version():
|
|
|
96
102
|
_version = _get_semver_version()
|
|
97
103
|
_version_str = str(_version)
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
def get_version():
|
|
101
|
-
return _version_str
|
|
102
|
-
|
|
103
105
|
def get_resource_opts_defaults() -> pulumi.ResourceOptions:
|
|
104
106
|
return pulumi.ResourceOptions(
|
|
105
107
|
version=get_version(),
|
|
@@ -262,7 +264,7 @@ def call_plain(
|
|
|
262
264
|
output = pulumi.runtime.call(tok, props, res, typ)
|
|
263
265
|
|
|
264
266
|
# Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
265
|
-
result, known, secret, _ = _sync_await(asyncio.
|
|
267
|
+
result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
|
|
266
268
|
|
|
267
269
|
problem = None
|
|
268
270
|
if not known:
|
|
@@ -287,5 +289,39 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
|
|
|
287
289
|
await o._resources,
|
|
288
290
|
)
|
|
289
291
|
|
|
292
|
+
|
|
293
|
+
# This is included to provide an upgrade path for users who are using a version
|
|
294
|
+
# of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
|
|
295
|
+
def deprecated(message: str) -> typing.Callable[[C], C]:
|
|
296
|
+
"""
|
|
297
|
+
Decorator to indicate a function is deprecated.
|
|
298
|
+
|
|
299
|
+
As well as inserting appropriate statements to indicate that the function is
|
|
300
|
+
deprecated, this decorator also tags the function with a special attribute
|
|
301
|
+
so that Pulumi code can detect that it is deprecated and react appropriately
|
|
302
|
+
in certain situations.
|
|
303
|
+
|
|
304
|
+
message is the deprecation message that should be printed if the function is called.
|
|
305
|
+
"""
|
|
306
|
+
|
|
307
|
+
def decorator(fn: C) -> C:
|
|
308
|
+
if not callable(fn):
|
|
309
|
+
raise TypeError("Expected fn to be callable")
|
|
310
|
+
|
|
311
|
+
@functools.wraps(fn)
|
|
312
|
+
def deprecated_fn(*args, **kwargs):
|
|
313
|
+
warnings.warn(message)
|
|
314
|
+
pulumi.warn(f"{fn.__name__} is deprecated: {message}")
|
|
315
|
+
|
|
316
|
+
return fn(*args, **kwargs)
|
|
317
|
+
|
|
318
|
+
deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
|
|
319
|
+
return typing.cast(C, deprecated_fn)
|
|
320
|
+
|
|
321
|
+
return decorator
|
|
322
|
+
|
|
290
323
|
def get_plugin_download_url():
|
|
291
324
|
return None
|
|
325
|
+
|
|
326
|
+
def get_version():
|
|
327
|
+
return _version_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
|
from . import outputs
|
|
12
17
|
|
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__ = [
|
|
@@ -22,6 +27,13 @@ class RegistryAuth(dict):
|
|
|
22
27
|
config_file_content: Optional[str] = None,
|
|
23
28
|
password: Optional[str] = None,
|
|
24
29
|
username: Optional[str] = None):
|
|
30
|
+
"""
|
|
31
|
+
:param str address: Address of the registry
|
|
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.
|
|
33
|
+
:param str config_file_content: Plain content of the docker json file for registry auth. `config_file_content` has precedence over username/password.
|
|
34
|
+
:param str password: Password for the registry. Defaults to `DOCKER_REGISTRY_PASS` env variable if set.
|
|
35
|
+
:param str username: Username for the registry. Defaults to `DOCKER_REGISTRY_USER` env variable if set.
|
|
36
|
+
"""
|
|
25
37
|
pulumi.set(__self__, "address", address)
|
|
26
38
|
if auth_disabled is not None:
|
|
27
39
|
pulumi.set(__self__, "auth_disabled", auth_disabled)
|
|
@@ -37,6 +49,9 @@ class RegistryAuth(dict):
|
|
|
37
49
|
@property
|
|
38
50
|
@pulumi.getter
|
|
39
51
|
def address(self) -> str:
|
|
52
|
+
"""
|
|
53
|
+
Address of the registry
|
|
54
|
+
"""
|
|
40
55
|
return pulumi.get(self, "address")
|
|
41
56
|
|
|
42
57
|
@property
|
|
@@ -47,21 +62,33 @@ class RegistryAuth(dict):
|
|
|
47
62
|
@property
|
|
48
63
|
@pulumi.getter(name="configFile")
|
|
49
64
|
def config_file(self) -> Optional[str]:
|
|
65
|
+
"""
|
|
66
|
+
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.
|
|
67
|
+
"""
|
|
50
68
|
return pulumi.get(self, "config_file")
|
|
51
69
|
|
|
52
70
|
@property
|
|
53
71
|
@pulumi.getter(name="configFileContent")
|
|
54
72
|
def config_file_content(self) -> Optional[str]:
|
|
73
|
+
"""
|
|
74
|
+
Plain content of the docker json file for registry auth. `config_file_content` has precedence over username/password.
|
|
75
|
+
"""
|
|
55
76
|
return pulumi.get(self, "config_file_content")
|
|
56
77
|
|
|
57
78
|
@property
|
|
58
79
|
@pulumi.getter
|
|
59
80
|
def password(self) -> Optional[str]:
|
|
81
|
+
"""
|
|
82
|
+
Password for the registry. Defaults to `DOCKER_REGISTRY_PASS` env variable if set.
|
|
83
|
+
"""
|
|
60
84
|
return pulumi.get(self, "password")
|
|
61
85
|
|
|
62
86
|
@property
|
|
63
87
|
@pulumi.getter
|
|
64
88
|
def username(self) -> Optional[str]:
|
|
89
|
+
"""
|
|
90
|
+
Username for the registry. Defaults to `DOCKER_REGISTRY_USER` env variable if set.
|
|
91
|
+
"""
|
|
65
92
|
return pulumi.get(self, "username")
|
|
66
93
|
|
|
67
94
|
|
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
|
|