pulumi-devzero 0.0.4__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.
- pulumi_devzero-0.0.4/PKG-INFO +25 -0
- pulumi_devzero-0.0.4/pulumi_devzero/__init__.py +48 -0
- pulumi_devzero-0.0.4/pulumi_devzero/_utilities.py +328 -0
- pulumi_devzero-0.0.4/pulumi_devzero/config/__init__.py +9 -0
- pulumi_devzero-0.0.4/pulumi_devzero/config/__init__.pyi +31 -0
- pulumi_devzero-0.0.4/pulumi_devzero/config/vars.py +43 -0
- pulumi_devzero-0.0.4/pulumi_devzero/provider.py +155 -0
- pulumi_devzero-0.0.4/pulumi_devzero/pulumi-plugin.json +5 -0
- pulumi_devzero-0.0.4/pulumi_devzero/py.typed +0 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/__init__.py +15 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/_inputs.py +2568 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/cluster.py +133 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/node_policy.py +651 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/node_policy_target.py +219 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/outputs.py +1942 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/workload_policy.py +612 -0
- pulumi_devzero-0.0.4/pulumi_devzero/resources/workload_policy_target.py +389 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/PKG-INFO +25 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/SOURCES.txt +23 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/dependency_links.txt +1 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/not-zip-safe +1 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/requires.txt +6 -0
- pulumi_devzero-0.0.4/pulumi_devzero.egg-info/top_level.txt +1 -0
- pulumi_devzero-0.0.4/setup.cfg +4 -0
- pulumi_devzero-0.0.4/setup.py +46 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pulumi_devzero
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: A Pulumi provider for managing DevZero infrastructure resources.
|
|
5
|
+
Home-page: https://dakr.devzero.dev
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/devzero-inc/pulumi-provider-devzero
|
|
8
|
+
Keywords: pulumi devzero category/cloud
|
|
9
|
+
Requires-Python: >=3.9
|
|
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
|
+
Requires-Dist: typing-extensions<5,>=4.11; python_version < "3.11"
|
|
15
|
+
Dynamic: description
|
|
16
|
+
Dynamic: description-content-type
|
|
17
|
+
Dynamic: home-page
|
|
18
|
+
Dynamic: keywords
|
|
19
|
+
Dynamic: license
|
|
20
|
+
Dynamic: project-url
|
|
21
|
+
Dynamic: requires-dist
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
devzero Pulumi Package - Development Version
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
from . import _utilities
|
|
7
|
+
import typing
|
|
8
|
+
# Export this package's modules as members:
|
|
9
|
+
from .provider import *
|
|
10
|
+
|
|
11
|
+
# Make subpackages available:
|
|
12
|
+
if typing.TYPE_CHECKING:
|
|
13
|
+
import pulumi_devzero.config as __config
|
|
14
|
+
config = __config
|
|
15
|
+
import pulumi_devzero.resources as __resources
|
|
16
|
+
resources = __resources
|
|
17
|
+
else:
|
|
18
|
+
config = _utilities.lazy_import('pulumi_devzero.config')
|
|
19
|
+
resources = _utilities.lazy_import('pulumi_devzero.resources')
|
|
20
|
+
|
|
21
|
+
_utilities.register(
|
|
22
|
+
resource_modules="""
|
|
23
|
+
[
|
|
24
|
+
{
|
|
25
|
+
"pkg": "devzero",
|
|
26
|
+
"mod": "resources",
|
|
27
|
+
"fqn": "pulumi_devzero.resources",
|
|
28
|
+
"classes": {
|
|
29
|
+
"devzero:resources:Cluster": "Cluster",
|
|
30
|
+
"devzero:resources:NodePolicy": "NodePolicy",
|
|
31
|
+
"devzero:resources:NodePolicyTarget": "NodePolicyTarget",
|
|
32
|
+
"devzero:resources:WorkloadPolicy": "WorkloadPolicy",
|
|
33
|
+
"devzero:resources:WorkloadPolicyTarget": "WorkloadPolicyTarget"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
""",
|
|
38
|
+
resource_packages="""
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
"pkg": "devzero",
|
|
42
|
+
"token": "pulumi:providers:devzero",
|
|
43
|
+
"fqn": "pulumi_devzero",
|
|
44
|
+
"class": "Provider"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
"""
|
|
48
|
+
)
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import asyncio
|
|
7
|
+
import functools
|
|
8
|
+
import importlib.metadata
|
|
9
|
+
import importlib.util
|
|
10
|
+
import inspect
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
import typing
|
|
15
|
+
import warnings
|
|
16
|
+
import base64
|
|
17
|
+
|
|
18
|
+
import pulumi
|
|
19
|
+
import pulumi.runtime
|
|
20
|
+
from pulumi.runtime.sync_await import _sync_await
|
|
21
|
+
from pulumi.runtime.proto import resource_pb2
|
|
22
|
+
|
|
23
|
+
from semver import VersionInfo as SemverVersion
|
|
24
|
+
from parver import Version as PEP440Version
|
|
25
|
+
|
|
26
|
+
C = typing.TypeVar("C", bound=typing.Callable)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_env(*args):
|
|
30
|
+
for v in args:
|
|
31
|
+
value = os.getenv(v)
|
|
32
|
+
if value is not None:
|
|
33
|
+
return value
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def get_env_bool(*args):
|
|
38
|
+
str = get_env(*args)
|
|
39
|
+
if str is not None:
|
|
40
|
+
# NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
41
|
+
# Terraform uses internally when parsing boolean values.
|
|
42
|
+
if str in ["1", "t", "T", "true", "TRUE", "True"]:
|
|
43
|
+
return True
|
|
44
|
+
if str in ["0", "f", "F", "false", "FALSE", "False"]:
|
|
45
|
+
return False
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def get_env_int(*args):
|
|
50
|
+
str = get_env(*args)
|
|
51
|
+
if str is not None:
|
|
52
|
+
try:
|
|
53
|
+
return int(str)
|
|
54
|
+
except:
|
|
55
|
+
return None
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def get_env_float(*args):
|
|
60
|
+
str = get_env(*args)
|
|
61
|
+
if str is not None:
|
|
62
|
+
try:
|
|
63
|
+
return float(str)
|
|
64
|
+
except:
|
|
65
|
+
return None
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _get_semver_version():
|
|
70
|
+
# __name__ is set to the fully-qualified name of the current module, In our case, it will be
|
|
71
|
+
# <some module>._utilities. <some module> is the module we want to query the version for.
|
|
72
|
+
root_package, *rest = __name__.split('.')
|
|
73
|
+
|
|
74
|
+
# Unfortunately, PEP440 and semver differ slightly in incompatible ways. The Pulumi engine expects
|
|
75
|
+
# to receive a valid semver string when receiving requests from the language host, so it's our
|
|
76
|
+
# responsibility as the library to convert our own PEP440 version into a valid semver string.
|
|
77
|
+
|
|
78
|
+
pep440_version_string = importlib.metadata.version(root_package)
|
|
79
|
+
pep440_version = PEP440Version.parse(pep440_version_string)
|
|
80
|
+
(major, minor, patch) = pep440_version.release
|
|
81
|
+
prerelease = None
|
|
82
|
+
if pep440_version.pre_tag == 'a':
|
|
83
|
+
prerelease = f"alpha.{pep440_version.pre}"
|
|
84
|
+
elif pep440_version.pre_tag == 'b':
|
|
85
|
+
prerelease = f"beta.{pep440_version.pre}"
|
|
86
|
+
elif pep440_version.pre_tag == 'rc':
|
|
87
|
+
prerelease = f"rc.{pep440_version.pre}"
|
|
88
|
+
elif pep440_version.dev is not None:
|
|
89
|
+
# PEP440 has explicit support for dev builds, while semver encodes them as "prerelease" versions. To bridge
|
|
90
|
+
# between the two, we convert our dev build version into a prerelease tag. This matches what all of our other
|
|
91
|
+
# packages do when constructing their own semver string.
|
|
92
|
+
prerelease = f"dev.{pep440_version.dev}"
|
|
93
|
+
elif pep440_version.local is not None:
|
|
94
|
+
# PEP440 only allows a small set of prerelease tags, so when converting an arbitrary prerelease,
|
|
95
|
+
# PypiVersion in /pkg/codegen/python/utilities.go converts it to a local version. Therefore, we need to
|
|
96
|
+
# do the reverse conversion here and set the local version as the prerelease tag.
|
|
97
|
+
prerelease = pep440_version.local
|
|
98
|
+
|
|
99
|
+
return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Determine the version once and cache the value, which measurably improves program performance.
|
|
103
|
+
_version = _get_semver_version()
|
|
104
|
+
_version_str = str(_version)
|
|
105
|
+
|
|
106
|
+
def get_resource_opts_defaults() -> pulumi.ResourceOptions:
|
|
107
|
+
return pulumi.ResourceOptions(
|
|
108
|
+
version=get_version(),
|
|
109
|
+
plugin_download_url=get_plugin_download_url(),
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
def get_invoke_opts_defaults() -> pulumi.InvokeOptions:
|
|
113
|
+
return pulumi.InvokeOptions(
|
|
114
|
+
version=get_version(),
|
|
115
|
+
plugin_download_url=get_plugin_download_url(),
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs):
|
|
119
|
+
"""
|
|
120
|
+
Return the resource args and options given the *args and **kwargs of a resource's
|
|
121
|
+
__init__ method.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
resource_args, opts = None, None
|
|
125
|
+
|
|
126
|
+
# If the first item is the resource args type, save it and remove it from the args list.
|
|
127
|
+
if args and isinstance(args[0], resource_args_type):
|
|
128
|
+
resource_args, args = args[0], args[1:]
|
|
129
|
+
|
|
130
|
+
# Now look at the first item in the args list again.
|
|
131
|
+
# If the first item is the resource options class, save it.
|
|
132
|
+
if args and isinstance(args[0], resource_options_type):
|
|
133
|
+
opts = args[0]
|
|
134
|
+
|
|
135
|
+
# If resource_args is None, see if "args" is in kwargs, and, if so, if it's typed as the
|
|
136
|
+
# the resource args type.
|
|
137
|
+
if resource_args is None:
|
|
138
|
+
a = kwargs.get("args")
|
|
139
|
+
if isinstance(a, resource_args_type):
|
|
140
|
+
resource_args = a
|
|
141
|
+
|
|
142
|
+
# If opts is None, look it up in kwargs.
|
|
143
|
+
if opts is None:
|
|
144
|
+
opts = kwargs.get("opts")
|
|
145
|
+
|
|
146
|
+
return resource_args, opts
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# Temporary: just use pulumi._utils.lazy_import once everyone upgrades.
|
|
150
|
+
def lazy_import(fullname):
|
|
151
|
+
|
|
152
|
+
import pulumi._utils as u
|
|
153
|
+
f = getattr(u, 'lazy_import', None)
|
|
154
|
+
if f is None:
|
|
155
|
+
f = _lazy_import_temp
|
|
156
|
+
|
|
157
|
+
return f(fullname)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# Copied from pulumi._utils.lazy_import, see comments there.
|
|
161
|
+
def _lazy_import_temp(fullname):
|
|
162
|
+
m = sys.modules.get(fullname, None)
|
|
163
|
+
if m is not None:
|
|
164
|
+
return m
|
|
165
|
+
|
|
166
|
+
spec = importlib.util.find_spec(fullname)
|
|
167
|
+
|
|
168
|
+
m = sys.modules.get(fullname, None)
|
|
169
|
+
if m is not None:
|
|
170
|
+
return m
|
|
171
|
+
|
|
172
|
+
loader = importlib.util.LazyLoader(spec.loader)
|
|
173
|
+
spec.loader = loader
|
|
174
|
+
module = importlib.util.module_from_spec(spec)
|
|
175
|
+
|
|
176
|
+
m = sys.modules.get(fullname, None)
|
|
177
|
+
if m is not None:
|
|
178
|
+
return m
|
|
179
|
+
|
|
180
|
+
sys.modules[fullname] = module
|
|
181
|
+
loader.exec_module(module)
|
|
182
|
+
return module
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class Package(pulumi.runtime.ResourcePackage):
|
|
186
|
+
def __init__(self, pkg_info):
|
|
187
|
+
super().__init__()
|
|
188
|
+
self.pkg_info = pkg_info
|
|
189
|
+
|
|
190
|
+
def version(self):
|
|
191
|
+
return _version
|
|
192
|
+
|
|
193
|
+
def construct_provider(self, name: str, typ: str, urn: str) -> pulumi.ProviderResource:
|
|
194
|
+
if typ != self.pkg_info['token']:
|
|
195
|
+
raise Exception(f"unknown provider type {typ}")
|
|
196
|
+
Provider = getattr(lazy_import(self.pkg_info['fqn']), self.pkg_info['class'])
|
|
197
|
+
return Provider(name, pulumi.ResourceOptions(urn=urn))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class Module(pulumi.runtime.ResourceModule):
|
|
201
|
+
def __init__(self, mod_info):
|
|
202
|
+
super().__init__()
|
|
203
|
+
self.mod_info = mod_info
|
|
204
|
+
|
|
205
|
+
def version(self):
|
|
206
|
+
return _version
|
|
207
|
+
|
|
208
|
+
def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
|
|
209
|
+
class_name = self.mod_info['classes'].get(typ, None)
|
|
210
|
+
|
|
211
|
+
if class_name is None:
|
|
212
|
+
raise Exception(f"unknown resource type {typ}")
|
|
213
|
+
|
|
214
|
+
TheClass = getattr(lazy_import(self.mod_info['fqn']), class_name)
|
|
215
|
+
return TheClass(name, pulumi.ResourceOptions(urn=urn))
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def register(resource_modules, resource_packages):
|
|
219
|
+
resource_modules = json.loads(resource_modules)
|
|
220
|
+
resource_packages = json.loads(resource_packages)
|
|
221
|
+
|
|
222
|
+
for pkg_info in resource_packages:
|
|
223
|
+
pulumi.runtime.register_resource_package(pkg_info['pkg'], Package(pkg_info))
|
|
224
|
+
|
|
225
|
+
for mod_info in resource_modules:
|
|
226
|
+
pulumi.runtime.register_resource_module(
|
|
227
|
+
mod_info['pkg'],
|
|
228
|
+
mod_info['mod'],
|
|
229
|
+
Module(mod_info))
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
_F = typing.TypeVar('_F', bound=typing.Callable[..., typing.Any])
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
|
|
236
|
+
"""Decorator internally used on {fn}_output lifted function versions
|
|
237
|
+
to implement them automatically from the un-lifted function."""
|
|
238
|
+
|
|
239
|
+
func_sig = inspect.signature(func)
|
|
240
|
+
|
|
241
|
+
def lifted_func(*args, opts=None, **kwargs):
|
|
242
|
+
bound_args = func_sig.bind(*args, **kwargs)
|
|
243
|
+
# Convert tuple to list, see pulumi/pulumi#8172
|
|
244
|
+
args_list = list(bound_args.args)
|
|
245
|
+
return pulumi.Output.from_input({
|
|
246
|
+
'args': args_list,
|
|
247
|
+
'kwargs': bound_args.kwargs
|
|
248
|
+
}).apply(lambda resolved_args: func(*resolved_args['args'],
|
|
249
|
+
opts=opts,
|
|
250
|
+
**resolved_args['kwargs']))
|
|
251
|
+
|
|
252
|
+
return (lambda _: lifted_func)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def call_plain(
|
|
256
|
+
tok: str,
|
|
257
|
+
props: pulumi.Inputs,
|
|
258
|
+
res: typing.Optional[pulumi.Resource] = None,
|
|
259
|
+
typ: typing.Optional[type] = None,
|
|
260
|
+
) -> typing.Any:
|
|
261
|
+
"""
|
|
262
|
+
Wraps pulumi.runtime.plain to force the output and return it plainly.
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
output = pulumi.runtime.call(tok, props, res, typ)
|
|
266
|
+
|
|
267
|
+
# Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
268
|
+
result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
|
|
269
|
+
|
|
270
|
+
problem = None
|
|
271
|
+
if not known:
|
|
272
|
+
problem = ' an unknown value'
|
|
273
|
+
elif secret:
|
|
274
|
+
problem = ' a secret value'
|
|
275
|
+
|
|
276
|
+
if problem:
|
|
277
|
+
raise AssertionError(
|
|
278
|
+
f"Plain resource method '{tok}' incorrectly returned {problem}. "
|
|
279
|
+
+ "This is an error in the provider, please report this to the provider developer."
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
return result
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
|
|
286
|
+
return (
|
|
287
|
+
await o._future,
|
|
288
|
+
await o._is_known,
|
|
289
|
+
await o._is_secret,
|
|
290
|
+
await o._resources,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
# This is included to provide an upgrade path for users who are using a version
|
|
295
|
+
# of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
|
|
296
|
+
def deprecated(message: str) -> typing.Callable[[C], C]:
|
|
297
|
+
"""
|
|
298
|
+
Decorator to indicate a function is deprecated.
|
|
299
|
+
|
|
300
|
+
As well as inserting appropriate statements to indicate that the function is
|
|
301
|
+
deprecated, this decorator also tags the function with a special attribute
|
|
302
|
+
so that Pulumi code can detect that it is deprecated and react appropriately
|
|
303
|
+
in certain situations.
|
|
304
|
+
|
|
305
|
+
message is the deprecation message that should be printed if the function is called.
|
|
306
|
+
"""
|
|
307
|
+
|
|
308
|
+
def decorator(fn: C) -> C:
|
|
309
|
+
if not callable(fn):
|
|
310
|
+
raise TypeError("Expected fn to be callable")
|
|
311
|
+
|
|
312
|
+
@functools.wraps(fn)
|
|
313
|
+
def deprecated_fn(*args, **kwargs):
|
|
314
|
+
warnings.warn(message)
|
|
315
|
+
pulumi.warn(f"{fn.__name__} is deprecated: {message}")
|
|
316
|
+
|
|
317
|
+
return fn(*args, **kwargs)
|
|
318
|
+
|
|
319
|
+
deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
|
|
320
|
+
return typing.cast(C, deprecated_fn)
|
|
321
|
+
|
|
322
|
+
return decorator
|
|
323
|
+
|
|
324
|
+
def get_plugin_download_url():
|
|
325
|
+
return "github://api.github.com/devzero-inc"
|
|
326
|
+
|
|
327
|
+
def get_version():
|
|
328
|
+
return _version_str
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import sys
|
|
7
|
+
from .vars import _ExportableConfig
|
|
8
|
+
|
|
9
|
+
sys.modules[__name__].__class__ = _ExportableConfig
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from .. import _utilities
|
|
16
|
+
|
|
17
|
+
teamId: Optional[str]
|
|
18
|
+
"""
|
|
19
|
+
The DevZero team ID.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
token: Optional[str]
|
|
23
|
+
"""
|
|
24
|
+
The DevZero API token for authentication.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
url: str
|
|
28
|
+
"""
|
|
29
|
+
The DevZero API base URL. Defaults to https://dakr.devzero.dev
|
|
30
|
+
"""
|
|
31
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from .. import _utilities
|
|
16
|
+
|
|
17
|
+
import types
|
|
18
|
+
|
|
19
|
+
__config__ = pulumi.Config('devzero')
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class _ExportableConfig(types.ModuleType):
|
|
23
|
+
@_builtins.property
|
|
24
|
+
def team_id(self) -> Optional[str]:
|
|
25
|
+
"""
|
|
26
|
+
The DevZero team ID.
|
|
27
|
+
"""
|
|
28
|
+
return __config__.get('teamId')
|
|
29
|
+
|
|
30
|
+
@_builtins.property
|
|
31
|
+
def token(self) -> Optional[str]:
|
|
32
|
+
"""
|
|
33
|
+
The DevZero API token for authentication.
|
|
34
|
+
"""
|
|
35
|
+
return __config__.get('token')
|
|
36
|
+
|
|
37
|
+
@_builtins.property
|
|
38
|
+
def url(self) -> str:
|
|
39
|
+
"""
|
|
40
|
+
The DevZero API base URL. Defaults to https://dakr.devzero.dev
|
|
41
|
+
"""
|
|
42
|
+
return __config__.get('url') or 'https://dakr.devzero.dev'
|
|
43
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['ProviderArgs', 'Provider']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class ProviderArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
team_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
23
|
+
token: Optional[pulumi.Input[_builtins.str]] = None,
|
|
24
|
+
url: Optional[pulumi.Input[_builtins.str]] = None):
|
|
25
|
+
"""
|
|
26
|
+
The set of arguments for constructing a Provider resource.
|
|
27
|
+
|
|
28
|
+
:param pulumi.Input[_builtins.str] team_id: The DevZero team ID.
|
|
29
|
+
:param pulumi.Input[_builtins.str] token: The DevZero API token.
|
|
30
|
+
:param pulumi.Input[_builtins.str] url: The DevZero API base URL.
|
|
31
|
+
"""
|
|
32
|
+
if team_id is None:
|
|
33
|
+
team_id = _utilities.get_env('DEVZERO_TEAM_ID')
|
|
34
|
+
pulumi.set(__self__, "team_id", team_id)
|
|
35
|
+
if token is None:
|
|
36
|
+
token = _utilities.get_env('DEVZERO_TOKEN')
|
|
37
|
+
pulumi.set(__self__, "token", token)
|
|
38
|
+
if url is None:
|
|
39
|
+
url = (_utilities.get_env('DEVZERO_URL') or 'https://dakr.devzero.dev')
|
|
40
|
+
if url is not None:
|
|
41
|
+
pulumi.set(__self__, "url", url)
|
|
42
|
+
|
|
43
|
+
@_builtins.property
|
|
44
|
+
@pulumi.getter(name="teamId")
|
|
45
|
+
def team_id(self) -> pulumi.Input[_builtins.str]:
|
|
46
|
+
"""
|
|
47
|
+
The DevZero team ID.
|
|
48
|
+
"""
|
|
49
|
+
return pulumi.get(self, "team_id")
|
|
50
|
+
|
|
51
|
+
@team_id.setter
|
|
52
|
+
def team_id(self, value: pulumi.Input[_builtins.str]):
|
|
53
|
+
pulumi.set(self, "team_id", value)
|
|
54
|
+
|
|
55
|
+
@_builtins.property
|
|
56
|
+
@pulumi.getter
|
|
57
|
+
def token(self) -> pulumi.Input[_builtins.str]:
|
|
58
|
+
"""
|
|
59
|
+
The DevZero API token.
|
|
60
|
+
"""
|
|
61
|
+
return pulumi.get(self, "token")
|
|
62
|
+
|
|
63
|
+
@token.setter
|
|
64
|
+
def token(self, value: pulumi.Input[_builtins.str]):
|
|
65
|
+
pulumi.set(self, "token", value)
|
|
66
|
+
|
|
67
|
+
@_builtins.property
|
|
68
|
+
@pulumi.getter
|
|
69
|
+
def url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
70
|
+
"""
|
|
71
|
+
The DevZero API base URL.
|
|
72
|
+
"""
|
|
73
|
+
return pulumi.get(self, "url")
|
|
74
|
+
|
|
75
|
+
@url.setter
|
|
76
|
+
def url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
77
|
+
pulumi.set(self, "url", value)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@pulumi.type_token("pulumi:providers:devzero")
|
|
81
|
+
class Provider(pulumi.ProviderResource):
|
|
82
|
+
@overload
|
|
83
|
+
def __init__(__self__,
|
|
84
|
+
resource_name: str,
|
|
85
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
86
|
+
team_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
87
|
+
token: Optional[pulumi.Input[_builtins.str]] = None,
|
|
88
|
+
url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
89
|
+
__props__=None):
|
|
90
|
+
"""
|
|
91
|
+
The DevZero Pulumi provider.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:param str resource_name: The name of the resource.
|
|
95
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
96
|
+
:param pulumi.Input[_builtins.str] team_id: The DevZero team ID.
|
|
97
|
+
:param pulumi.Input[_builtins.str] token: The DevZero API token.
|
|
98
|
+
:param pulumi.Input[_builtins.str] url: The DevZero API base URL.
|
|
99
|
+
"""
|
|
100
|
+
...
|
|
101
|
+
@overload
|
|
102
|
+
def __init__(__self__,
|
|
103
|
+
resource_name: str,
|
|
104
|
+
args: ProviderArgs,
|
|
105
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
106
|
+
"""
|
|
107
|
+
The DevZero Pulumi provider.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
:param str resource_name: The name of the resource.
|
|
111
|
+
:param ProviderArgs args: The arguments to use to populate this resource's properties.
|
|
112
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
113
|
+
"""
|
|
114
|
+
...
|
|
115
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
116
|
+
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
117
|
+
if resource_args is not None:
|
|
118
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
119
|
+
else:
|
|
120
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
121
|
+
|
|
122
|
+
def _internal_init(__self__,
|
|
123
|
+
resource_name: str,
|
|
124
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
125
|
+
team_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
126
|
+
token: Optional[pulumi.Input[_builtins.str]] = None,
|
|
127
|
+
url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
128
|
+
__props__=None):
|
|
129
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
130
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
131
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
132
|
+
if opts.id is None:
|
|
133
|
+
if __props__ is not None:
|
|
134
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
135
|
+
__props__ = ProviderArgs.__new__(ProviderArgs)
|
|
136
|
+
|
|
137
|
+
if team_id is None:
|
|
138
|
+
team_id = _utilities.get_env('DEVZERO_TEAM_ID')
|
|
139
|
+
if team_id is None and not opts.urn:
|
|
140
|
+
raise TypeError("Missing required property 'team_id'")
|
|
141
|
+
__props__.__dict__["team_id"] = team_id
|
|
142
|
+
if token is None:
|
|
143
|
+
token = _utilities.get_env('DEVZERO_TOKEN')
|
|
144
|
+
if token is None and not opts.urn:
|
|
145
|
+
raise TypeError("Missing required property 'token'")
|
|
146
|
+
__props__.__dict__["token"] = None if token is None else pulumi.Output.secret(token)
|
|
147
|
+
if url is None:
|
|
148
|
+
url = (_utilities.get_env('DEVZERO_URL') or 'https://dakr.devzero.dev')
|
|
149
|
+
__props__.__dict__["url"] = url
|
|
150
|
+
super(Provider, __self__).__init__(
|
|
151
|
+
'devzero',
|
|
152
|
+
resource_name,
|
|
153
|
+
__props__,
|
|
154
|
+
opts)
|
|
155
|
+
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
from .. import _utilities
|
|
7
|
+
import typing
|
|
8
|
+
# Export this package's modules as members:
|
|
9
|
+
from .cluster import *
|
|
10
|
+
from .node_policy import *
|
|
11
|
+
from .node_policy_target import *
|
|
12
|
+
from .workload_policy import *
|
|
13
|
+
from .workload_policy_target import *
|
|
14
|
+
from ._inputs import *
|
|
15
|
+
from . import outputs
|