/
vmwareNodePool.go
277 lines (235 loc) · 14.7 KB
/
vmwareNodePool.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a new VMware node pool in a given project, location and VMWare cluster.
type VmwareNodePool struct {
pulumi.CustomResourceState
// Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
Annotations pulumi.StringMapOutput `pulumi:"annotations"`
// The node configuration of the node pool.
Config VmwareNodeConfigResponseOutput `pulumi:"config"`
// The time at which this node pool was created.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// The time at which this node pool was deleted. If the resource is not deleted, this must be empty
DeleteTime pulumi.StringOutput `pulumi:"deleteTime"`
// The display name for the node pool.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
Etag pulumi.StringOutput `pulumi:"etag"`
Location pulumi.StringOutput `pulumi:"location"`
// Immutable. The resource name of this node pool.
Name pulumi.StringOutput `pulumi:"name"`
// Node pool autoscaling config for the node pool.
NodePoolAutoscaling VmwareNodePoolAutoscalingConfigResponseOutput `pulumi:"nodePoolAutoscaling"`
// Anthos version for the node pool. Defaults to the user cluster version.
OnPremVersion pulumi.StringOutput `pulumi:"onPremVersion"`
Project pulumi.StringOutput `pulumi:"project"`
// If set, there are currently changes in flight to the node pool.
Reconciling pulumi.BoolOutput `pulumi:"reconciling"`
// The current state of the node pool.
State pulumi.StringOutput `pulumi:"state"`
// ResourceStatus representing the detailed VMware node pool state.
Status ResourceStatusResponseOutput `pulumi:"status"`
// The unique identifier of the node pool.
Uid pulumi.StringOutput `pulumi:"uid"`
// The time at which this node pool was last updated.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
VmwareClusterId pulumi.StringOutput `pulumi:"vmwareClusterId"`
// The ID to use for the node pool, which will become the final component of the node pool's resource name. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted to be a UUID (or UUID-like: anything matching /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
VmwareNodePoolId pulumi.StringPtrOutput `pulumi:"vmwareNodePoolId"`
}
// NewVmwareNodePool registers a new resource with the given unique name, arguments, and options.
func NewVmwareNodePool(ctx *pulumi.Context,
name string, args *VmwareNodePoolArgs, opts ...pulumi.ResourceOption) (*VmwareNodePool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Config == nil {
return nil, errors.New("invalid value for required argument 'Config'")
}
if args.VmwareClusterId == nil {
return nil, errors.New("invalid value for required argument 'VmwareClusterId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
"vmwareClusterId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource VmwareNodePool
err := ctx.RegisterResource("google-native:gkeonprem/v1:VmwareNodePool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVmwareNodePool gets an existing VmwareNodePool 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 GetVmwareNodePool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VmwareNodePoolState, opts ...pulumi.ResourceOption) (*VmwareNodePool, error) {
var resource VmwareNodePool
err := ctx.ReadResource("google-native:gkeonprem/v1:VmwareNodePool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VmwareNodePool resources.
type vmwareNodePoolState struct {
}
type VmwareNodePoolState struct {
}
func (VmwareNodePoolState) ElementType() reflect.Type {
return reflect.TypeOf((*vmwareNodePoolState)(nil)).Elem()
}
type vmwareNodePoolArgs struct {
// Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
Annotations map[string]string `pulumi:"annotations"`
// The node configuration of the node pool.
Config VmwareNodeConfig `pulumi:"config"`
// The display name for the node pool.
DisplayName *string `pulumi:"displayName"`
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
Etag *string `pulumi:"etag"`
Location *string `pulumi:"location"`
// Immutable. The resource name of this node pool.
Name *string `pulumi:"name"`
// Node pool autoscaling config for the node pool.
NodePoolAutoscaling *VmwareNodePoolAutoscalingConfig `pulumi:"nodePoolAutoscaling"`
// Anthos version for the node pool. Defaults to the user cluster version.
OnPremVersion *string `pulumi:"onPremVersion"`
Project *string `pulumi:"project"`
VmwareClusterId string `pulumi:"vmwareClusterId"`
// The ID to use for the node pool, which will become the final component of the node pool's resource name. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted to be a UUID (or UUID-like: anything matching /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
VmwareNodePoolId *string `pulumi:"vmwareNodePoolId"`
}
// The set of arguments for constructing a VmwareNodePool resource.
type VmwareNodePoolArgs struct {
// Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
Annotations pulumi.StringMapInput
// The node configuration of the node pool.
Config VmwareNodeConfigInput
// The display name for the node pool.
DisplayName pulumi.StringPtrInput
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
Etag pulumi.StringPtrInput
Location pulumi.StringPtrInput
// Immutable. The resource name of this node pool.
Name pulumi.StringPtrInput
// Node pool autoscaling config for the node pool.
NodePoolAutoscaling VmwareNodePoolAutoscalingConfigPtrInput
// Anthos version for the node pool. Defaults to the user cluster version.
OnPremVersion pulumi.StringPtrInput
Project pulumi.StringPtrInput
VmwareClusterId pulumi.StringInput
// The ID to use for the node pool, which will become the final component of the node pool's resource name. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted to be a UUID (or UUID-like: anything matching /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
VmwareNodePoolId pulumi.StringPtrInput
}
func (VmwareNodePoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*vmwareNodePoolArgs)(nil)).Elem()
}
type VmwareNodePoolInput interface {
pulumi.Input
ToVmwareNodePoolOutput() VmwareNodePoolOutput
ToVmwareNodePoolOutputWithContext(ctx context.Context) VmwareNodePoolOutput
}
func (*VmwareNodePool) ElementType() reflect.Type {
return reflect.TypeOf((**VmwareNodePool)(nil)).Elem()
}
func (i *VmwareNodePool) ToVmwareNodePoolOutput() VmwareNodePoolOutput {
return i.ToVmwareNodePoolOutputWithContext(context.Background())
}
func (i *VmwareNodePool) ToVmwareNodePoolOutputWithContext(ctx context.Context) VmwareNodePoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(VmwareNodePoolOutput)
}
type VmwareNodePoolOutput struct{ *pulumi.OutputState }
func (VmwareNodePoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VmwareNodePool)(nil)).Elem()
}
func (o VmwareNodePoolOutput) ToVmwareNodePoolOutput() VmwareNodePoolOutput {
return o
}
func (o VmwareNodePoolOutput) ToVmwareNodePoolOutputWithContext(ctx context.Context) VmwareNodePoolOutput {
return o
}
// Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
func (o VmwareNodePoolOutput) Annotations() pulumi.StringMapOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringMapOutput { return v.Annotations }).(pulumi.StringMapOutput)
}
// The node configuration of the node pool.
func (o VmwareNodePoolOutput) Config() VmwareNodeConfigResponseOutput {
return o.ApplyT(func(v *VmwareNodePool) VmwareNodeConfigResponseOutput { return v.Config }).(VmwareNodeConfigResponseOutput)
}
// The time at which this node pool was created.
func (o VmwareNodePoolOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// The time at which this node pool was deleted. If the resource is not deleted, this must be empty
func (o VmwareNodePoolOutput) DeleteTime() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.DeleteTime }).(pulumi.StringOutput)
}
// The display name for the node pool.
func (o VmwareNodePoolOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
func (o VmwareNodePoolOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
func (o VmwareNodePoolOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Immutable. The resource name of this node pool.
func (o VmwareNodePoolOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Node pool autoscaling config for the node pool.
func (o VmwareNodePoolOutput) NodePoolAutoscaling() VmwareNodePoolAutoscalingConfigResponseOutput {
return o.ApplyT(func(v *VmwareNodePool) VmwareNodePoolAutoscalingConfigResponseOutput { return v.NodePoolAutoscaling }).(VmwareNodePoolAutoscalingConfigResponseOutput)
}
// Anthos version for the node pool. Defaults to the user cluster version.
func (o VmwareNodePoolOutput) OnPremVersion() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.OnPremVersion }).(pulumi.StringOutput)
}
func (o VmwareNodePoolOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// If set, there are currently changes in flight to the node pool.
func (o VmwareNodePoolOutput) Reconciling() pulumi.BoolOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.BoolOutput { return v.Reconciling }).(pulumi.BoolOutput)
}
// The current state of the node pool.
func (o VmwareNodePoolOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// ResourceStatus representing the detailed VMware node pool state.
func (o VmwareNodePoolOutput) Status() ResourceStatusResponseOutput {
return o.ApplyT(func(v *VmwareNodePool) ResourceStatusResponseOutput { return v.Status }).(ResourceStatusResponseOutput)
}
// The unique identifier of the node pool.
func (o VmwareNodePoolOutput) Uid() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.Uid }).(pulumi.StringOutput)
}
// The time at which this node pool was last updated.
func (o VmwareNodePoolOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func (o VmwareNodePoolOutput) VmwareClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringOutput { return v.VmwareClusterId }).(pulumi.StringOutput)
}
// The ID to use for the node pool, which will become the final component of the node pool's resource name. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted to be a UUID (or UUID-like: anything matching /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
func (o VmwareNodePoolOutput) VmwareNodePoolId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VmwareNodePool) pulumi.StringPtrOutput { return v.VmwareNodePoolId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VmwareNodePoolInput)(nil)).Elem(), &VmwareNodePool{})
pulumi.RegisterOutputType(VmwareNodePoolOutput{})
}