pulumi-external 0.0.1__tar.gz

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.

@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.1
2
+ Name: pulumi_external
3
+ Version: 0.0.1
4
+ Summary: A Pulumi package for creating and managing External cloud resources.
5
+ Home-page: https://www.pulumi.com/
6
+ License: Apache-2.0
7
+ Project-URL: Repository, https://github.com/pulumi/pulumi-external
8
+ Keywords: pulumi category/cloud
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+
13
+ [![Actions Status](https://github.com/pulumi/pulumi-external/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-external/actions)
14
+ [![NPM version](https://img.shields.io/npm/v/@pulumi/external)](https://www.npmjs.com/package/@pulumi/external)
15
+ [![Python version](https://img.shields.io/pypi/v/pulumi_external)](https://pypi.org/project/pulumi_external)
16
+ [![NuGet version](https://img.shields.io/nuget/v/Pulumi.External)](https://www.nuget.org/packages/Pulumi.External)
17
+ [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-external/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-external/sdk/go)
18
+ [![License](https://img.shields.io/github/license/pulumi/pulumi-external)](https://github.com/pulumi/pulumi-external/blob/master/LICENSE)
19
+
20
+ # External Resource Provider
21
+
22
+ The External resource provider for Pulumi lets you use External resources in your cloud programs.
23
+ To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
24
+
25
+ ## Installing
26
+
27
+ This package is available in many languages in the standard packaging formats.
28
+
29
+ ### Node.js (Java/TypeScript)
30
+
31
+ To use from JavaScript or TypeScript in Node.js, install using either `npm`:
32
+
33
+ $ npm install @pulumi/external
34
+
35
+ or `yarn`:
36
+
37
+ $ yarn add @pulumi/external
38
+
39
+ ### Python
40
+
41
+ To use from Python, install using `pip`:
42
+
43
+ $ pip install pulumi_external
44
+
45
+ ### Go
46
+
47
+ To use from Go, use `go get` to grab the latest version of the library:
48
+
49
+ $ go get github.com/pulumi/pulumi-external/sdk
50
+
51
+ ### .NET
52
+
53
+ To use from .NET, install using `dotnet add package`:
54
+
55
+ $ dotnet add package Pulumi.External
56
+
57
+ <!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
58
+ <!--
59
+
60
+ ## Configuration
61
+
62
+ The following Pulumi configuration can be used:
63
+
64
+ - `external:token` - (Required) The API token to use with External. When not set, the provider will use the `EXTERNAL_TOKEN` environment variable.
65
+
66
+ -->
67
+
68
+ <!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
69
+ <!--
70
+
71
+ ## Reference
72
+
73
+ For further information, please visit [External reference documentation](https://example.com/external).
74
+
75
+ -->
76
+
77
+
@@ -0,0 +1,63 @@
1
+ [![Actions Status](https://github.com/pulumi/pulumi-external/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-external/actions)
2
+ [![NPM version](https://img.shields.io/npm/v/@pulumi/external)](https://www.npmjs.com/package/@pulumi/external)
3
+ [![Python version](https://img.shields.io/pypi/v/pulumi_external)](https://pypi.org/project/pulumi_external)
4
+ [![NuGet version](https://img.shields.io/nuget/v/Pulumi.External)](https://www.nuget.org/packages/Pulumi.External)
5
+ [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-external/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-external/sdk/go)
6
+ [![License](https://img.shields.io/github/license/pulumi/pulumi-external)](https://github.com/pulumi/pulumi-external/blob/master/LICENSE)
7
+
8
+ # External Resource Provider
9
+
10
+ The External resource provider for Pulumi lets you use External resources in your cloud programs.
11
+ To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
12
+
13
+ ## Installing
14
+
15
+ This package is available in many languages in the standard packaging formats.
16
+
17
+ ### Node.js (Java/TypeScript)
18
+
19
+ To use from JavaScript or TypeScript in Node.js, install using either `npm`:
20
+
21
+ $ npm install @pulumi/external
22
+
23
+ or `yarn`:
24
+
25
+ $ yarn add @pulumi/external
26
+
27
+ ### Python
28
+
29
+ To use from Python, install using `pip`:
30
+
31
+ $ pip install pulumi_external
32
+
33
+ ### Go
34
+
35
+ To use from Go, use `go get` to grab the latest version of the library:
36
+
37
+ $ go get github.com/pulumi/pulumi-external/sdk
38
+
39
+ ### .NET
40
+
41
+ To use from .NET, install using `dotnet add package`:
42
+
43
+ $ dotnet add package Pulumi.External
44
+
45
+ <!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
46
+ <!--
47
+
48
+ ## Configuration
49
+
50
+ The following Pulumi configuration can be used:
51
+
52
+ - `external:token` - (Required) The API token to use with External. When not set, the provider will use the `EXTERNAL_TOKEN` environment variable.
53
+
54
+ -->
55
+
56
+ <!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
57
+ <!--
58
+
59
+ ## Reference
60
+
61
+ For further information, please visit [External reference documentation](https://example.com/external).
62
+
63
+ -->
@@ -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, 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=__ret__.id,
111
+ programs=__ret__.programs,
112
+ query=__ret__.query,
113
+ result=__ret__.result,
114
+ working_dir=__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,79 @@
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, 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
+
22
+
23
+ class Provider(pulumi.ProviderResource):
24
+ @overload
25
+ def __init__(__self__,
26
+ resource_name: str,
27
+ opts: Optional[pulumi.ResourceOptions] = None,
28
+ __props__=None):
29
+ """
30
+ The provider type for the external package. By default, resources use package-wide configuration
31
+ settings, however an explicit `Provider` instance may be created and passed during resource
32
+ construction to achieve fine-grained programmatic control over provider settings. See the
33
+ [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
34
+
35
+ :param str resource_name: The name of the resource.
36
+ :param pulumi.ResourceOptions opts: Options for the resource.
37
+ """
38
+ ...
39
+ @overload
40
+ def __init__(__self__,
41
+ resource_name: str,
42
+ args: Optional[ProviderArgs] = None,
43
+ opts: Optional[pulumi.ResourceOptions] = None):
44
+ """
45
+ The provider type for the external package. By default, resources use package-wide configuration
46
+ settings, however an explicit `Provider` instance may be created and passed during resource
47
+ construction to achieve fine-grained programmatic control over provider settings. See the
48
+ [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
49
+
50
+ :param str resource_name: The name of the resource.
51
+ :param ProviderArgs args: The arguments to use to populate this resource's properties.
52
+ :param pulumi.ResourceOptions opts: Options for the resource.
53
+ """
54
+ ...
55
+ def __init__(__self__, resource_name: str, *args, **kwargs):
56
+ resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
57
+ if resource_args is not None:
58
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
59
+ else:
60
+ __self__._internal_init(resource_name, *args, **kwargs)
61
+
62
+ def _internal_init(__self__,
63
+ resource_name: str,
64
+ opts: Optional[pulumi.ResourceOptions] = None,
65
+ __props__=None):
66
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
67
+ if not isinstance(opts, pulumi.ResourceOptions):
68
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
69
+ if opts.id is None:
70
+ if __props__ is not None:
71
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
72
+ __props__ = ProviderArgs.__new__(ProviderArgs)
73
+
74
+ super(Provider, __self__).__init__(
75
+ 'external',
76
+ resource_name,
77
+ __props__,
78
+ opts)
79
+
@@ -0,0 +1,4 @@
1
+ {
2
+ "resource": true,
3
+ "name": "external"
4
+ }
File without changes
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.1
2
+ Name: pulumi-external
3
+ Version: 0.0.1
4
+ Summary: A Pulumi package for creating and managing External cloud resources.
5
+ Home-page: https://www.pulumi.com/
6
+ License: Apache-2.0
7
+ Project-URL: Repository, https://github.com/pulumi/pulumi-external
8
+ Keywords: pulumi category/cloud
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+
13
+ [![Actions Status](https://github.com/pulumi/pulumi-external/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-external/actions)
14
+ [![NPM version](https://img.shields.io/npm/v/@pulumi/external)](https://www.npmjs.com/package/@pulumi/external)
15
+ [![Python version](https://img.shields.io/pypi/v/pulumi_external)](https://pypi.org/project/pulumi_external)
16
+ [![NuGet version](https://img.shields.io/nuget/v/Pulumi.External)](https://www.nuget.org/packages/Pulumi.External)
17
+ [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-external/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-external/sdk/go)
18
+ [![License](https://img.shields.io/github/license/pulumi/pulumi-external)](https://github.com/pulumi/pulumi-external/blob/master/LICENSE)
19
+
20
+ # External Resource Provider
21
+
22
+ The External resource provider for Pulumi lets you use External resources in your cloud programs.
23
+ To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
24
+
25
+ ## Installing
26
+
27
+ This package is available in many languages in the standard packaging formats.
28
+
29
+ ### Node.js (Java/TypeScript)
30
+
31
+ To use from JavaScript or TypeScript in Node.js, install using either `npm`:
32
+
33
+ $ npm install @pulumi/external
34
+
35
+ or `yarn`:
36
+
37
+ $ yarn add @pulumi/external
38
+
39
+ ### Python
40
+
41
+ To use from Python, install using `pip`:
42
+
43
+ $ pip install pulumi_external
44
+
45
+ ### Go
46
+
47
+ To use from Go, use `go get` to grab the latest version of the library:
48
+
49
+ $ go get github.com/pulumi/pulumi-external/sdk
50
+
51
+ ### .NET
52
+
53
+ To use from .NET, install using `dotnet add package`:
54
+
55
+ $ dotnet add package Pulumi.External
56
+
57
+ <!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
58
+ <!--
59
+
60
+ ## Configuration
61
+
62
+ The following Pulumi configuration can be used:
63
+
64
+ - `external:token` - (Required) The API token to use with External. When not set, the provider will use the `EXTERNAL_TOKEN` environment variable.
65
+
66
+ -->
67
+
68
+ <!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
69
+ <!--
70
+
71
+ ## Reference
72
+
73
+ For further information, please visit [External reference documentation](https://example.com/external).
74
+
75
+ -->
76
+
77
+
@@ -0,0 +1,14 @@
1
+ README.md
2
+ setup.py
3
+ pulumi_external/__init__.py
4
+ pulumi_external/_utilities.py
5
+ pulumi_external/get_external.py
6
+ pulumi_external/provider.py
7
+ pulumi_external/pulumi-plugin.json
8
+ pulumi_external/py.typed
9
+ pulumi_external.egg-info/PKG-INFO
10
+ pulumi_external.egg-info/SOURCES.txt
11
+ pulumi_external.egg-info/dependency_links.txt
12
+ pulumi_external.egg-info/not-zip-safe
13
+ pulumi_external.egg-info/requires.txt
14
+ pulumi_external.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ parver>=0.2.1
2
+ pulumi<4.0.0,>=3.0.0
3
+ semver>=2.8.1
@@ -0,0 +1 @@
1
+ pulumi_external
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,67 @@
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 errno
6
+ from setuptools import setup, find_packages
7
+ from setuptools.command.install import install
8
+ from subprocess import check_call
9
+
10
+
11
+ VERSION = "0.0.1"
12
+ PLUGIN_VERSION = "0.0.1"
13
+
14
+ class InstallPluginCommand(install):
15
+ def run(self):
16
+ install.run(self)
17
+ try:
18
+ check_call(['pulumi', 'plugin', 'install', 'resource', 'external', PLUGIN_VERSION])
19
+ except OSError as error:
20
+ if error.errno == errno.ENOENT:
21
+ print(f"""
22
+ There was an error installing the external resource provider plugin.
23
+ It looks like `pulumi` is not installed on your system.
24
+ Please visit https://pulumi.com/ to install the Pulumi CLI.
25
+ You may try manually installing the plugin by running
26
+ `pulumi plugin install resource external {PLUGIN_VERSION}`
27
+ """)
28
+ else:
29
+ raise
30
+
31
+
32
+ def readme():
33
+ try:
34
+ with open('README.md', encoding='utf-8') as f:
35
+ return f.read()
36
+ except FileNotFoundError:
37
+ return "external Pulumi Package - Development Version"
38
+
39
+
40
+ setup(name='pulumi_external',
41
+ python_requires='>=3.7',
42
+ version=VERSION,
43
+ description="A Pulumi package for creating and managing External cloud resources.",
44
+ long_description=readme(),
45
+ long_description_content_type='text/markdown',
46
+ cmdclass={
47
+ 'install': InstallPluginCommand,
48
+ },
49
+ keywords='pulumi category/cloud',
50
+ url='https://www.pulumi.com/',
51
+ project_urls={
52
+ 'Repository': 'https://github.com/pulumi/pulumi-external'
53
+ },
54
+ license='Apache-2.0',
55
+ packages=find_packages(),
56
+ package_data={
57
+ 'pulumi_external': [
58
+ 'py.typed',
59
+ 'pulumi-plugin.json',
60
+ ]
61
+ },
62
+ install_requires=[
63
+ 'parver>=0.2.1',
64
+ 'pulumi>=3.0.0,<4.0.0',
65
+ 'semver>=2.8.1'
66
+ ],
67
+ zip_safe=False)