/
addon.go
595 lines (537 loc) · 28.6 KB
/
addon.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eks
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EKS add-on.
//
// > **Note:** Amazon EKS add-on can only be used with Amazon EKS Clusters
// running version 1.18 with platform version eks.3 or later
// because add-ons rely on the Server-side Apply Kubernetes feature,
// which is only available in Kubernetes 1.18 and later.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := eks.NewAddon(ctx, "example", &eks.AddonArgs{
// ClusterName: pulumi.Any(aws_eks_cluster.Example.Name),
// AddonName: pulumi.String("vpc-cni"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// ## Example Update add-on usage with resolveConflicts and PRESERVE
//
// `resolveConflicts` with `PRESERVE` can be used to retain the config changes applied to the add-on with kubectl while upgrading to a newer version of the add-on.
//
// > **Note:** `resolveConflicts` with `PRESERVE` can only be used for upgrading the add-ons but not during the creation of add-on.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := eks.NewAddon(ctx, "example", &eks.AddonArgs{
// ClusterName: pulumi.Any(aws_eks_cluster.Example.Name),
// AddonName: pulumi.String("coredns"),
// AddonVersion: pulumi.String("v1.8.7-eksbuild.3"),
// ResolveConflicts: pulumi.String("PRESERVE"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Example add-on usage with custom configurationValues
//
// Custom add-on configuration can be passed using `configurationValues` as a single JSON string while creating or updating the add-on.
//
// > **Note:** `configurationValues` is a single JSON string should match the valid JSON schema for each add-on with specific version.
//
// To find the correct JSON schema for each add-on can be extracted using [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html) call.
// This below is an example for extracting the `configurationValues` schema for `coredns`.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// return nil
// })
// }
//
// ```
//
// Example to create a `coredns` managed addon with custom `configurationValues`.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := eks.NewAddon(ctx, "example", &eks.AddonArgs{
// AddonName: pulumi.String("coredns"),
// AddonVersion: pulumi.String("v1.8.7-eksbuild.3"),
// ClusterName: pulumi.String("mycluster"),
// ConfigurationValues: pulumi.String("{\"replicaCount\":4,\"resources\":{\"limits\":{\"cpu\":\"100m\",\"memory\":\"150Mi\"},\"requests\":{\"cpu\":\"100m\",\"memory\":\"150Mi\"}}}"),
// ResolveConflicts: pulumi.String("OVERWRITE"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// EKS add-on can be imported using the `cluster_name` and `addon_name` separated by a colon (`:`), e.g.,
//
// ```sh
//
// $ pulumi import aws:eks/addon:Addon my_eks_addon my_cluster_name:my_addon_name
//
// ```
type Addon struct {
pulumi.CustomResourceState
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonName pulumi.StringOutput `pulumi:"addonName"`
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonVersion pulumi.StringOutput `pulumi:"addonVersion"`
// Amazon Resource Name (ARN) of the EKS add-on.
Arn pulumi.StringOutput `pulumi:"arn"`
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
ConfigurationValues pulumi.StringOutput `pulumi:"configurationValues"`
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
ModifiedAt pulumi.StringOutput `pulumi:"modifiedAt"`
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
Preserve pulumi.BoolPtrOutput `pulumi:"preserve"`
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
ResolveConflicts pulumi.StringPtrOutput `pulumi:"resolveConflicts"`
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
ServiceAccountRoleArn pulumi.StringPtrOutput `pulumi:"serviceAccountRoleArn"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
// NewAddon registers a new resource with the given unique name, arguments, and options.
func NewAddon(ctx *pulumi.Context,
name string, args *AddonArgs, opts ...pulumi.ResourceOption) (*Addon, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AddonName == nil {
return nil, errors.New("invalid value for required argument 'AddonName'")
}
if args.ClusterName == nil {
return nil, errors.New("invalid value for required argument 'ClusterName'")
}
var resource Addon
err := ctx.RegisterResource("aws:eks/addon:Addon", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAddon gets an existing Addon resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAddon(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AddonState, opts ...pulumi.ResourceOption) (*Addon, error) {
var resource Addon
err := ctx.ReadResource("aws:eks/addon:Addon", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Addon resources.
type addonState struct {
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonName *string `pulumi:"addonName"`
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonVersion *string `pulumi:"addonVersion"`
// Amazon Resource Name (ARN) of the EKS add-on.
Arn *string `pulumi:"arn"`
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
ClusterName *string `pulumi:"clusterName"`
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
ConfigurationValues *string `pulumi:"configurationValues"`
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
CreatedAt *string `pulumi:"createdAt"`
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
ModifiedAt *string `pulumi:"modifiedAt"`
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
Preserve *bool `pulumi:"preserve"`
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
ResolveConflicts *string `pulumi:"resolveConflicts"`
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
ServiceAccountRoleArn *string `pulumi:"serviceAccountRoleArn"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
TagsAll map[string]string `pulumi:"tagsAll"`
}
type AddonState struct {
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonName pulumi.StringPtrInput
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonVersion pulumi.StringPtrInput
// Amazon Resource Name (ARN) of the EKS add-on.
Arn pulumi.StringPtrInput
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
ClusterName pulumi.StringPtrInput
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
ConfigurationValues pulumi.StringPtrInput
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
CreatedAt pulumi.StringPtrInput
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
ModifiedAt pulumi.StringPtrInput
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
Preserve pulumi.BoolPtrInput
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
ResolveConflicts pulumi.StringPtrInput
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
ServiceAccountRoleArn pulumi.StringPtrInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
}
func (AddonState) ElementType() reflect.Type {
return reflect.TypeOf((*addonState)(nil)).Elem()
}
type addonArgs struct {
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonName string `pulumi:"addonName"`
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonVersion *string `pulumi:"addonVersion"`
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
ClusterName string `pulumi:"clusterName"`
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
ConfigurationValues *string `pulumi:"configurationValues"`
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
Preserve *bool `pulumi:"preserve"`
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
ResolveConflicts *string `pulumi:"resolveConflicts"`
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
ServiceAccountRoleArn *string `pulumi:"serviceAccountRoleArn"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Addon resource.
type AddonArgs struct {
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonName pulumi.StringInput
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
AddonVersion pulumi.StringPtrInput
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
ClusterName pulumi.StringInput
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
ConfigurationValues pulumi.StringPtrInput
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
Preserve pulumi.BoolPtrInput
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
ResolveConflicts pulumi.StringPtrInput
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
ServiceAccountRoleArn pulumi.StringPtrInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
}
func (AddonArgs) ElementType() reflect.Type {
return reflect.TypeOf((*addonArgs)(nil)).Elem()
}
type AddonInput interface {
pulumi.Input
ToAddonOutput() AddonOutput
ToAddonOutputWithContext(ctx context.Context) AddonOutput
}
func (*Addon) ElementType() reflect.Type {
return reflect.TypeOf((**Addon)(nil)).Elem()
}
func (i *Addon) ToAddonOutput() AddonOutput {
return i.ToAddonOutputWithContext(context.Background())
}
func (i *Addon) ToAddonOutputWithContext(ctx context.Context) AddonOutput {
return pulumi.ToOutputWithContext(ctx, i).(AddonOutput)
}
// AddonArrayInput is an input type that accepts AddonArray and AddonArrayOutput values.
// You can construct a concrete instance of `AddonArrayInput` via:
//
// AddonArray{ AddonArgs{...} }
type AddonArrayInput interface {
pulumi.Input
ToAddonArrayOutput() AddonArrayOutput
ToAddonArrayOutputWithContext(context.Context) AddonArrayOutput
}
type AddonArray []AddonInput
func (AddonArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Addon)(nil)).Elem()
}
func (i AddonArray) ToAddonArrayOutput() AddonArrayOutput {
return i.ToAddonArrayOutputWithContext(context.Background())
}
func (i AddonArray) ToAddonArrayOutputWithContext(ctx context.Context) AddonArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AddonArrayOutput)
}
// AddonMapInput is an input type that accepts AddonMap and AddonMapOutput values.
// You can construct a concrete instance of `AddonMapInput` via:
//
// AddonMap{ "key": AddonArgs{...} }
type AddonMapInput interface {
pulumi.Input
ToAddonMapOutput() AddonMapOutput
ToAddonMapOutputWithContext(context.Context) AddonMapOutput
}
type AddonMap map[string]AddonInput
func (AddonMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Addon)(nil)).Elem()
}
func (i AddonMap) ToAddonMapOutput() AddonMapOutput {
return i.ToAddonMapOutputWithContext(context.Background())
}
func (i AddonMap) ToAddonMapOutputWithContext(ctx context.Context) AddonMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AddonMapOutput)
}
type AddonOutput struct{ *pulumi.OutputState }
func (AddonOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Addon)(nil)).Elem()
}
func (o AddonOutput) ToAddonOutput() AddonOutput {
return o
}
func (o AddonOutput) ToAddonOutputWithContext(ctx context.Context) AddonOutput {
return o
}
// Name of the EKS add-on. The name must match one of
// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
func (o AddonOutput) AddonName() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.AddonName }).(pulumi.StringOutput)
}
// The version of the EKS add-on. The version must
// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
func (o AddonOutput) AddonVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.AddonVersion }).(pulumi.StringOutput)
}
// Amazon Resource Name (ARN) of the EKS add-on.
func (o AddonOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (`^[0-9A-Za-z][A-Za-z0-9\-_]+$`).
//
// The following arguments are optional:
func (o AddonOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
func (o AddonOutput) ConfigurationValues() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ConfigurationValues }).(pulumi.StringOutput)
}
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
func (o AddonOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
func (o AddonOutput) ModifiedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ModifiedAt }).(pulumi.StringOutput)
}
// Indicates if you want to preserve the created resources when deleting the EKS add-on.
func (o AddonOutput) Preserve() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Addon) pulumi.BoolPtrOutput { return v.Preserve }).(pulumi.BoolPtrOutput)
}
// Define how to resolve parameter value conflicts
// when migrating an existing add-on to an Amazon EKS add-on or when applying
// version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
func (o AddonOutput) ResolveConflicts() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ResolveConflicts }).(pulumi.StringPtrOutput)
}
// 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](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
// in the Amazon EKS User Guide.
//
// > **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](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
// in the Amazon EKS User Guide.
func (o AddonOutput) ServiceAccountRoleArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ServiceAccountRoleArn }).(pulumi.StringPtrOutput)
}
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (o AddonOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Addon) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
func (o AddonOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *Addon) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}
type AddonArrayOutput struct{ *pulumi.OutputState }
func (AddonArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Addon)(nil)).Elem()
}
func (o AddonArrayOutput) ToAddonArrayOutput() AddonArrayOutput {
return o
}
func (o AddonArrayOutput) ToAddonArrayOutputWithContext(ctx context.Context) AddonArrayOutput {
return o
}
func (o AddonArrayOutput) Index(i pulumi.IntInput) AddonOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Addon {
return vs[0].([]*Addon)[vs[1].(int)]
}).(AddonOutput)
}
type AddonMapOutput struct{ *pulumi.OutputState }
func (AddonMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Addon)(nil)).Elem()
}
func (o AddonMapOutput) ToAddonMapOutput() AddonMapOutput {
return o
}
func (o AddonMapOutput) ToAddonMapOutputWithContext(ctx context.Context) AddonMapOutput {
return o
}
func (o AddonMapOutput) MapIndex(k pulumi.StringInput) AddonOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Addon {
return vs[0].(map[string]*Addon)[vs[1].(string)]
}).(AddonOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AddonInput)(nil)).Elem(), &Addon{})
pulumi.RegisterInputType(reflect.TypeOf((*AddonArrayInput)(nil)).Elem(), AddonArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AddonMapInput)(nil)).Elem(), AddonMap{})
pulumi.RegisterOutputType(AddonOutput{})
pulumi.RegisterOutputType(AddonArrayOutput{})
pulumi.RegisterOutputType(AddonMapOutput{})
}