generated from pulumi/pulumi-tf-provider-boilerplate
/
getKubernetesNodeGroup.go
245 lines (212 loc) · 11.7 KB
/
getKubernetesNodeGroup.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
// 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 yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex Kubernetes Node Group. For more information, see
// [the official documentation](https://cloud.yandex.com/docs/managed-kubernetes/concepts/#node-group).
//
// ## 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 {
// myNodeGroup, err := yandex.LookupKubernetesNodeGroup(ctx, &GetKubernetesNodeGroupArgs{
// NodeGroupId: pulumi.StringRef("some_k8s_node_group_id"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("myNodeGroup.status", myNodeGroup.Status)
// return nil
// })
// }
//
// ```
func LookupKubernetesNodeGroup(ctx *pulumi.Context, args *LookupKubernetesNodeGroupArgs, opts ...pulumi.InvokeOption) (*LookupKubernetesNodeGroupResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv LookupKubernetesNodeGroupResult
err := ctx.Invoke("yandex:index/getKubernetesNodeGroup:getKubernetesNodeGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getKubernetesNodeGroup.
type LookupKubernetesNodeGroupArgs struct {
// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// Name of a specific Kubernetes node group.
Name *string `pulumi:"name"`
// ID of a specific Kubernetes node group.
NodeGroupId *string `pulumi:"nodeGroupId"`
}
// A collection of values returned by getKubernetesNodeGroup.
type LookupKubernetesNodeGroupResult struct {
// This argument specify subnets (zones), that will be used by node group compute instances. The structure is documented below.
AllocationPolicies []GetKubernetesNodeGroupAllocationPolicy `pulumi:"allocationPolicies"`
// A list of allowed unsafe sysctl parameters for this node group. For more details see [documentation](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/).
AllowedUnsafeSysctls []string `pulumi:"allowedUnsafeSysctls"`
// The ID of the Kubernetes cluster that this node group belongs to.
ClusterId string `pulumi:"clusterId"`
// The Kubernetes node group creation timestamp.
CreatedAt string `pulumi:"createdAt"`
// Deploy policy of the node group. The structure is documented below.
DeployPolicies []GetKubernetesNodeGroupDeployPolicy `pulumi:"deployPolicies"`
// A description of the Kubernetes node group.
Description string `pulumi:"description"`
FolderId string `pulumi:"folderId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// ID of instance group that is used to manage this Kubernetes node group.
InstanceGroupId string `pulumi:"instanceGroupId"`
// Template used to create compute instances in this Kubernetes node group. The structure is documented below.
InstanceTemplates []GetKubernetesNodeGroupInstanceTemplate `pulumi:"instanceTemplates"`
// Labels assigned to compute nodes (instances), created by the Node Group.
Labels map[string]string `pulumi:"labels"`
// Information about maintenance policy for this Kubernetes node group. The structure is documented below.
MaintenancePolicies []GetKubernetesNodeGroupMaintenancePolicy `pulumi:"maintenancePolicies"`
// Name template of the instance.
Name string `pulumi:"name"`
NodeGroupId string `pulumi:"nodeGroupId"`
// A set of key/value label pairs, that are assigned to all the nodes of this Kubernetes node group.
NodeLabels map[string]string `pulumi:"nodeLabels"`
// A list of Kubernetes taints, that are applied to all the nodes of this Kubernetes node group.
NodeTaints []string `pulumi:"nodeTaints"`
// Scale policy of the node group. The structure is documented below.
ScalePolicies []GetKubernetesNodeGroupScalePolicy `pulumi:"scalePolicies"`
// Status of the Kubernetes node group.
Status string `pulumi:"status"`
// Information about Kubernetes node group version. The structure is documented below.
VersionInfos []GetKubernetesNodeGroupVersionInfo `pulumi:"versionInfos"`
}
func LookupKubernetesNodeGroupOutput(ctx *pulumi.Context, args LookupKubernetesNodeGroupOutputArgs, opts ...pulumi.InvokeOption) LookupKubernetesNodeGroupResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupKubernetesNodeGroupResult, error) {
args := v.(LookupKubernetesNodeGroupArgs)
r, err := LookupKubernetesNodeGroup(ctx, &args, opts...)
var s LookupKubernetesNodeGroupResult
if r != nil {
s = *r
}
return s, err
}).(LookupKubernetesNodeGroupResultOutput)
}
// A collection of arguments for invoking getKubernetesNodeGroup.
type LookupKubernetesNodeGroupOutputArgs struct {
// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// Name of a specific Kubernetes node group.
Name pulumi.StringPtrInput `pulumi:"name"`
// ID of a specific Kubernetes node group.
NodeGroupId pulumi.StringPtrInput `pulumi:"nodeGroupId"`
}
func (LookupKubernetesNodeGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupKubernetesNodeGroupArgs)(nil)).Elem()
}
// A collection of values returned by getKubernetesNodeGroup.
type LookupKubernetesNodeGroupResultOutput struct{ *pulumi.OutputState }
func (LookupKubernetesNodeGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupKubernetesNodeGroupResult)(nil)).Elem()
}
func (o LookupKubernetesNodeGroupResultOutput) ToLookupKubernetesNodeGroupResultOutput() LookupKubernetesNodeGroupResultOutput {
return o
}
func (o LookupKubernetesNodeGroupResultOutput) ToLookupKubernetesNodeGroupResultOutputWithContext(ctx context.Context) LookupKubernetesNodeGroupResultOutput {
return o
}
// This argument specify subnets (zones), that will be used by node group compute instances. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) AllocationPolicies() GetKubernetesNodeGroupAllocationPolicyArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupAllocationPolicy {
return v.AllocationPolicies
}).(GetKubernetesNodeGroupAllocationPolicyArrayOutput)
}
// A list of allowed unsafe sysctl parameters for this node group. For more details see [documentation](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/).
func (o LookupKubernetesNodeGroupResultOutput) AllowedUnsafeSysctls() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []string { return v.AllowedUnsafeSysctls }).(pulumi.StringArrayOutput)
}
// The ID of the Kubernetes cluster that this node group belongs to.
func (o LookupKubernetesNodeGroupResultOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.ClusterId }).(pulumi.StringOutput)
}
// The Kubernetes node group creation timestamp.
func (o LookupKubernetesNodeGroupResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// Deploy policy of the node group. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) DeployPolicies() GetKubernetesNodeGroupDeployPolicyArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupDeployPolicy { return v.DeployPolicies }).(GetKubernetesNodeGroupDeployPolicyArrayOutput)
}
// A description of the Kubernetes node group.
func (o LookupKubernetesNodeGroupResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupKubernetesNodeGroupResultOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.FolderId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupKubernetesNodeGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
// ID of instance group that is used to manage this Kubernetes node group.
func (o LookupKubernetesNodeGroupResultOutput) InstanceGroupId() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.InstanceGroupId }).(pulumi.StringOutput)
}
// Template used to create compute instances in this Kubernetes node group. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) InstanceTemplates() GetKubernetesNodeGroupInstanceTemplateArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupInstanceTemplate {
return v.InstanceTemplates
}).(GetKubernetesNodeGroupInstanceTemplateArrayOutput)
}
// Labels assigned to compute nodes (instances), created by the Node Group.
func (o LookupKubernetesNodeGroupResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// Information about maintenance policy for this Kubernetes node group. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) MaintenancePolicies() GetKubernetesNodeGroupMaintenancePolicyArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupMaintenancePolicy {
return v.MaintenancePolicies
}).(GetKubernetesNodeGroupMaintenancePolicyArrayOutput)
}
// Name template of the instance.
func (o LookupKubernetesNodeGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupKubernetesNodeGroupResultOutput) NodeGroupId() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.NodeGroupId }).(pulumi.StringOutput)
}
// A set of key/value label pairs, that are assigned to all the nodes of this Kubernetes node group.
func (o LookupKubernetesNodeGroupResultOutput) NodeLabels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) map[string]string { return v.NodeLabels }).(pulumi.StringMapOutput)
}
// A list of Kubernetes taints, that are applied to all the nodes of this Kubernetes node group.
func (o LookupKubernetesNodeGroupResultOutput) NodeTaints() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []string { return v.NodeTaints }).(pulumi.StringArrayOutput)
}
// Scale policy of the node group. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) ScalePolicies() GetKubernetesNodeGroupScalePolicyArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupScalePolicy { return v.ScalePolicies }).(GetKubernetesNodeGroupScalePolicyArrayOutput)
}
// Status of the Kubernetes node group.
func (o LookupKubernetesNodeGroupResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) string { return v.Status }).(pulumi.StringOutput)
}
// Information about Kubernetes node group version. The structure is documented below.
func (o LookupKubernetesNodeGroupResultOutput) VersionInfos() GetKubernetesNodeGroupVersionInfoArrayOutput {
return o.ApplyT(func(v LookupKubernetesNodeGroupResult) []GetKubernetesNodeGroupVersionInfo { return v.VersionInfos }).(GetKubernetesNodeGroupVersionInfoArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupKubernetesNodeGroupResultOutput{})
}