pulumi-external 0.0.2a1696529772__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/__init__.py +24 -0
- pulumi_external/_utilities.py +250 -0
- pulumi_external/get_external.py +128 -0
- pulumi_external/provider.py +88 -0
- pulumi_external/pulumi-plugin.json +4 -0
- pulumi_external/py.typed +0 -0
- pulumi_external-0.0.2a1696529772.dist-info/METADATA +80 -0
- pulumi_external-0.0.2a1696529772.dist-info/RECORD +10 -0
- pulumi_external-0.0.2a1696529772.dist-info/WHEEL +5 -0
- pulumi_external-0.0.2a1696529772.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
from . import _utilities
|
|
6
|
+
import typing
|
|
7
|
+
# Export this package's modules as members:
|
|
8
|
+
from .get_external import *
|
|
9
|
+
from .provider import *
|
|
10
|
+
_utilities.register(
|
|
11
|
+
resource_modules="""
|
|
12
|
+
[]
|
|
13
|
+
""",
|
|
14
|
+
resource_packages="""
|
|
15
|
+
[
|
|
16
|
+
{
|
|
17
|
+
"pkg": "external",
|
|
18
|
+
"token": "pulumi:providers:external",
|
|
19
|
+
"fqn": "pulumi_external",
|
|
20
|
+
"class": "Provider"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
"""
|
|
24
|
+
)
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import importlib.util
|
|
7
|
+
import inspect
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import pkg_resources
|
|
11
|
+
import sys
|
|
12
|
+
import typing
|
|
13
|
+
|
|
14
|
+
import pulumi
|
|
15
|
+
import pulumi.runtime
|
|
16
|
+
|
|
17
|
+
from semver import VersionInfo as SemverVersion
|
|
18
|
+
from parver import Version as PEP440Version
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def get_env(*args):
|
|
22
|
+
for v in args:
|
|
23
|
+
value = os.getenv(v)
|
|
24
|
+
if value is not None:
|
|
25
|
+
return value
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_env_bool(*args):
|
|
30
|
+
str = get_env(*args)
|
|
31
|
+
if str is not None:
|
|
32
|
+
# NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
33
|
+
# Terraform uses internally when parsing boolean values.
|
|
34
|
+
if str in ["1", "t", "T", "true", "TRUE", "True"]:
|
|
35
|
+
return True
|
|
36
|
+
if str in ["0", "f", "F", "false", "FALSE", "False"]:
|
|
37
|
+
return False
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def get_env_int(*args):
|
|
42
|
+
str = get_env(*args)
|
|
43
|
+
if str is not None:
|
|
44
|
+
try:
|
|
45
|
+
return int(str)
|
|
46
|
+
except:
|
|
47
|
+
return None
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def get_env_float(*args):
|
|
52
|
+
str = get_env(*args)
|
|
53
|
+
if str is not None:
|
|
54
|
+
try:
|
|
55
|
+
return float(str)
|
|
56
|
+
except:
|
|
57
|
+
return None
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _get_semver_version():
|
|
62
|
+
# __name__ is set to the fully-qualified name of the current module, In our case, it will be
|
|
63
|
+
# <some module>._utilities. <some module> is the module we want to query the version for.
|
|
64
|
+
root_package, *rest = __name__.split('.')
|
|
65
|
+
|
|
66
|
+
# pkg_resources uses setuptools to inspect the set of installed packages. We use it here to ask
|
|
67
|
+
# for the currently installed version of the root package (i.e. us) and get its version.
|
|
68
|
+
|
|
69
|
+
# Unfortunately, PEP440 and semver differ slightly in incompatible ways. The Pulumi engine expects
|
|
70
|
+
# to receive a valid semver string when receiving requests from the language host, so it's our
|
|
71
|
+
# responsibility as the library to convert our own PEP440 version into a valid semver string.
|
|
72
|
+
|
|
73
|
+
pep440_version_string = pkg_resources.require(root_package)[0].version
|
|
74
|
+
pep440_version = PEP440Version.parse(pep440_version_string)
|
|
75
|
+
(major, minor, patch) = pep440_version.release
|
|
76
|
+
prerelease = None
|
|
77
|
+
if pep440_version.pre_tag == 'a':
|
|
78
|
+
prerelease = f"alpha.{pep440_version.pre}"
|
|
79
|
+
elif pep440_version.pre_tag == 'b':
|
|
80
|
+
prerelease = f"beta.{pep440_version.pre}"
|
|
81
|
+
elif pep440_version.pre_tag == 'rc':
|
|
82
|
+
prerelease = f"rc.{pep440_version.pre}"
|
|
83
|
+
elif pep440_version.dev is not None:
|
|
84
|
+
prerelease = f"dev.{pep440_version.dev}"
|
|
85
|
+
|
|
86
|
+
# The only significant difference between PEP440 and semver as it pertains to us is that PEP440 has explicit support
|
|
87
|
+
# for dev builds, while semver encodes them as "prerelease" versions. In order to bridge between the two, we convert
|
|
88
|
+
# our dev build version into a prerelease tag. This matches what all of our other packages do when constructing
|
|
89
|
+
# their own semver string.
|
|
90
|
+
return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Determine the version once and cache the value, which measurably improves program performance.
|
|
94
|
+
_version = _get_semver_version()
|
|
95
|
+
_version_str = str(_version)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def get_version():
|
|
99
|
+
return _version_str
|
|
100
|
+
|
|
101
|
+
def get_resource_opts_defaults() -> pulumi.ResourceOptions:
|
|
102
|
+
return pulumi.ResourceOptions(
|
|
103
|
+
version=get_version(),
|
|
104
|
+
plugin_download_url=get_plugin_download_url(),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
def get_invoke_opts_defaults() -> pulumi.InvokeOptions:
|
|
108
|
+
return pulumi.InvokeOptions(
|
|
109
|
+
version=get_version(),
|
|
110
|
+
plugin_download_url=get_plugin_download_url(),
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs):
|
|
114
|
+
"""
|
|
115
|
+
Return the resource args and options given the *args and **kwargs of a resource's
|
|
116
|
+
__init__ method.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
resource_args, opts = None, None
|
|
120
|
+
|
|
121
|
+
# If the first item is the resource args type, save it and remove it from the args list.
|
|
122
|
+
if args and isinstance(args[0], resource_args_type):
|
|
123
|
+
resource_args, args = args[0], args[1:]
|
|
124
|
+
|
|
125
|
+
# Now look at the first item in the args list again.
|
|
126
|
+
# If the first item is the resource options class, save it.
|
|
127
|
+
if args and isinstance(args[0], resource_options_type):
|
|
128
|
+
opts = args[0]
|
|
129
|
+
|
|
130
|
+
# If resource_args is None, see if "args" is in kwargs, and, if so, if it's typed as the
|
|
131
|
+
# the resource args type.
|
|
132
|
+
if resource_args is None:
|
|
133
|
+
a = kwargs.get("args")
|
|
134
|
+
if isinstance(a, resource_args_type):
|
|
135
|
+
resource_args = a
|
|
136
|
+
|
|
137
|
+
# If opts is None, look it up in kwargs.
|
|
138
|
+
if opts is None:
|
|
139
|
+
opts = kwargs.get("opts")
|
|
140
|
+
|
|
141
|
+
return resource_args, opts
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# Temporary: just use pulumi._utils.lazy_import once everyone upgrades.
|
|
145
|
+
def lazy_import(fullname):
|
|
146
|
+
|
|
147
|
+
import pulumi._utils as u
|
|
148
|
+
f = getattr(u, 'lazy_import', None)
|
|
149
|
+
if f is None:
|
|
150
|
+
f = _lazy_import_temp
|
|
151
|
+
|
|
152
|
+
return f(fullname)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
# Copied from pulumi._utils.lazy_import, see comments there.
|
|
156
|
+
def _lazy_import_temp(fullname):
|
|
157
|
+
m = sys.modules.get(fullname, None)
|
|
158
|
+
if m is not None:
|
|
159
|
+
return m
|
|
160
|
+
|
|
161
|
+
spec = importlib.util.find_spec(fullname)
|
|
162
|
+
|
|
163
|
+
m = sys.modules.get(fullname, None)
|
|
164
|
+
if m is not None:
|
|
165
|
+
return m
|
|
166
|
+
|
|
167
|
+
loader = importlib.util.LazyLoader(spec.loader)
|
|
168
|
+
spec.loader = loader
|
|
169
|
+
module = importlib.util.module_from_spec(spec)
|
|
170
|
+
|
|
171
|
+
m = sys.modules.get(fullname, None)
|
|
172
|
+
if m is not None:
|
|
173
|
+
return m
|
|
174
|
+
|
|
175
|
+
sys.modules[fullname] = module
|
|
176
|
+
loader.exec_module(module)
|
|
177
|
+
return module
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class Package(pulumi.runtime.ResourcePackage):
|
|
181
|
+
def __init__(self, pkg_info):
|
|
182
|
+
super().__init__()
|
|
183
|
+
self.pkg_info = pkg_info
|
|
184
|
+
|
|
185
|
+
def version(self):
|
|
186
|
+
return _version
|
|
187
|
+
|
|
188
|
+
def construct_provider(self, name: str, typ: str, urn: str) -> pulumi.ProviderResource:
|
|
189
|
+
if typ != self.pkg_info['token']:
|
|
190
|
+
raise Exception(f"unknown provider type {typ}")
|
|
191
|
+
Provider = getattr(lazy_import(self.pkg_info['fqn']), self.pkg_info['class'])
|
|
192
|
+
return Provider(name, pulumi.ResourceOptions(urn=urn))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class Module(pulumi.runtime.ResourceModule):
|
|
196
|
+
def __init__(self, mod_info):
|
|
197
|
+
super().__init__()
|
|
198
|
+
self.mod_info = mod_info
|
|
199
|
+
|
|
200
|
+
def version(self):
|
|
201
|
+
return _version
|
|
202
|
+
|
|
203
|
+
def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
|
|
204
|
+
class_name = self.mod_info['classes'].get(typ, None)
|
|
205
|
+
|
|
206
|
+
if class_name is None:
|
|
207
|
+
raise Exception(f"unknown resource type {typ}")
|
|
208
|
+
|
|
209
|
+
TheClass = getattr(lazy_import(self.mod_info['fqn']), class_name)
|
|
210
|
+
return TheClass(name, pulumi.ResourceOptions(urn=urn))
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def register(resource_modules, resource_packages):
|
|
214
|
+
resource_modules = json.loads(resource_modules)
|
|
215
|
+
resource_packages = json.loads(resource_packages)
|
|
216
|
+
|
|
217
|
+
for pkg_info in resource_packages:
|
|
218
|
+
pulumi.runtime.register_resource_package(pkg_info['pkg'], Package(pkg_info))
|
|
219
|
+
|
|
220
|
+
for mod_info in resource_modules:
|
|
221
|
+
pulumi.runtime.register_resource_module(
|
|
222
|
+
mod_info['pkg'],
|
|
223
|
+
mod_info['mod'],
|
|
224
|
+
Module(mod_info))
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
_F = typing.TypeVar('_F', bound=typing.Callable[..., typing.Any])
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
|
|
231
|
+
"""Decorator internally used on {fn}_output lifted function versions
|
|
232
|
+
to implement them automatically from the un-lifted function."""
|
|
233
|
+
|
|
234
|
+
func_sig = inspect.signature(func)
|
|
235
|
+
|
|
236
|
+
def lifted_func(*args, opts=None, **kwargs):
|
|
237
|
+
bound_args = func_sig.bind(*args, **kwargs)
|
|
238
|
+
# Convert tuple to list, see pulumi/pulumi#8172
|
|
239
|
+
args_list = list(bound_args.args)
|
|
240
|
+
return pulumi.Output.from_input({
|
|
241
|
+
'args': args_list,
|
|
242
|
+
'kwargs': bound_args.kwargs
|
|
243
|
+
}).apply(lambda resolved_args: func(*resolved_args['args'],
|
|
244
|
+
opts=opts,
|
|
245
|
+
**resolved_args['kwargs']))
|
|
246
|
+
|
|
247
|
+
return (lambda _: lifted_func)
|
|
248
|
+
|
|
249
|
+
def get_plugin_download_url():
|
|
250
|
+
return None
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
'GetExternalResult',
|
|
14
|
+
'AwaitableGetExternalResult',
|
|
15
|
+
'get_external',
|
|
16
|
+
'get_external_output',
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
@pulumi.output_type
|
|
20
|
+
class GetExternalResult:
|
|
21
|
+
"""
|
|
22
|
+
A collection of values returned by getExternal.
|
|
23
|
+
"""
|
|
24
|
+
def __init__(__self__, id=None, programs=None, query=None, result=None, working_dir=None):
|
|
25
|
+
if id and not isinstance(id, str):
|
|
26
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
27
|
+
pulumi.set(__self__, "id", id)
|
|
28
|
+
if programs and not isinstance(programs, list):
|
|
29
|
+
raise TypeError("Expected argument 'programs' to be a list")
|
|
30
|
+
pulumi.set(__self__, "programs", programs)
|
|
31
|
+
if query and not isinstance(query, dict):
|
|
32
|
+
raise TypeError("Expected argument 'query' to be a dict")
|
|
33
|
+
pulumi.set(__self__, "query", query)
|
|
34
|
+
if result and not isinstance(result, dict):
|
|
35
|
+
raise TypeError("Expected argument 'result' to be a dict")
|
|
36
|
+
pulumi.set(__self__, "result", result)
|
|
37
|
+
if working_dir and not isinstance(working_dir, str):
|
|
38
|
+
raise TypeError("Expected argument 'working_dir' to be a str")
|
|
39
|
+
pulumi.set(__self__, "working_dir", working_dir)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
@pulumi.getter
|
|
43
|
+
def id(self) -> str:
|
|
44
|
+
"""
|
|
45
|
+
The id of the data source. This will always be set to `-`
|
|
46
|
+
"""
|
|
47
|
+
return pulumi.get(self, "id")
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
@pulumi.getter
|
|
51
|
+
def programs(self) -> Sequence[str]:
|
|
52
|
+
return pulumi.get(self, "programs")
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
@pulumi.getter
|
|
56
|
+
def query(self) -> Optional[Mapping[str, str]]:
|
|
57
|
+
"""
|
|
58
|
+
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.
|
|
59
|
+
"""
|
|
60
|
+
return pulumi.get(self, "query")
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
@pulumi.getter
|
|
64
|
+
def result(self) -> Mapping[str, str]:
|
|
65
|
+
"""
|
|
66
|
+
A map of string values returned from the external program.
|
|
67
|
+
"""
|
|
68
|
+
return pulumi.get(self, "result")
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
@pulumi.getter(name="workingDir")
|
|
72
|
+
def working_dir(self) -> Optional[str]:
|
|
73
|
+
"""
|
|
74
|
+
Working directory of the program. If not supplied, the program will run in the current directory.
|
|
75
|
+
"""
|
|
76
|
+
return pulumi.get(self, "working_dir")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class AwaitableGetExternalResult(GetExternalResult):
|
|
80
|
+
# pylint: disable=using-constant-test
|
|
81
|
+
def __await__(self):
|
|
82
|
+
if False:
|
|
83
|
+
yield self
|
|
84
|
+
return GetExternalResult(
|
|
85
|
+
id=self.id,
|
|
86
|
+
programs=self.programs,
|
|
87
|
+
query=self.query,
|
|
88
|
+
result=self.result,
|
|
89
|
+
working_dir=self.working_dir)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def get_external(programs: Optional[Sequence[str]] = None,
|
|
93
|
+
query: Optional[Mapping[str, str]] = None,
|
|
94
|
+
working_dir: Optional[str] = None,
|
|
95
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetExternalResult:
|
|
96
|
+
"""
|
|
97
|
+
Use this data source to access information about an existing resource.
|
|
98
|
+
|
|
99
|
+
: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.
|
|
100
|
+
:param str working_dir: Working directory of the program. If not supplied, the program will run in the current directory.
|
|
101
|
+
"""
|
|
102
|
+
__args__ = dict()
|
|
103
|
+
__args__['programs'] = programs
|
|
104
|
+
__args__['query'] = query
|
|
105
|
+
__args__['workingDir'] = working_dir
|
|
106
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
107
|
+
__ret__ = pulumi.runtime.invoke('external:index/getExternal:getExternal', __args__, opts=opts, typ=GetExternalResult).value
|
|
108
|
+
|
|
109
|
+
return AwaitableGetExternalResult(
|
|
110
|
+
id=pulumi.get(__ret__, 'id'),
|
|
111
|
+
programs=pulumi.get(__ret__, 'programs'),
|
|
112
|
+
query=pulumi.get(__ret__, 'query'),
|
|
113
|
+
result=pulumi.get(__ret__, 'result'),
|
|
114
|
+
working_dir=pulumi.get(__ret__, 'working_dir'))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@_utilities.lift_output_func(get_external)
|
|
118
|
+
def get_external_output(programs: Optional[pulumi.Input[Sequence[str]]] = None,
|
|
119
|
+
query: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
|
|
120
|
+
working_dir: Optional[pulumi.Input[Optional[str]]] = None,
|
|
121
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetExternalResult]:
|
|
122
|
+
"""
|
|
123
|
+
Use this data source to access information about an existing resource.
|
|
124
|
+
|
|
125
|
+
: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
|
+
:param str working_dir: Working directory of the program. If not supplied, the program will run in the current directory.
|
|
127
|
+
"""
|
|
128
|
+
...
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = ['ProviderArgs', 'Provider']
|
|
13
|
+
|
|
14
|
+
@pulumi.input_type
|
|
15
|
+
class ProviderArgs:
|
|
16
|
+
def __init__(__self__):
|
|
17
|
+
"""
|
|
18
|
+
The set of arguments for constructing a Provider resource.
|
|
19
|
+
"""
|
|
20
|
+
pass
|
|
21
|
+
@staticmethod
|
|
22
|
+
def _configure(
|
|
23
|
+
_setter: Callable[[Any, Any], None],
|
|
24
|
+
opts: Optional[pulumi.ResourceOptions]=None):
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Provider(pulumi.ProviderResource):
|
|
29
|
+
@overload
|
|
30
|
+
def __init__(__self__,
|
|
31
|
+
resource_name: str,
|
|
32
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
33
|
+
__props__=None):
|
|
34
|
+
"""
|
|
35
|
+
The provider type for the external package. By default, resources use package-wide configuration
|
|
36
|
+
settings, however an explicit `Provider` instance may be created and passed during resource
|
|
37
|
+
construction to achieve fine-grained programmatic control over provider settings. See the
|
|
38
|
+
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
39
|
+
|
|
40
|
+
:param str resource_name: The name of the resource.
|
|
41
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
42
|
+
"""
|
|
43
|
+
...
|
|
44
|
+
@overload
|
|
45
|
+
def __init__(__self__,
|
|
46
|
+
resource_name: str,
|
|
47
|
+
args: Optional[ProviderArgs] = None,
|
|
48
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
49
|
+
"""
|
|
50
|
+
The provider type for the external package. By default, resources use package-wide configuration
|
|
51
|
+
settings, however an explicit `Provider` instance may be created and passed during resource
|
|
52
|
+
construction to achieve fine-grained programmatic control over provider settings. See the
|
|
53
|
+
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
54
|
+
|
|
55
|
+
:param str resource_name: The name of the resource.
|
|
56
|
+
:param ProviderArgs args: The arguments to use to populate this resource's properties.
|
|
57
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
58
|
+
"""
|
|
59
|
+
...
|
|
60
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
61
|
+
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
62
|
+
if resource_args is not None:
|
|
63
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
64
|
+
else:
|
|
65
|
+
kwargs = kwargs or {}
|
|
66
|
+
def _setter(key, value):
|
|
67
|
+
kwargs[key] = value
|
|
68
|
+
ProviderArgs._configure(_setter, **kwargs)
|
|
69
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
70
|
+
|
|
71
|
+
def _internal_init(__self__,
|
|
72
|
+
resource_name: str,
|
|
73
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
74
|
+
__props__=None):
|
|
75
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
76
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
77
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
78
|
+
if opts.id is None:
|
|
79
|
+
if __props__ is not None:
|
|
80
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
81
|
+
__props__ = ProviderArgs.__new__(ProviderArgs)
|
|
82
|
+
|
|
83
|
+
super(Provider, __self__).__init__(
|
|
84
|
+
'external',
|
|
85
|
+
resource_name,
|
|
86
|
+
__props__,
|
|
87
|
+
opts)
|
|
88
|
+
|
pulumi_external/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pulumi-external
|
|
3
|
+
Version: 0.0.2a1696529772
|
|
4
|
+
Summary: A Pulumi package for creating and managing External cloud resources.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://www.pulumi.com/
|
|
7
|
+
Project-URL: Repository, https://github.com/pulumi/pulumi-external
|
|
8
|
+
Keywords: pulumi,category/cloud
|
|
9
|
+
Requires-Python: >=3.7
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: parver >=0.2.1
|
|
12
|
+
Requires-Dist: pulumi <4.0.0,>=3.0.0
|
|
13
|
+
Requires-Dist: semver >=2.8.1
|
|
14
|
+
|
|
15
|
+
[](https://github.com/pulumi/pulumi-external/actions)
|
|
16
|
+
[](https://www.npmjs.com/package/@pulumi/external)
|
|
17
|
+
[](https://pypi.org/project/pulumi_external)
|
|
18
|
+
[](https://www.nuget.org/packages/Pulumi.External)
|
|
19
|
+
[](https://pkg.go.dev/github.com/pulumi/pulumi-external/sdk/go)
|
|
20
|
+
[](https://github.com/pulumi/pulumi-external/blob/master/LICENSE)
|
|
21
|
+
|
|
22
|
+
# External Resource Provider
|
|
23
|
+
|
|
24
|
+
This provider is mainly used for ease of converting terraform programs to Pulumi.
|
|
25
|
+
When using standard Pulumi programs, you would not need to use this provider.
|
|
26
|
+
|
|
27
|
+
The External resource provider for Pulumi lets you use External resources in your cloud programs.
|
|
28
|
+
To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
|
|
29
|
+
|
|
30
|
+
## Installing
|
|
31
|
+
|
|
32
|
+
This package is available in many languages in the standard packaging formats.
|
|
33
|
+
|
|
34
|
+
### Node.js (Java/TypeScript)
|
|
35
|
+
|
|
36
|
+
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
37
|
+
|
|
38
|
+
$ npm install @pulumi/external
|
|
39
|
+
|
|
40
|
+
or `yarn`:
|
|
41
|
+
|
|
42
|
+
$ yarn add @pulumi/external
|
|
43
|
+
|
|
44
|
+
### Python
|
|
45
|
+
|
|
46
|
+
To use from Python, install using `pip`:
|
|
47
|
+
|
|
48
|
+
$ pip install pulumi_external
|
|
49
|
+
|
|
50
|
+
### Go
|
|
51
|
+
|
|
52
|
+
To use from Go, use `go get` to grab the latest version of the library:
|
|
53
|
+
|
|
54
|
+
$ go get github.com/pulumi/pulumi-external/sdk
|
|
55
|
+
|
|
56
|
+
### .NET
|
|
57
|
+
|
|
58
|
+
To use from .NET, install using `dotnet add package`:
|
|
59
|
+
|
|
60
|
+
$ dotnet add package Pulumi.External
|
|
61
|
+
|
|
62
|
+
<!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
|
|
63
|
+
<!--
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
The following Pulumi configuration can be used:
|
|
68
|
+
|
|
69
|
+
- `external:token` - (Required) The API token to use with External. When not set, the provider will use the `EXTERNAL_TOKEN` environment variable.
|
|
70
|
+
|
|
71
|
+
-->
|
|
72
|
+
|
|
73
|
+
<!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
|
|
74
|
+
<!--
|
|
75
|
+
|
|
76
|
+
## Reference
|
|
77
|
+
|
|
78
|
+
For further information, please visit [External reference documentation](https://example.com/external).
|
|
79
|
+
|
|
80
|
+
-->
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pulumi_external/__init__.py,sha256=DrAL3Yf-KY1-VuZaeT2RmZOoNZXHY54m4Ne7r8B3T_s,527
|
|
2
|
+
pulumi_external/_utilities.py,sha256=fRvpCIKutW049SlpPUAoouFyjnSSk1J-OY0b8SDzJaE,8081
|
|
3
|
+
pulumi_external/get_external.py,sha256=FYUPqQJJhy0KCgF9QQgMHQPR4QM1Srzi-FSHLBEnnj4,5103
|
|
4
|
+
pulumi_external/provider.py,sha256=r9_Mv-PpAbLHyrLaAjdi28pkJ7b6HCDSh9ZUQZ9Zk-A,3758
|
|
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.2a1696529772.dist-info/METADATA,sha256=3oStTO5lj3T0r2fQJqmqtL2bZXtSCFNgiQEQejmLnm4,2858
|
|
8
|
+
pulumi_external-0.0.2a1696529772.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
9
|
+
pulumi_external-0.0.2a1696529772.dist-info/top_level.txt,sha256=t7hgnv-OP81bfORFmxEYvLRitrdZnGX0NJZDGTto33U,16
|
|
10
|
+
pulumi_external-0.0.2a1696529772.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pulumi_external
|