pulumi-external 0.0.4a1709212326__py3-none-any.whl → 0.1.0a1736832949__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-external might be problematic. Click here for more details.
- pulumi_external/_utilities.py +41 -5
- pulumi_external/get_external.py +18 -5
- pulumi_external/provider.py +5 -0
- pulumi_external/pulumi-plugin.json +2 -1
- {pulumi_external-0.0.4a1709212326.dist-info → pulumi_external-0.1.0a1736832949.dist-info}/METADATA +7 -6
- pulumi_external-0.1.0a1736832949.dist-info/RECORD +10 -0
- {pulumi_external-0.0.4a1709212326.dist-info → pulumi_external-0.1.0a1736832949.dist-info}/WHEEL +1 -1
- pulumi_external-0.0.4a1709212326.dist-info/RECORD +0 -10
- {pulumi_external-0.0.4a1709212326.dist-info → pulumi_external-0.1.0a1736832949.dist-info}/top_level.txt +0 -0
pulumi_external/_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:
|
|
@@ -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
|
pulumi_external/get_external.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__ = [
|
|
@@ -112,17 +117,25 @@ def get_external(programs: Optional[Sequence[str]] = None,
|
|
|
112
117
|
query=pulumi.get(__ret__, 'query'),
|
|
113
118
|
result=pulumi.get(__ret__, 'result'),
|
|
114
119
|
working_dir=pulumi.get(__ret__, 'working_dir'))
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
@_utilities.lift_output_func(get_external)
|
|
118
120
|
def get_external_output(programs: Optional[pulumi.Input[Sequence[str]]] = None,
|
|
119
121
|
query: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
|
|
120
122
|
working_dir: Optional[pulumi.Input[Optional[str]]] = None,
|
|
121
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetExternalResult]:
|
|
123
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetExternalResult]:
|
|
122
124
|
"""
|
|
123
125
|
Use this data source to access information about an existing resource.
|
|
124
126
|
|
|
125
127
|
:param Mapping[str, str] query: A map of string values to pass to the external program as the query arguments. If not supplied, the program will receive an empty object as its input.
|
|
126
128
|
:param str working_dir: Working directory of the program. If not supplied, the program will run in the current directory.
|
|
127
129
|
"""
|
|
128
|
-
|
|
130
|
+
__args__ = dict()
|
|
131
|
+
__args__['programs'] = programs
|
|
132
|
+
__args__['query'] = query
|
|
133
|
+
__args__['workingDir'] = working_dir
|
|
134
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
135
|
+
__ret__ = pulumi.runtime.invoke_output('external:index/getExternal:getExternal', __args__, opts=opts, typ=GetExternalResult)
|
|
136
|
+
return __ret__.apply(lambda __response__: GetExternalResult(
|
|
137
|
+
id=pulumi.get(__response__, 'id'),
|
|
138
|
+
programs=pulumi.get(__response__, 'programs'),
|
|
139
|
+
query=pulumi.get(__response__, 'query'),
|
|
140
|
+
result=pulumi.get(__response__, 'result'),
|
|
141
|
+
working_dir=pulumi.get(__response__, 'working_dir')))
|
pulumi_external/provider.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__ = ['ProviderArgs', 'Provider']
|
{pulumi_external-0.0.4a1709212326.dist-info → pulumi_external-0.1.0a1736832949.dist-info}/METADATA
RENAMED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pulumi_external
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.0a1736832949
|
|
4
4
|
Summary: A Pulumi package for creating and managing External cloud resources.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://www.pulumi.com/
|
|
7
7
|
Project-URL: Repository, https://github.com/pulumi/pulumi-external
|
|
8
8
|
Keywords: pulumi,category/cloud
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
|
-
Requires-Dist: parver
|
|
12
|
-
Requires-Dist: pulumi
|
|
13
|
-
Requires-Dist: semver
|
|
11
|
+
Requires-Dist: parver>=0.2.1
|
|
12
|
+
Requires-Dist: pulumi<4.0.0,>=3.142.0
|
|
13
|
+
Requires-Dist: semver>=2.8.1
|
|
14
|
+
Requires-Dist: typing-extensions>=4.11; python_version < "3.11"
|
|
14
15
|
|
|
15
16
|
[](https://github.com/pulumi/pulumi-external/actions)
|
|
16
17
|
[](https://www.npmjs.com/package/@pulumi/external)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pulumi_external/__init__.py,sha256=DrAL3Yf-KY1-VuZaeT2RmZOoNZXHY54m4Ne7r8B3T_s,527
|
|
2
|
+
pulumi_external/_utilities.py,sha256=-gxwnD6__OYdSf8jJgJijNuu-UHUwi5pJ1H7-eIHDhg,10504
|
|
3
|
+
pulumi_external/get_external.py,sha256=lyK-pAyZt0w3c4SWTOdoUmw8nu-EE0wOoqwbZJESuO8,5921
|
|
4
|
+
pulumi_external/provider.py,sha256=5EkQtoA2w8JYdEQI2SFwLNQvjxqRlO6f_y5_dXC7vFU,3600
|
|
5
|
+
pulumi_external/pulumi-plugin.json,sha256=ZSsVz59P2K7SAJOvo8Zi1X1YJJsA6EYOB2cokv7VcW0,84
|
|
6
|
+
pulumi_external/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
pulumi_external-0.1.0a1736832949.dist-info/METADATA,sha256=an-O0nwOJSTuMmHgqqQ0rBbvwqJPoRSbUfpqPCNmxiE,2921
|
|
8
|
+
pulumi_external-0.1.0a1736832949.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
pulumi_external-0.1.0a1736832949.dist-info/top_level.txt,sha256=t7hgnv-OP81bfORFmxEYvLRitrdZnGX0NJZDGTto33U,16
|
|
10
|
+
pulumi_external-0.1.0a1736832949.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pulumi_external/__init__.py,sha256=DrAL3Yf-KY1-VuZaeT2RmZOoNZXHY54m4Ne7r8B3T_s,527
|
|
2
|
-
pulumi_external/_utilities.py,sha256=b6gJn0IIeM1t6Q7EVjqw3yhuGyP-uENQhtL5yp7aHR8,9248
|
|
3
|
-
pulumi_external/get_external.py,sha256=Dw4vL_YC_FiljG9I1PGKUj7l0NCCrcHX3yiWh-ImosQ,5093
|
|
4
|
-
pulumi_external/provider.py,sha256=tMoFbm79dAe1ygKHD_VZYt1VlAoCucOxlIeAUu3GA4A,3426
|
|
5
|
-
pulumi_external/pulumi-plugin.json,sha256=EI0xX5Vos1_TNrEaWBK-UTItmGhGlp0Vgg9hFL__wlY,45
|
|
6
|
-
pulumi_external/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
pulumi_external-0.0.4a1709212326.dist-info/METADATA,sha256=DwnmpcQzeJVgCtNBc0P5J8TdqRkovpaygv4d7kexmKw,2858
|
|
8
|
-
pulumi_external-0.0.4a1709212326.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
9
|
-
pulumi_external-0.0.4a1709212326.dist-info/top_level.txt,sha256=t7hgnv-OP81bfORFmxEYvLRitrdZnGX0NJZDGTto33U,16
|
|
10
|
-
pulumi_external-0.0.4a1709212326.dist-info/RECORD,,
|
|
File without changes
|