pulumi-eks 4.3.0a1768463252__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.
@@ -0,0 +1,331 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-gen-eks. ***
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
+ # pkg_resources uses setuptools to inspect the set of installed packages. We use it here to ask
75
+ # for the currently installed version of the root package (i.e. us) and get its version.
76
+
77
+ # Unfortunately, PEP440 and semver differ slightly in incompatible ways. The Pulumi engine expects
78
+ # to receive a valid semver string when receiving requests from the language host, so it's our
79
+ # responsibility as the library to convert our own PEP440 version into a valid semver string.
80
+
81
+ pep440_version_string = importlib.metadata.version(root_package)
82
+ pep440_version = PEP440Version.parse(pep440_version_string)
83
+ (major, minor, patch) = pep440_version.release
84
+ prerelease = None
85
+ if pep440_version.pre_tag == 'a':
86
+ prerelease = f"alpha.{pep440_version.pre}"
87
+ elif pep440_version.pre_tag == 'b':
88
+ prerelease = f"beta.{pep440_version.pre}"
89
+ elif pep440_version.pre_tag == 'rc':
90
+ prerelease = f"rc.{pep440_version.pre}"
91
+ elif pep440_version.dev is not None:
92
+ # PEP440 has explicit support for dev builds, while semver encodes them as "prerelease" versions. To bridge
93
+ # between the two, we convert our dev build version into a prerelease tag. This matches what all of our other
94
+ # packages do when constructing their own semver string.
95
+ prerelease = f"dev.{pep440_version.dev}"
96
+ elif pep440_version.local is not None:
97
+ # PEP440 only allows a small set of prerelease tags, so when converting an arbitrary prerelease,
98
+ # PypiVersion in /pkg/codegen/python/utilities.go converts it to a local version. Therefore, we need to
99
+ # do the reverse conversion here and set the local version as the prerelease tag.
100
+ prerelease = pep440_version.local
101
+
102
+ return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
103
+
104
+
105
+ # Determine the version once and cache the value, which measurably improves program performance.
106
+ _version = _get_semver_version()
107
+ _version_str = str(_version)
108
+
109
+ def get_resource_opts_defaults() -> pulumi.ResourceOptions:
110
+ return pulumi.ResourceOptions(
111
+ version=get_version(),
112
+ plugin_download_url=get_plugin_download_url(),
113
+ )
114
+
115
+ def get_invoke_opts_defaults() -> pulumi.InvokeOptions:
116
+ return pulumi.InvokeOptions(
117
+ version=get_version(),
118
+ plugin_download_url=get_plugin_download_url(),
119
+ )
120
+
121
+ def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs):
122
+ """
123
+ Return the resource args and options given the *args and **kwargs of a resource's
124
+ __init__ method.
125
+ """
126
+
127
+ resource_args, opts = None, None
128
+
129
+ # If the first item is the resource args type, save it and remove it from the args list.
130
+ if args and isinstance(args[0], resource_args_type):
131
+ resource_args, args = args[0], args[1:]
132
+
133
+ # Now look at the first item in the args list again.
134
+ # If the first item is the resource options class, save it.
135
+ if args and isinstance(args[0], resource_options_type):
136
+ opts = args[0]
137
+
138
+ # If resource_args is None, see if "args" is in kwargs, and, if so, if it's typed as the
139
+ # the resource args type.
140
+ if resource_args is None:
141
+ a = kwargs.get("args")
142
+ if isinstance(a, resource_args_type):
143
+ resource_args = a
144
+
145
+ # If opts is None, look it up in kwargs.
146
+ if opts is None:
147
+ opts = kwargs.get("opts")
148
+
149
+ return resource_args, opts
150
+
151
+
152
+ # Temporary: just use pulumi._utils.lazy_import once everyone upgrades.
153
+ def lazy_import(fullname):
154
+
155
+ import pulumi._utils as u
156
+ f = getattr(u, 'lazy_import', None)
157
+ if f is None:
158
+ f = _lazy_import_temp
159
+
160
+ return f(fullname)
161
+
162
+
163
+ # Copied from pulumi._utils.lazy_import, see comments there.
164
+ def _lazy_import_temp(fullname):
165
+ m = sys.modules.get(fullname, None)
166
+ if m is not None:
167
+ return m
168
+
169
+ spec = importlib.util.find_spec(fullname)
170
+
171
+ m = sys.modules.get(fullname, None)
172
+ if m is not None:
173
+ return m
174
+
175
+ loader = importlib.util.LazyLoader(spec.loader)
176
+ spec.loader = loader
177
+ module = importlib.util.module_from_spec(spec)
178
+
179
+ m = sys.modules.get(fullname, None)
180
+ if m is not None:
181
+ return m
182
+
183
+ sys.modules[fullname] = module
184
+ loader.exec_module(module)
185
+ return module
186
+
187
+
188
+ class Package(pulumi.runtime.ResourcePackage):
189
+ def __init__(self, pkg_info):
190
+ super().__init__()
191
+ self.pkg_info = pkg_info
192
+
193
+ def version(self):
194
+ return _version
195
+
196
+ def construct_provider(self, name: str, typ: str, urn: str) -> pulumi.ProviderResource:
197
+ if typ != self.pkg_info['token']:
198
+ raise Exception(f"unknown provider type {typ}")
199
+ Provider = getattr(lazy_import(self.pkg_info['fqn']), self.pkg_info['class'])
200
+ return Provider(name, pulumi.ResourceOptions(urn=urn))
201
+
202
+
203
+ class Module(pulumi.runtime.ResourceModule):
204
+ def __init__(self, mod_info):
205
+ super().__init__()
206
+ self.mod_info = mod_info
207
+
208
+ def version(self):
209
+ return _version
210
+
211
+ def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
212
+ class_name = self.mod_info['classes'].get(typ, None)
213
+
214
+ if class_name is None:
215
+ raise Exception(f"unknown resource type {typ}")
216
+
217
+ TheClass = getattr(lazy_import(self.mod_info['fqn']), class_name)
218
+ return TheClass(name, pulumi.ResourceOptions(urn=urn))
219
+
220
+
221
+ def register(resource_modules, resource_packages):
222
+ resource_modules = json.loads(resource_modules)
223
+ resource_packages = json.loads(resource_packages)
224
+
225
+ for pkg_info in resource_packages:
226
+ pulumi.runtime.register_resource_package(pkg_info['pkg'], Package(pkg_info))
227
+
228
+ for mod_info in resource_modules:
229
+ pulumi.runtime.register_resource_module(
230
+ mod_info['pkg'],
231
+ mod_info['mod'],
232
+ Module(mod_info))
233
+
234
+
235
+ _F = typing.TypeVar('_F', bound=typing.Callable[..., typing.Any])
236
+
237
+
238
+ def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
239
+ """Decorator internally used on {fn}_output lifted function versions
240
+ to implement them automatically from the un-lifted function."""
241
+
242
+ func_sig = inspect.signature(func)
243
+
244
+ def lifted_func(*args, opts=None, **kwargs):
245
+ bound_args = func_sig.bind(*args, **kwargs)
246
+ # Convert tuple to list, see pulumi/pulumi#8172
247
+ args_list = list(bound_args.args)
248
+ return pulumi.Output.from_input({
249
+ 'args': args_list,
250
+ 'kwargs': bound_args.kwargs
251
+ }).apply(lambda resolved_args: func(*resolved_args['args'],
252
+ opts=opts,
253
+ **resolved_args['kwargs']))
254
+
255
+ return (lambda _: lifted_func)
256
+
257
+
258
+ def call_plain(
259
+ tok: str,
260
+ props: pulumi.Inputs,
261
+ res: typing.Optional[pulumi.Resource] = None,
262
+ typ: typing.Optional[type] = None,
263
+ ) -> typing.Any:
264
+ """
265
+ Wraps pulumi.runtime.plain to force the output and return it plainly.
266
+ """
267
+
268
+ output = pulumi.runtime.call(tok, props, res, typ)
269
+
270
+ # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
271
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
272
+
273
+ problem = None
274
+ if not known:
275
+ problem = ' an unknown value'
276
+ elif secret:
277
+ problem = ' a secret value'
278
+
279
+ if problem:
280
+ raise AssertionError(
281
+ f"Plain resource method '{tok}' incorrectly returned {problem}. "
282
+ + "This is an error in the provider, please report this to the provider developer."
283
+ )
284
+
285
+ return result
286
+
287
+
288
+ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
289
+ return (
290
+ await o._future,
291
+ await o._is_known,
292
+ await o._is_secret,
293
+ await o._resources,
294
+ )
295
+
296
+
297
+ # This is included to provide an upgrade path for users who are using a version
298
+ # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
299
+ def deprecated(message: str) -> typing.Callable[[C], C]:
300
+ """
301
+ Decorator to indicate a function is deprecated.
302
+
303
+ As well as inserting appropriate statements to indicate that the function is
304
+ deprecated, this decorator also tags the function with a special attribute
305
+ so that Pulumi code can detect that it is deprecated and react appropriately
306
+ in certain situations.
307
+
308
+ message is the deprecation message that should be printed if the function is called.
309
+ """
310
+
311
+ def decorator(fn: C) -> C:
312
+ if not callable(fn):
313
+ raise TypeError("Expected fn to be callable")
314
+
315
+ @functools.wraps(fn)
316
+ def deprecated_fn(*args, **kwargs):
317
+ warnings.warn(message)
318
+ pulumi.warn(f"{fn.__name__} is deprecated: {message}")
319
+
320
+ return fn(*args, **kwargs)
321
+
322
+ deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
323
+ return typing.cast(C, deprecated_fn)
324
+
325
+ return decorator
326
+
327
+ def get_plugin_download_url():
328
+ return None
329
+
330
+ def get_version():
331
+ return _version_str
pulumi_eks/addon.py ADDED
@@ -0,0 +1,272 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-gen-eks. ***
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
+ from .cluster import Cluster
17
+
18
+ __all__ = ['AddonArgs', 'Addon']
19
+
20
+ @pulumi.input_type
21
+ class AddonArgs:
22
+ def __init__(__self__, *,
23
+ addon_name: pulumi.Input[_builtins.str],
24
+ cluster: pulumi.Input['Cluster'],
25
+ addon_version: Optional[pulumi.Input[_builtins.str]] = None,
26
+ configuration_values: Optional[pulumi.Input[Mapping[str, Any]]] = None,
27
+ preserve: Optional[pulumi.Input[_builtins.bool]] = None,
28
+ resolve_conflicts_on_create: Optional[pulumi.Input[_builtins.str]] = None,
29
+ resolve_conflicts_on_update: Optional[pulumi.Input[_builtins.str]] = None,
30
+ service_account_role_arn: Optional[pulumi.Input[_builtins.str]] = None,
31
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]]] = None):
32
+ """
33
+ The set of arguments for constructing a Addon resource.
34
+ :param pulumi.Input[_builtins.str] addon_name: Name of the EKS add-on. The name must match one of the names returned by describe-addon-versions.
35
+ :param pulumi.Input['Cluster'] cluster: The target EKS cluster.
36
+ :param pulumi.Input[_builtins.str] addon_version: The version of the EKS add-on. The version must match one of the versions returned by describe-addon-versions.
37
+ :param pulumi.Input[Mapping[str, Any]] configuration_values: Custom configuration values for addons specified as an object. This object value must match the JSON schema derived from describe-addon-configuration.
38
+ :param pulumi.Input[_builtins.bool] preserve: Indicates if you want to preserve the created resources when deleting the EKS add-on.
39
+ :param pulumi.Input[_builtins.str] resolve_conflicts_on_create: How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are NONE and OVERWRITE. For more details see the CreateAddon API Docs.
40
+ :param pulumi.Input[_builtins.str] resolve_conflicts_on_update: How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are NONE, OVERWRITE, and PRESERVE. For more details see the UpdateAddon API Docs.
41
+ :param pulumi.Input[_builtins.str] service_account_role_arn: The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide.
42
+
43
+ Note: To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide.
44
+ :param pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]] tags: Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
45
+ """
46
+ pulumi.set(__self__, "addon_name", addon_name)
47
+ pulumi.set(__self__, "cluster", cluster)
48
+ if addon_version is not None:
49
+ pulumi.set(__self__, "addon_version", addon_version)
50
+ if configuration_values is not None:
51
+ pulumi.set(__self__, "configuration_values", configuration_values)
52
+ if preserve is not None:
53
+ pulumi.set(__self__, "preserve", preserve)
54
+ if resolve_conflicts_on_create is not None:
55
+ pulumi.set(__self__, "resolve_conflicts_on_create", resolve_conflicts_on_create)
56
+ if resolve_conflicts_on_update is not None:
57
+ pulumi.set(__self__, "resolve_conflicts_on_update", resolve_conflicts_on_update)
58
+ if service_account_role_arn is not None:
59
+ pulumi.set(__self__, "service_account_role_arn", service_account_role_arn)
60
+ if tags is not None:
61
+ pulumi.set(__self__, "tags", tags)
62
+
63
+ @_builtins.property
64
+ @pulumi.getter(name="addonName")
65
+ def addon_name(self) -> pulumi.Input[_builtins.str]:
66
+ """
67
+ Name of the EKS add-on. The name must match one of the names returned by describe-addon-versions.
68
+ """
69
+ return pulumi.get(self, "addon_name")
70
+
71
+ @addon_name.setter
72
+ def addon_name(self, value: pulumi.Input[_builtins.str]):
73
+ pulumi.set(self, "addon_name", value)
74
+
75
+ @_builtins.property
76
+ @pulumi.getter
77
+ def cluster(self) -> pulumi.Input['Cluster']:
78
+ """
79
+ The target EKS cluster.
80
+ """
81
+ return pulumi.get(self, "cluster")
82
+
83
+ @cluster.setter
84
+ def cluster(self, value: pulumi.Input['Cluster']):
85
+ pulumi.set(self, "cluster", value)
86
+
87
+ @_builtins.property
88
+ @pulumi.getter(name="addonVersion")
89
+ def addon_version(self) -> Optional[pulumi.Input[_builtins.str]]:
90
+ """
91
+ The version of the EKS add-on. The version must match one of the versions returned by describe-addon-versions.
92
+ """
93
+ return pulumi.get(self, "addon_version")
94
+
95
+ @addon_version.setter
96
+ def addon_version(self, value: Optional[pulumi.Input[_builtins.str]]):
97
+ pulumi.set(self, "addon_version", value)
98
+
99
+ @_builtins.property
100
+ @pulumi.getter(name="configurationValues")
101
+ def configuration_values(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
102
+ """
103
+ Custom configuration values for addons specified as an object. This object value must match the JSON schema derived from describe-addon-configuration.
104
+ """
105
+ return pulumi.get(self, "configuration_values")
106
+
107
+ @configuration_values.setter
108
+ def configuration_values(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
109
+ pulumi.set(self, "configuration_values", value)
110
+
111
+ @_builtins.property
112
+ @pulumi.getter
113
+ def preserve(self) -> Optional[pulumi.Input[_builtins.bool]]:
114
+ """
115
+ Indicates if you want to preserve the created resources when deleting the EKS add-on.
116
+ """
117
+ return pulumi.get(self, "preserve")
118
+
119
+ @preserve.setter
120
+ def preserve(self, value: Optional[pulumi.Input[_builtins.bool]]):
121
+ pulumi.set(self, "preserve", value)
122
+
123
+ @_builtins.property
124
+ @pulumi.getter(name="resolveConflictsOnCreate")
125
+ def resolve_conflicts_on_create(self) -> Optional[pulumi.Input[_builtins.str]]:
126
+ """
127
+ How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are NONE and OVERWRITE. For more details see the CreateAddon API Docs.
128
+ """
129
+ return pulumi.get(self, "resolve_conflicts_on_create")
130
+
131
+ @resolve_conflicts_on_create.setter
132
+ def resolve_conflicts_on_create(self, value: Optional[pulumi.Input[_builtins.str]]):
133
+ pulumi.set(self, "resolve_conflicts_on_create", value)
134
+
135
+ @_builtins.property
136
+ @pulumi.getter(name="resolveConflictsOnUpdate")
137
+ def resolve_conflicts_on_update(self) -> Optional[pulumi.Input[_builtins.str]]:
138
+ """
139
+ How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are NONE, OVERWRITE, and PRESERVE. For more details see the UpdateAddon API Docs.
140
+ """
141
+ return pulumi.get(self, "resolve_conflicts_on_update")
142
+
143
+ @resolve_conflicts_on_update.setter
144
+ def resolve_conflicts_on_update(self, value: Optional[pulumi.Input[_builtins.str]]):
145
+ pulumi.set(self, "resolve_conflicts_on_update", value)
146
+
147
+ @_builtins.property
148
+ @pulumi.getter(name="serviceAccountRoleArn")
149
+ def service_account_role_arn(self) -> Optional[pulumi.Input[_builtins.str]]:
150
+ """
151
+ The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide.
152
+
153
+ Note: To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide.
154
+ """
155
+ return pulumi.get(self, "service_account_role_arn")
156
+
157
+ @service_account_role_arn.setter
158
+ def service_account_role_arn(self, value: Optional[pulumi.Input[_builtins.str]]):
159
+ pulumi.set(self, "service_account_role_arn", value)
160
+
161
+ @_builtins.property
162
+ @pulumi.getter
163
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]]]:
164
+ """
165
+ Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
166
+ """
167
+ return pulumi.get(self, "tags")
168
+
169
+ @tags.setter
170
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]]]):
171
+ pulumi.set(self, "tags", value)
172
+
173
+
174
+ @pulumi.type_token("eks:index:Addon")
175
+ class Addon(pulumi.ComponentResource):
176
+ @overload
177
+ def __init__(__self__,
178
+ resource_name: str,
179
+ opts: Optional[pulumi.ResourceOptions] = None,
180
+ addon_name: Optional[pulumi.Input[_builtins.str]] = None,
181
+ addon_version: Optional[pulumi.Input[_builtins.str]] = None,
182
+ cluster: Optional[pulumi.Input['Cluster']] = None,
183
+ configuration_values: Optional[pulumi.Input[Mapping[str, Any]]] = None,
184
+ preserve: Optional[pulumi.Input[_builtins.bool]] = None,
185
+ resolve_conflicts_on_create: Optional[pulumi.Input[_builtins.str]] = None,
186
+ resolve_conflicts_on_update: Optional[pulumi.Input[_builtins.str]] = None,
187
+ service_account_role_arn: Optional[pulumi.Input[_builtins.str]] = None,
188
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]]] = None,
189
+ __props__=None):
190
+ """
191
+ Addon manages an EKS add-on.
192
+ For more information about supported add-ons, see: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
193
+
194
+ :param str resource_name: The name of the resource.
195
+ :param pulumi.ResourceOptions opts: Options for the resource.
196
+ :param pulumi.Input[_builtins.str] addon_name: Name of the EKS add-on. The name must match one of the names returned by describe-addon-versions.
197
+ :param pulumi.Input[_builtins.str] addon_version: The version of the EKS add-on. The version must match one of the versions returned by describe-addon-versions.
198
+ :param pulumi.Input['Cluster'] cluster: The target EKS cluster.
199
+ :param pulumi.Input[Mapping[str, Any]] configuration_values: Custom configuration values for addons specified as an object. This object value must match the JSON schema derived from describe-addon-configuration.
200
+ :param pulumi.Input[_builtins.bool] preserve: Indicates if you want to preserve the created resources when deleting the EKS add-on.
201
+ :param pulumi.Input[_builtins.str] resolve_conflicts_on_create: How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are NONE and OVERWRITE. For more details see the CreateAddon API Docs.
202
+ :param pulumi.Input[_builtins.str] resolve_conflicts_on_update: How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are NONE, OVERWRITE, and PRESERVE. For more details see the UpdateAddon API Docs.
203
+ :param pulumi.Input[_builtins.str] service_account_role_arn: The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide.
204
+
205
+ Note: To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide.
206
+ :param pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]] tags: Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
207
+ """
208
+ ...
209
+ @overload
210
+ def __init__(__self__,
211
+ resource_name: str,
212
+ args: AddonArgs,
213
+ opts: Optional[pulumi.ResourceOptions] = None):
214
+ """
215
+ Addon manages an EKS add-on.
216
+ For more information about supported add-ons, see: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
217
+
218
+ :param str resource_name: The name of the resource.
219
+ :param AddonArgs args: The arguments to use to populate this resource's properties.
220
+ :param pulumi.ResourceOptions opts: Options for the resource.
221
+ """
222
+ ...
223
+ def __init__(__self__, resource_name: str, *args, **kwargs):
224
+ resource_args, opts = _utilities.get_resource_args_opts(AddonArgs, pulumi.ResourceOptions, *args, **kwargs)
225
+ if resource_args is not None:
226
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
227
+ else:
228
+ __self__._internal_init(resource_name, *args, **kwargs)
229
+
230
+ def _internal_init(__self__,
231
+ resource_name: str,
232
+ opts: Optional[pulumi.ResourceOptions] = None,
233
+ addon_name: Optional[pulumi.Input[_builtins.str]] = None,
234
+ addon_version: Optional[pulumi.Input[_builtins.str]] = None,
235
+ cluster: Optional[pulumi.Input['Cluster']] = None,
236
+ configuration_values: Optional[pulumi.Input[Mapping[str, Any]]] = None,
237
+ preserve: Optional[pulumi.Input[_builtins.bool]] = None,
238
+ resolve_conflicts_on_create: Optional[pulumi.Input[_builtins.str]] = None,
239
+ resolve_conflicts_on_update: Optional[pulumi.Input[_builtins.str]] = None,
240
+ service_account_role_arn: Optional[pulumi.Input[_builtins.str]] = None,
241
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]]] = None,
242
+ __props__=None):
243
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
244
+ if not isinstance(opts, pulumi.ResourceOptions):
245
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
246
+ if opts.id is not None:
247
+ raise ValueError('ComponentResource classes do not support opts.id')
248
+ else:
249
+ if __props__ is not None:
250
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
251
+ __props__ = AddonArgs.__new__(AddonArgs)
252
+
253
+ if addon_name is None and not opts.urn:
254
+ raise TypeError("Missing required property 'addon_name'")
255
+ __props__.__dict__["addon_name"] = addon_name
256
+ __props__.__dict__["addon_version"] = addon_version
257
+ if cluster is None and not opts.urn:
258
+ raise TypeError("Missing required property 'cluster'")
259
+ __props__.__dict__["cluster"] = cluster
260
+ __props__.__dict__["configuration_values"] = configuration_values
261
+ __props__.__dict__["preserve"] = preserve
262
+ __props__.__dict__["resolve_conflicts_on_create"] = resolve_conflicts_on_create
263
+ __props__.__dict__["resolve_conflicts_on_update"] = resolve_conflicts_on_update
264
+ __props__.__dict__["service_account_role_arn"] = service_account_role_arn
265
+ __props__.__dict__["tags"] = tags
266
+ super(Addon, __self__).__init__(
267
+ 'eks:index:Addon',
268
+ resource_name,
269
+ __props__,
270
+ opts,
271
+ remote=True)
272
+