/
kubernetesNodePool.go
498 lines (440 loc) · 23.1 KB
/
kubernetesNodePool.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
// 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 digitalocean
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a DigitalOcean Kubernetes node pool resource. While the default node pool must be defined in the `KubernetesCluster` resource, this resource can be used to add additional ones to a cluster.
//
// ## Example Usage
//
// ### Basic Example
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// foo, err := digitalocean.NewKubernetesCluster(ctx, "foo", &digitalocean.KubernetesClusterArgs{
// Region: pulumi.String(digitalocean.RegionNYC1),
// Version: pulumi.String("1.22.8-do.1"),
// NodePool: &digitalocean.KubernetesClusterNodePoolArgs{
// Name: pulumi.String("front-end-pool"),
// Size: pulumi.String("s-2vcpu-2gb"),
// NodeCount: pulumi.Int(3),
// },
// })
// if err != nil {
// return err
// }
// _, err = digitalocean.NewKubernetesNodePool(ctx, "bar", &digitalocean.KubernetesNodePoolArgs{
// ClusterId: foo.ID(),
// Size: pulumi.String(digitalocean.DropletSlugDropletC2),
// NodeCount: pulumi.Int(2),
// Tags: pulumi.StringArray{
// pulumi.String("backend"),
// },
// Labels: pulumi.StringMap{
// "service": pulumi.String("backend"),
// "priority": pulumi.String("high"),
// },
// Taints: digitalocean.KubernetesNodePoolTaintArray{
// &digitalocean.KubernetesNodePoolTaintArgs{
// Key: pulumi.String("workloadKind"),
// Value: pulumi.String("database"),
// Effect: pulumi.String("NoSchedule"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Autoscaling Example
//
// Node pools may also be configured to [autoscale](https://www.digitalocean.com/docs/kubernetes/how-to/autoscale/).
// For example:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := digitalocean.NewKubernetesNodePool(ctx, "autoscale-pool-01", &digitalocean.KubernetesNodePoolArgs{
// ClusterId: pulumi.Any(digitalocean_kubernetes_cluster.Foo.Id),
// Size: pulumi.String(digitalocean.DropletSlugDropletS1VCPU2GB),
// AutoScale: pulumi.Bool(true),
// MinNodes: pulumi.Int(1),
// MaxNodes: pulumi.Int(5),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// # If you are importing an existing Kubernetes cluster with a single node pool, just
//
// import the cluster. Additional node pools can be imported by using their `id`, e.g.
//
// ```sh
// $ pulumi import digitalocean:index/kubernetesNodePool:KubernetesNodePool mynodepool 9d76f410-9284-4436-9633-4066852442c8
// ```
//
// Note: If the node pool has the `terraform:default-node-pool` tag, then it is a default node pool for an
//
// existing cluster. The provider will refuse to import the node pool in that case because the node pool
//
// is managed by the `digitalocean_kubernetes_cluster` resource and not by this
//
// `digitalocean_kubernetes_node_pool` resource.
type KubernetesNodePool struct {
pulumi.CustomResourceState
// A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
ActualNodeCount pulumi.IntOutput `pulumi:"actualNodeCount"`
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
AutoScale pulumi.BoolPtrOutput `pulumi:"autoScale"`
// The ID of the Kubernetes cluster to which the node pool is associated.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Labels pulumi.StringMapOutput `pulumi:"labels"`
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
MaxNodes pulumi.IntPtrOutput `pulumi:"maxNodes"`
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
MinNodes pulumi.IntPtrOutput `pulumi:"minNodes"`
// A name for the node pool.
Name pulumi.StringOutput `pulumi:"name"`
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
NodeCount pulumi.IntPtrOutput `pulumi:"nodeCount"`
// A list of nodes in the pool. Each node exports the following attributes:
Nodes KubernetesNodePoolNodeArrayOutput `pulumi:"nodes"`
// The slug identifier for the type of Droplet to be used as workers in the node pool.
Size pulumi.StringOutput `pulumi:"size"`
// A list of tag names to be applied to the Kubernetes cluster.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
Taints KubernetesNodePoolTaintArrayOutput `pulumi:"taints"`
}
// NewKubernetesNodePool registers a new resource with the given unique name, arguments, and options.
func NewKubernetesNodePool(ctx *pulumi.Context,
name string, args *KubernetesNodePoolArgs, opts ...pulumi.ResourceOption) (*KubernetesNodePool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.Size == nil {
return nil, errors.New("invalid value for required argument 'Size'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource KubernetesNodePool
err := ctx.RegisterResource("digitalocean:index/kubernetesNodePool:KubernetesNodePool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetKubernetesNodePool gets an existing KubernetesNodePool 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 GetKubernetesNodePool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *KubernetesNodePoolState, opts ...pulumi.ResourceOption) (*KubernetesNodePool, error) {
var resource KubernetesNodePool
err := ctx.ReadResource("digitalocean:index/kubernetesNodePool:KubernetesNodePool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering KubernetesNodePool resources.
type kubernetesNodePoolState struct {
// A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
ActualNodeCount *int `pulumi:"actualNodeCount"`
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
AutoScale *bool `pulumi:"autoScale"`
// The ID of the Kubernetes cluster to which the node pool is associated.
ClusterId *string `pulumi:"clusterId"`
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Labels map[string]string `pulumi:"labels"`
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
MaxNodes *int `pulumi:"maxNodes"`
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
MinNodes *int `pulumi:"minNodes"`
// A name for the node pool.
Name *string `pulumi:"name"`
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
NodeCount *int `pulumi:"nodeCount"`
// A list of nodes in the pool. Each node exports the following attributes:
Nodes []KubernetesNodePoolNode `pulumi:"nodes"`
// The slug identifier for the type of Droplet to be used as workers in the node pool.
Size *string `pulumi:"size"`
// A list of tag names to be applied to the Kubernetes cluster.
Tags []string `pulumi:"tags"`
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
Taints []KubernetesNodePoolTaint `pulumi:"taints"`
}
type KubernetesNodePoolState struct {
// A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
ActualNodeCount pulumi.IntPtrInput
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
AutoScale pulumi.BoolPtrInput
// The ID of the Kubernetes cluster to which the node pool is associated.
ClusterId pulumi.StringPtrInput
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Labels pulumi.StringMapInput
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
MaxNodes pulumi.IntPtrInput
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
MinNodes pulumi.IntPtrInput
// A name for the node pool.
Name pulumi.StringPtrInput
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
NodeCount pulumi.IntPtrInput
// A list of nodes in the pool. Each node exports the following attributes:
Nodes KubernetesNodePoolNodeArrayInput
// The slug identifier for the type of Droplet to be used as workers in the node pool.
Size pulumi.StringPtrInput
// A list of tag names to be applied to the Kubernetes cluster.
Tags pulumi.StringArrayInput
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
Taints KubernetesNodePoolTaintArrayInput
}
func (KubernetesNodePoolState) ElementType() reflect.Type {
return reflect.TypeOf((*kubernetesNodePoolState)(nil)).Elem()
}
type kubernetesNodePoolArgs struct {
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
AutoScale *bool `pulumi:"autoScale"`
// The ID of the Kubernetes cluster to which the node pool is associated.
ClusterId string `pulumi:"clusterId"`
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Labels map[string]string `pulumi:"labels"`
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
MaxNodes *int `pulumi:"maxNodes"`
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
MinNodes *int `pulumi:"minNodes"`
// A name for the node pool.
Name *string `pulumi:"name"`
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
NodeCount *int `pulumi:"nodeCount"`
// The slug identifier for the type of Droplet to be used as workers in the node pool.
Size string `pulumi:"size"`
// A list of tag names to be applied to the Kubernetes cluster.
Tags []string `pulumi:"tags"`
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
Taints []KubernetesNodePoolTaint `pulumi:"taints"`
}
// The set of arguments for constructing a KubernetesNodePool resource.
type KubernetesNodePoolArgs struct {
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
AutoScale pulumi.BoolPtrInput
// The ID of the Kubernetes cluster to which the node pool is associated.
ClusterId pulumi.StringInput
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Labels pulumi.StringMapInput
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
MaxNodes pulumi.IntPtrInput
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
MinNodes pulumi.IntPtrInput
// A name for the node pool.
Name pulumi.StringPtrInput
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
NodeCount pulumi.IntPtrInput
// The slug identifier for the type of Droplet to be used as workers in the node pool.
Size pulumi.StringInput
// A list of tag names to be applied to the Kubernetes cluster.
Tags pulumi.StringArrayInput
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
Taints KubernetesNodePoolTaintArrayInput
}
func (KubernetesNodePoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*kubernetesNodePoolArgs)(nil)).Elem()
}
type KubernetesNodePoolInput interface {
pulumi.Input
ToKubernetesNodePoolOutput() KubernetesNodePoolOutput
ToKubernetesNodePoolOutputWithContext(ctx context.Context) KubernetesNodePoolOutput
}
func (*KubernetesNodePool) ElementType() reflect.Type {
return reflect.TypeOf((**KubernetesNodePool)(nil)).Elem()
}
func (i *KubernetesNodePool) ToKubernetesNodePoolOutput() KubernetesNodePoolOutput {
return i.ToKubernetesNodePoolOutputWithContext(context.Background())
}
func (i *KubernetesNodePool) ToKubernetesNodePoolOutputWithContext(ctx context.Context) KubernetesNodePoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesNodePoolOutput)
}
// KubernetesNodePoolArrayInput is an input type that accepts KubernetesNodePoolArray and KubernetesNodePoolArrayOutput values.
// You can construct a concrete instance of `KubernetesNodePoolArrayInput` via:
//
// KubernetesNodePoolArray{ KubernetesNodePoolArgs{...} }
type KubernetesNodePoolArrayInput interface {
pulumi.Input
ToKubernetesNodePoolArrayOutput() KubernetesNodePoolArrayOutput
ToKubernetesNodePoolArrayOutputWithContext(context.Context) KubernetesNodePoolArrayOutput
}
type KubernetesNodePoolArray []KubernetesNodePoolInput
func (KubernetesNodePoolArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubernetesNodePool)(nil)).Elem()
}
func (i KubernetesNodePoolArray) ToKubernetesNodePoolArrayOutput() KubernetesNodePoolArrayOutput {
return i.ToKubernetesNodePoolArrayOutputWithContext(context.Background())
}
func (i KubernetesNodePoolArray) ToKubernetesNodePoolArrayOutputWithContext(ctx context.Context) KubernetesNodePoolArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesNodePoolArrayOutput)
}
// KubernetesNodePoolMapInput is an input type that accepts KubernetesNodePoolMap and KubernetesNodePoolMapOutput values.
// You can construct a concrete instance of `KubernetesNodePoolMapInput` via:
//
// KubernetesNodePoolMap{ "key": KubernetesNodePoolArgs{...} }
type KubernetesNodePoolMapInput interface {
pulumi.Input
ToKubernetesNodePoolMapOutput() KubernetesNodePoolMapOutput
ToKubernetesNodePoolMapOutputWithContext(context.Context) KubernetesNodePoolMapOutput
}
type KubernetesNodePoolMap map[string]KubernetesNodePoolInput
func (KubernetesNodePoolMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubernetesNodePool)(nil)).Elem()
}
func (i KubernetesNodePoolMap) ToKubernetesNodePoolMapOutput() KubernetesNodePoolMapOutput {
return i.ToKubernetesNodePoolMapOutputWithContext(context.Background())
}
func (i KubernetesNodePoolMap) ToKubernetesNodePoolMapOutputWithContext(ctx context.Context) KubernetesNodePoolMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesNodePoolMapOutput)
}
type KubernetesNodePoolOutput struct{ *pulumi.OutputState }
func (KubernetesNodePoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((**KubernetesNodePool)(nil)).Elem()
}
func (o KubernetesNodePoolOutput) ToKubernetesNodePoolOutput() KubernetesNodePoolOutput {
return o
}
func (o KubernetesNodePoolOutput) ToKubernetesNodePoolOutputWithContext(ctx context.Context) KubernetesNodePoolOutput {
return o
}
// A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
func (o KubernetesNodePoolOutput) ActualNodeCount() pulumi.IntOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.IntOutput { return v.ActualNodeCount }).(pulumi.IntOutput)
}
// Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
func (o KubernetesNodePoolOutput) AutoScale() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.BoolPtrOutput { return v.AutoScale }).(pulumi.BoolPtrOutput)
}
// The ID of the Kubernetes cluster to which the node pool is associated.
func (o KubernetesNodePoolOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
func (o KubernetesNodePoolOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
func (o KubernetesNodePoolOutput) MaxNodes() pulumi.IntPtrOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.IntPtrOutput { return v.MaxNodes }).(pulumi.IntPtrOutput)
}
// If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
func (o KubernetesNodePoolOutput) MinNodes() pulumi.IntPtrOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.IntPtrOutput { return v.MinNodes }).(pulumi.IntPtrOutput)
}
// A name for the node pool.
func (o KubernetesNodePoolOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
func (o KubernetesNodePoolOutput) NodeCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.IntPtrOutput { return v.NodeCount }).(pulumi.IntPtrOutput)
}
// A list of nodes in the pool. Each node exports the following attributes:
func (o KubernetesNodePoolOutput) Nodes() KubernetesNodePoolNodeArrayOutput {
return o.ApplyT(func(v *KubernetesNodePool) KubernetesNodePoolNodeArrayOutput { return v.Nodes }).(KubernetesNodePoolNodeArrayOutput)
}
// The slug identifier for the type of Droplet to be used as workers in the node pool.
func (o KubernetesNodePoolOutput) Size() pulumi.StringOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.StringOutput { return v.Size }).(pulumi.StringOutput)
}
// A list of tag names to be applied to the Kubernetes cluster.
func (o KubernetesNodePoolOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *KubernetesNodePool) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// A list of taints applied to all nodes in the pool.
//
// This resource supports customized create timeouts. The default timeout is 30 minutes.
func (o KubernetesNodePoolOutput) Taints() KubernetesNodePoolTaintArrayOutput {
return o.ApplyT(func(v *KubernetesNodePool) KubernetesNodePoolTaintArrayOutput { return v.Taints }).(KubernetesNodePoolTaintArrayOutput)
}
type KubernetesNodePoolArrayOutput struct{ *pulumi.OutputState }
func (KubernetesNodePoolArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubernetesNodePool)(nil)).Elem()
}
func (o KubernetesNodePoolArrayOutput) ToKubernetesNodePoolArrayOutput() KubernetesNodePoolArrayOutput {
return o
}
func (o KubernetesNodePoolArrayOutput) ToKubernetesNodePoolArrayOutputWithContext(ctx context.Context) KubernetesNodePoolArrayOutput {
return o
}
func (o KubernetesNodePoolArrayOutput) Index(i pulumi.IntInput) KubernetesNodePoolOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KubernetesNodePool {
return vs[0].([]*KubernetesNodePool)[vs[1].(int)]
}).(KubernetesNodePoolOutput)
}
type KubernetesNodePoolMapOutput struct{ *pulumi.OutputState }
func (KubernetesNodePoolMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubernetesNodePool)(nil)).Elem()
}
func (o KubernetesNodePoolMapOutput) ToKubernetesNodePoolMapOutput() KubernetesNodePoolMapOutput {
return o
}
func (o KubernetesNodePoolMapOutput) ToKubernetesNodePoolMapOutputWithContext(ctx context.Context) KubernetesNodePoolMapOutput {
return o
}
func (o KubernetesNodePoolMapOutput) MapIndex(k pulumi.StringInput) KubernetesNodePoolOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KubernetesNodePool {
return vs[0].(map[string]*KubernetesNodePool)[vs[1].(string)]
}).(KubernetesNodePoolOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesNodePoolInput)(nil)).Elem(), &KubernetesNodePool{})
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesNodePoolArrayInput)(nil)).Elem(), KubernetesNodePoolArray{})
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesNodePoolMapInput)(nil)).Elem(), KubernetesNodePoolMap{})
pulumi.RegisterOutputType(KubernetesNodePoolOutput{})
pulumi.RegisterOutputType(KubernetesNodePoolArrayOutput{})
pulumi.RegisterOutputType(KubernetesNodePoolMapOutput{})
}