This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
kubernetesCluster.go
573 lines (527 loc) · 25.4 KB
/
kubernetesCluster.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package yandex
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a Yandex Kubernetes Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := yandex.NewKubernetesCluster(ctx, "zonalClusterResourceName", &yandex.KubernetesClusterArgs{
// Description: pulumi.String("description"),
// KmsProvider: &KubernetesClusterKmsProviderArgs{
// KeyId: pulumi.Any(yandex_kms_symmetric_key.Kms_key_resource_name.Id),
// },
// Labels: pulumi.StringMap{
// "my_key": pulumi.String("my_value"),
// "my_other_key": pulumi.String("my_other_value"),
// },
// Master: &KubernetesClusterMasterArgs{
// MaintenancePolicy: &KubernetesClusterMasterMaintenancePolicyArgs{
// AutoUpgrade: pulumi.Bool(true),
// MaintenanceWindow: []map[string]interface{}{
// map[string]interface{}{
// "duration": "3h",
// "startTime": "15:00",
// },
// },
// },
// PublicIp: pulumi.Bool(true),
// SecurityGroupIds: pulumi.StringArray{
// pulumi.Any(yandex_vpc_security_group.Security_group_name.Id),
// },
// Version: pulumi.String("1.17"),
// Zonal: &KubernetesClusterMasterZonalArgs{
// SubnetId: pulumi.Any(yandex_vpc_subnet.Subnet_resource_name.Id),
// Zone: pulumi.Any(yandex_vpc_subnet.Subnet_resource_name.Zone),
// },
// },
// NetworkId: pulumi.Any(yandex_vpc_network.Network_resource_name.Id),
// NetworkPolicyProvider: pulumi.String("CALICO"),
// NodeServiceAccountId: pulumi.Any(yandex_iam_service_account.Node_service_account_resource_name.Id),
// ReleaseChannel: pulumi.String("RAPID"),
// ServiceAccountId: pulumi.Any(yandex_iam_service_account.Service_account_resource_name.Id),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := yandex.NewKubernetesCluster(ctx, "regionalClusterResourceName", &yandex.KubernetesClusterArgs{
// Description: pulumi.String("description"),
// Labels: pulumi.StringMap{
// "my_key": pulumi.String("my_value"),
// "my_other_key": pulumi.String("my_other_value"),
// },
// Master: &KubernetesClusterMasterArgs{
// MaintenancePolicy: &KubernetesClusterMasterMaintenancePolicyArgs{
// AutoUpgrade: pulumi.Bool(true),
// MaintenanceWindow: []map[string]interface{}{
// map[string]interface{}{
// "day": "monday",
// "duration": "3h",
// "startTime": "15:00",
// },
// map[string]interface{}{
// "day": "friday",
// "duration": "4h30m",
// "startTime": "10:00",
// },
// },
// },
// PublicIp: pulumi.Bool(true),
// Regional: &KubernetesClusterMasterRegionalArgs{
// Location: []map[string]interface{}{
// map[string]interface{}{
// "subnetId": yandex_vpc_subnet.Subnet_a_resource_name.Id,
// "zone": yandex_vpc_subnet.Subnet_a_resource_name.Zone,
// },
// map[string]interface{}{
// "subnetId": yandex_vpc_subnet.Subnet_b_resource_name.Id,
// "zone": yandex_vpc_subnet.Subnet_b_resource_name.Zone,
// },
// map[string]interface{}{
// "subnetId": yandex_vpc_subnet.Subnet_c_resource_name.Id,
// "zone": yandex_vpc_subnet.Subnet_c_resource_name.Zone,
// },
// },
// Region: pulumi.String("ru-central1"),
// },
// Version: pulumi.String("1.14"),
// },
// NetworkId: pulumi.Any(yandex_vpc_network.Network_resource_name.Id),
// NodeServiceAccountId: pulumi.Any(yandex_iam_service_account.Node_service_account_resource_name.Id),
// ReleaseChannel: pulumi.String("STABLE"),
// ServiceAccountId: pulumi.Any(yandex_iam_service_account.Service_account_resource_name.Id),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// A Managed Kubernetes cluster can be imported using the `id` of the resource, e.g.
//
// ```sh
// $ pulumi import yandex:index/kubernetesCluster:KubernetesCluster default cluster_id
// ```
type KubernetesCluster struct {
pulumi.CustomResourceState
// CIDR block. IP range for allocating pod addresses.
// It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be
// set up for this CIDR blocks in node subnets.
ClusterIpv4Range pulumi.StringOutput `pulumi:"clusterIpv4Range"`
// Identical to clusterIpv4Range but for IPv6 protocol.
ClusterIpv6Range pulumi.StringOutput `pulumi:"clusterIpv6Range"`
// (Computed) The Kubernetes cluster creation timestamp.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// A description of the Kubernetes cluster.
Description pulumi.StringOutput `pulumi:"description"`
// The ID of the folder that the Kubernetes cluster belongs to.
// If it is not provided, the default provider folder is used.
FolderId pulumi.StringOutput `pulumi:"folderId"`
// (Computed) Health of the Kubernetes cluster.
Health pulumi.StringOutput `pulumi:"health"`
// cluster KMS provider parameters.
KmsProvider KubernetesClusterKmsProviderPtrOutput `pulumi:"kmsProvider"`
// A set of key/value label pairs to assign to the Kubernetes cluster.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// Log group where cluster stores cluster system logs, like audit, events, or controlplane logs.
LogGroupId pulumi.StringOutput `pulumi:"logGroupId"`
// Kubernetes master configuration options. The structure is documented below.
Master KubernetesClusterMasterOutput `pulumi:"master"`
// Name of a specific Kubernetes cluster.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the cluster network.
NetworkId pulumi.StringOutput `pulumi:"networkId"`
// (Optional) Network Implementation options. The structure is documented below.
NetworkImplementation KubernetesClusterNetworkImplementationPtrOutput `pulumi:"networkImplementation"`
// Network policy provider for the cluster. Possible values: `CALICO`.
NetworkPolicyProvider pulumi.StringPtrOutput `pulumi:"networkPolicyProvider"`
// Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
NodeIpv4CidrMaskSize pulumi.IntPtrOutput `pulumi:"nodeIpv4CidrMaskSize"`
// Service account to be used by the worker nodes of the Kubernetes cluster
// to access Container Registry or to push node logs and metrics.
NodeServiceAccountId pulumi.StringOutput `pulumi:"nodeServiceAccountId"`
// Cluster release channel.
ReleaseChannel pulumi.StringOutput `pulumi:"releaseChannel"`
// Service account to be used for provisioning Compute Cloud and VPC resources
// for Kubernetes cluster. Selected service account should have `edit` role on the folder where the Kubernetes
// cluster will be located and on the folder where selected network resides.
ServiceAccountId pulumi.StringOutput `pulumi:"serviceAccountId"`
// CIDR block. IP range Kubernetes service Kubernetes cluster
// IP addresses will be allocated from. It should not overlap with any subnet in the network
// the Kubernetes cluster located in.
ServiceIpv4Range pulumi.StringOutput `pulumi:"serviceIpv4Range"`
// Identical to serviceIpv4Range but for IPv6 protocol.
ServiceIpv6Range pulumi.StringOutput `pulumi:"serviceIpv6Range"`
// (Computed)Status of the Kubernetes cluster.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewKubernetesCluster registers a new resource with the given unique name, arguments, and options.
func NewKubernetesCluster(ctx *pulumi.Context,
name string, args *KubernetesClusterArgs, opts ...pulumi.ResourceOption) (*KubernetesCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Master == nil {
return nil, errors.New("invalid value for required argument 'Master'")
}
if args.NetworkId == nil {
return nil, errors.New("invalid value for required argument 'NetworkId'")
}
if args.NodeServiceAccountId == nil {
return nil, errors.New("invalid value for required argument 'NodeServiceAccountId'")
}
if args.ServiceAccountId == nil {
return nil, errors.New("invalid value for required argument 'ServiceAccountId'")
}
var resource KubernetesCluster
err := ctx.RegisterResource("yandex:index/kubernetesCluster:KubernetesCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetKubernetesCluster gets an existing KubernetesCluster 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 GetKubernetesCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *KubernetesClusterState, opts ...pulumi.ResourceOption) (*KubernetesCluster, error) {
var resource KubernetesCluster
err := ctx.ReadResource("yandex:index/kubernetesCluster:KubernetesCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering KubernetesCluster resources.
type kubernetesClusterState struct {
// CIDR block. IP range for allocating pod addresses.
// It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be
// set up for this CIDR blocks in node subnets.
ClusterIpv4Range *string `pulumi:"clusterIpv4Range"`
// Identical to clusterIpv4Range but for IPv6 protocol.
ClusterIpv6Range *string `pulumi:"clusterIpv6Range"`
// (Computed) The Kubernetes cluster creation timestamp.
CreatedAt *string `pulumi:"createdAt"`
// A description of the Kubernetes cluster.
Description *string `pulumi:"description"`
// The ID of the folder that the Kubernetes cluster belongs to.
// If it is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// (Computed) Health of the Kubernetes cluster.
Health *string `pulumi:"health"`
// cluster KMS provider parameters.
KmsProvider *KubernetesClusterKmsProvider `pulumi:"kmsProvider"`
// A set of key/value label pairs to assign to the Kubernetes cluster.
Labels map[string]string `pulumi:"labels"`
// Log group where cluster stores cluster system logs, like audit, events, or controlplane logs.
LogGroupId *string `pulumi:"logGroupId"`
// Kubernetes master configuration options. The structure is documented below.
Master *KubernetesClusterMaster `pulumi:"master"`
// Name of a specific Kubernetes cluster.
Name *string `pulumi:"name"`
// The ID of the cluster network.
NetworkId *string `pulumi:"networkId"`
// (Optional) Network Implementation options. The structure is documented below.
NetworkImplementation *KubernetesClusterNetworkImplementation `pulumi:"networkImplementation"`
// Network policy provider for the cluster. Possible values: `CALICO`.
NetworkPolicyProvider *string `pulumi:"networkPolicyProvider"`
// Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
NodeIpv4CidrMaskSize *int `pulumi:"nodeIpv4CidrMaskSize"`
// Service account to be used by the worker nodes of the Kubernetes cluster
// to access Container Registry or to push node logs and metrics.
NodeServiceAccountId *string `pulumi:"nodeServiceAccountId"`
// Cluster release channel.
ReleaseChannel *string `pulumi:"releaseChannel"`
// Service account to be used for provisioning Compute Cloud and VPC resources
// for Kubernetes cluster. Selected service account should have `edit` role on the folder where the Kubernetes
// cluster will be located and on the folder where selected network resides.
ServiceAccountId *string `pulumi:"serviceAccountId"`
// CIDR block. IP range Kubernetes service Kubernetes cluster
// IP addresses will be allocated from. It should not overlap with any subnet in the network
// the Kubernetes cluster located in.
ServiceIpv4Range *string `pulumi:"serviceIpv4Range"`
// Identical to serviceIpv4Range but for IPv6 protocol.
ServiceIpv6Range *string `pulumi:"serviceIpv6Range"`
// (Computed)Status of the Kubernetes cluster.
Status *string `pulumi:"status"`
}
type KubernetesClusterState struct {
// CIDR block. IP range for allocating pod addresses.
// It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be
// set up for this CIDR blocks in node subnets.
ClusterIpv4Range pulumi.StringPtrInput
// Identical to clusterIpv4Range but for IPv6 protocol.
ClusterIpv6Range pulumi.StringPtrInput
// (Computed) The Kubernetes cluster creation timestamp.
CreatedAt pulumi.StringPtrInput
// A description of the Kubernetes cluster.
Description pulumi.StringPtrInput
// The ID of the folder that the Kubernetes cluster belongs to.
// If it is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput
// (Computed) Health of the Kubernetes cluster.
Health pulumi.StringPtrInput
// cluster KMS provider parameters.
KmsProvider KubernetesClusterKmsProviderPtrInput
// A set of key/value label pairs to assign to the Kubernetes cluster.
Labels pulumi.StringMapInput
// Log group where cluster stores cluster system logs, like audit, events, or controlplane logs.
LogGroupId pulumi.StringPtrInput
// Kubernetes master configuration options. The structure is documented below.
Master KubernetesClusterMasterPtrInput
// Name of a specific Kubernetes cluster.
Name pulumi.StringPtrInput
// The ID of the cluster network.
NetworkId pulumi.StringPtrInput
// (Optional) Network Implementation options. The structure is documented below.
NetworkImplementation KubernetesClusterNetworkImplementationPtrInput
// Network policy provider for the cluster. Possible values: `CALICO`.
NetworkPolicyProvider pulumi.StringPtrInput
// Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
NodeIpv4CidrMaskSize pulumi.IntPtrInput
// Service account to be used by the worker nodes of the Kubernetes cluster
// to access Container Registry or to push node logs and metrics.
NodeServiceAccountId pulumi.StringPtrInput
// Cluster release channel.
ReleaseChannel pulumi.StringPtrInput
// Service account to be used for provisioning Compute Cloud and VPC resources
// for Kubernetes cluster. Selected service account should have `edit` role on the folder where the Kubernetes
// cluster will be located and on the folder where selected network resides.
ServiceAccountId pulumi.StringPtrInput
// CIDR block. IP range Kubernetes service Kubernetes cluster
// IP addresses will be allocated from. It should not overlap with any subnet in the network
// the Kubernetes cluster located in.
ServiceIpv4Range pulumi.StringPtrInput
// Identical to serviceIpv4Range but for IPv6 protocol.
ServiceIpv6Range pulumi.StringPtrInput
// (Computed)Status of the Kubernetes cluster.
Status pulumi.StringPtrInput
}
func (KubernetesClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*kubernetesClusterState)(nil)).Elem()
}
type kubernetesClusterArgs struct {
// CIDR block. IP range for allocating pod addresses.
// It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be
// set up for this CIDR blocks in node subnets.
ClusterIpv4Range *string `pulumi:"clusterIpv4Range"`
// Identical to clusterIpv4Range but for IPv6 protocol.
ClusterIpv6Range *string `pulumi:"clusterIpv6Range"`
// A description of the Kubernetes cluster.
Description *string `pulumi:"description"`
// The ID of the folder that the Kubernetes cluster belongs to.
// If it is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// cluster KMS provider parameters.
KmsProvider *KubernetesClusterKmsProvider `pulumi:"kmsProvider"`
// A set of key/value label pairs to assign to the Kubernetes cluster.
Labels map[string]string `pulumi:"labels"`
// Kubernetes master configuration options. The structure is documented below.
Master KubernetesClusterMaster `pulumi:"master"`
// Name of a specific Kubernetes cluster.
Name *string `pulumi:"name"`
// The ID of the cluster network.
NetworkId string `pulumi:"networkId"`
// (Optional) Network Implementation options. The structure is documented below.
NetworkImplementation *KubernetesClusterNetworkImplementation `pulumi:"networkImplementation"`
// Network policy provider for the cluster. Possible values: `CALICO`.
NetworkPolicyProvider *string `pulumi:"networkPolicyProvider"`
// Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
NodeIpv4CidrMaskSize *int `pulumi:"nodeIpv4CidrMaskSize"`
// Service account to be used by the worker nodes of the Kubernetes cluster
// to access Container Registry or to push node logs and metrics.
NodeServiceAccountId string `pulumi:"nodeServiceAccountId"`
// Cluster release channel.
ReleaseChannel *string `pulumi:"releaseChannel"`
// Service account to be used for provisioning Compute Cloud and VPC resources
// for Kubernetes cluster. Selected service account should have `edit` role on the folder where the Kubernetes
// cluster will be located and on the folder where selected network resides.
ServiceAccountId string `pulumi:"serviceAccountId"`
// CIDR block. IP range Kubernetes service Kubernetes cluster
// IP addresses will be allocated from. It should not overlap with any subnet in the network
// the Kubernetes cluster located in.
ServiceIpv4Range *string `pulumi:"serviceIpv4Range"`
// Identical to serviceIpv4Range but for IPv6 protocol.
ServiceIpv6Range *string `pulumi:"serviceIpv6Range"`
}
// The set of arguments for constructing a KubernetesCluster resource.
type KubernetesClusterArgs struct {
// CIDR block. IP range for allocating pod addresses.
// It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be
// set up for this CIDR blocks in node subnets.
ClusterIpv4Range pulumi.StringPtrInput
// Identical to clusterIpv4Range but for IPv6 protocol.
ClusterIpv6Range pulumi.StringPtrInput
// A description of the Kubernetes cluster.
Description pulumi.StringPtrInput
// The ID of the folder that the Kubernetes cluster belongs to.
// If it is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput
// cluster KMS provider parameters.
KmsProvider KubernetesClusterKmsProviderPtrInput
// A set of key/value label pairs to assign to the Kubernetes cluster.
Labels pulumi.StringMapInput
// Kubernetes master configuration options. The structure is documented below.
Master KubernetesClusterMasterInput
// Name of a specific Kubernetes cluster.
Name pulumi.StringPtrInput
// The ID of the cluster network.
NetworkId pulumi.StringInput
// (Optional) Network Implementation options. The structure is documented below.
NetworkImplementation KubernetesClusterNetworkImplementationPtrInput
// Network policy provider for the cluster. Possible values: `CALICO`.
NetworkPolicyProvider pulumi.StringPtrInput
// Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
NodeIpv4CidrMaskSize pulumi.IntPtrInput
// Service account to be used by the worker nodes of the Kubernetes cluster
// to access Container Registry or to push node logs and metrics.
NodeServiceAccountId pulumi.StringInput
// Cluster release channel.
ReleaseChannel pulumi.StringPtrInput
// Service account to be used for provisioning Compute Cloud and VPC resources
// for Kubernetes cluster. Selected service account should have `edit` role on the folder where the Kubernetes
// cluster will be located and on the folder where selected network resides.
ServiceAccountId pulumi.StringInput
// CIDR block. IP range Kubernetes service Kubernetes cluster
// IP addresses will be allocated from. It should not overlap with any subnet in the network
// the Kubernetes cluster located in.
ServiceIpv4Range pulumi.StringPtrInput
// Identical to serviceIpv4Range but for IPv6 protocol.
ServiceIpv6Range pulumi.StringPtrInput
}
func (KubernetesClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*kubernetesClusterArgs)(nil)).Elem()
}
type KubernetesClusterInput interface {
pulumi.Input
ToKubernetesClusterOutput() KubernetesClusterOutput
ToKubernetesClusterOutputWithContext(ctx context.Context) KubernetesClusterOutput
}
func (*KubernetesCluster) ElementType() reflect.Type {
return reflect.TypeOf((**KubernetesCluster)(nil)).Elem()
}
func (i *KubernetesCluster) ToKubernetesClusterOutput() KubernetesClusterOutput {
return i.ToKubernetesClusterOutputWithContext(context.Background())
}
func (i *KubernetesCluster) ToKubernetesClusterOutputWithContext(ctx context.Context) KubernetesClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesClusterOutput)
}
// KubernetesClusterArrayInput is an input type that accepts KubernetesClusterArray and KubernetesClusterArrayOutput values.
// You can construct a concrete instance of `KubernetesClusterArrayInput` via:
//
// KubernetesClusterArray{ KubernetesClusterArgs{...} }
type KubernetesClusterArrayInput interface {
pulumi.Input
ToKubernetesClusterArrayOutput() KubernetesClusterArrayOutput
ToKubernetesClusterArrayOutputWithContext(context.Context) KubernetesClusterArrayOutput
}
type KubernetesClusterArray []KubernetesClusterInput
func (KubernetesClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubernetesCluster)(nil)).Elem()
}
func (i KubernetesClusterArray) ToKubernetesClusterArrayOutput() KubernetesClusterArrayOutput {
return i.ToKubernetesClusterArrayOutputWithContext(context.Background())
}
func (i KubernetesClusterArray) ToKubernetesClusterArrayOutputWithContext(ctx context.Context) KubernetesClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesClusterArrayOutput)
}
// KubernetesClusterMapInput is an input type that accepts KubernetesClusterMap and KubernetesClusterMapOutput values.
// You can construct a concrete instance of `KubernetesClusterMapInput` via:
//
// KubernetesClusterMap{ "key": KubernetesClusterArgs{...} }
type KubernetesClusterMapInput interface {
pulumi.Input
ToKubernetesClusterMapOutput() KubernetesClusterMapOutput
ToKubernetesClusterMapOutputWithContext(context.Context) KubernetesClusterMapOutput
}
type KubernetesClusterMap map[string]KubernetesClusterInput
func (KubernetesClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubernetesCluster)(nil)).Elem()
}
func (i KubernetesClusterMap) ToKubernetesClusterMapOutput() KubernetesClusterMapOutput {
return i.ToKubernetesClusterMapOutputWithContext(context.Background())
}
func (i KubernetesClusterMap) ToKubernetesClusterMapOutputWithContext(ctx context.Context) KubernetesClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubernetesClusterMapOutput)
}
type KubernetesClusterOutput struct{ *pulumi.OutputState }
func (KubernetesClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**KubernetesCluster)(nil)).Elem()
}
func (o KubernetesClusterOutput) ToKubernetesClusterOutput() KubernetesClusterOutput {
return o
}
func (o KubernetesClusterOutput) ToKubernetesClusterOutputWithContext(ctx context.Context) KubernetesClusterOutput {
return o
}
type KubernetesClusterArrayOutput struct{ *pulumi.OutputState }
func (KubernetesClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubernetesCluster)(nil)).Elem()
}
func (o KubernetesClusterArrayOutput) ToKubernetesClusterArrayOutput() KubernetesClusterArrayOutput {
return o
}
func (o KubernetesClusterArrayOutput) ToKubernetesClusterArrayOutputWithContext(ctx context.Context) KubernetesClusterArrayOutput {
return o
}
func (o KubernetesClusterArrayOutput) Index(i pulumi.IntInput) KubernetesClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KubernetesCluster {
return vs[0].([]*KubernetesCluster)[vs[1].(int)]
}).(KubernetesClusterOutput)
}
type KubernetesClusterMapOutput struct{ *pulumi.OutputState }
func (KubernetesClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubernetesCluster)(nil)).Elem()
}
func (o KubernetesClusterMapOutput) ToKubernetesClusterMapOutput() KubernetesClusterMapOutput {
return o
}
func (o KubernetesClusterMapOutput) ToKubernetesClusterMapOutputWithContext(ctx context.Context) KubernetesClusterMapOutput {
return o
}
func (o KubernetesClusterMapOutput) MapIndex(k pulumi.StringInput) KubernetesClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KubernetesCluster {
return vs[0].(map[string]*KubernetesCluster)[vs[1].(string)]
}).(KubernetesClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesClusterInput)(nil)).Elem(), &KubernetesCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesClusterArrayInput)(nil)).Elem(), KubernetesClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*KubernetesClusterMapInput)(nil)).Elem(), KubernetesClusterMap{})
pulumi.RegisterOutputType(KubernetesClusterOutput{})
pulumi.RegisterOutputType(KubernetesClusterArrayOutput{})
pulumi.RegisterOutputType(KubernetesClusterMapOutput{})
}