/
pulumiTypes.go
411 lines (330 loc) · 19.2 KB
/
pulumiTypes.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
// 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 v1beta1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
// Network describes the network configuration for a `WorkerPool`.
type NetworkConfig struct {
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
PeeredNetwork string `pulumi:"peeredNetwork"`
}
// NetworkConfigInput is an input type that accepts NetworkConfigArgs and NetworkConfigOutput values.
// You can construct a concrete instance of `NetworkConfigInput` via:
//
// NetworkConfigArgs{...}
type NetworkConfigInput interface {
pulumi.Input
ToNetworkConfigOutput() NetworkConfigOutput
ToNetworkConfigOutputWithContext(context.Context) NetworkConfigOutput
}
// Network describes the network configuration for a `WorkerPool`.
type NetworkConfigArgs struct {
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
PeeredNetwork pulumi.StringInput `pulumi:"peeredNetwork"`
}
func (NetworkConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*NetworkConfig)(nil)).Elem()
}
func (i NetworkConfigArgs) ToNetworkConfigOutput() NetworkConfigOutput {
return i.ToNetworkConfigOutputWithContext(context.Background())
}
func (i NetworkConfigArgs) ToNetworkConfigOutputWithContext(ctx context.Context) NetworkConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkConfigOutput)
}
func (i NetworkConfigArgs) ToNetworkConfigPtrOutput() NetworkConfigPtrOutput {
return i.ToNetworkConfigPtrOutputWithContext(context.Background())
}
func (i NetworkConfigArgs) ToNetworkConfigPtrOutputWithContext(ctx context.Context) NetworkConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkConfigOutput).ToNetworkConfigPtrOutputWithContext(ctx)
}
// NetworkConfigPtrInput is an input type that accepts NetworkConfigArgs, NetworkConfigPtr and NetworkConfigPtrOutput values.
// You can construct a concrete instance of `NetworkConfigPtrInput` via:
//
// NetworkConfigArgs{...}
//
// or:
//
// nil
type NetworkConfigPtrInput interface {
pulumi.Input
ToNetworkConfigPtrOutput() NetworkConfigPtrOutput
ToNetworkConfigPtrOutputWithContext(context.Context) NetworkConfigPtrOutput
}
type networkConfigPtrType NetworkConfigArgs
func NetworkConfigPtr(v *NetworkConfigArgs) NetworkConfigPtrInput {
return (*networkConfigPtrType)(v)
}
func (*networkConfigPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**NetworkConfig)(nil)).Elem()
}
func (i *networkConfigPtrType) ToNetworkConfigPtrOutput() NetworkConfigPtrOutput {
return i.ToNetworkConfigPtrOutputWithContext(context.Background())
}
func (i *networkConfigPtrType) ToNetworkConfigPtrOutputWithContext(ctx context.Context) NetworkConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkConfigPtrOutput)
}
// Network describes the network configuration for a `WorkerPool`.
type NetworkConfigOutput struct{ *pulumi.OutputState }
func (NetworkConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NetworkConfig)(nil)).Elem()
}
func (o NetworkConfigOutput) ToNetworkConfigOutput() NetworkConfigOutput {
return o
}
func (o NetworkConfigOutput) ToNetworkConfigOutputWithContext(ctx context.Context) NetworkConfigOutput {
return o
}
func (o NetworkConfigOutput) ToNetworkConfigPtrOutput() NetworkConfigPtrOutput {
return o.ToNetworkConfigPtrOutputWithContext(context.Background())
}
func (o NetworkConfigOutput) ToNetworkConfigPtrOutputWithContext(ctx context.Context) NetworkConfigPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v NetworkConfig) *NetworkConfig {
return &v
}).(NetworkConfigPtrOutput)
}
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
func (o NetworkConfigOutput) PeeredNetwork() pulumi.StringOutput {
return o.ApplyT(func(v NetworkConfig) string { return v.PeeredNetwork }).(pulumi.StringOutput)
}
type NetworkConfigPtrOutput struct{ *pulumi.OutputState }
func (NetworkConfigPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NetworkConfig)(nil)).Elem()
}
func (o NetworkConfigPtrOutput) ToNetworkConfigPtrOutput() NetworkConfigPtrOutput {
return o
}
func (o NetworkConfigPtrOutput) ToNetworkConfigPtrOutputWithContext(ctx context.Context) NetworkConfigPtrOutput {
return o
}
func (o NetworkConfigPtrOutput) Elem() NetworkConfigOutput {
return o.ApplyT(func(v *NetworkConfig) NetworkConfig {
if v != nil {
return *v
}
var ret NetworkConfig
return ret
}).(NetworkConfigOutput)
}
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
func (o NetworkConfigPtrOutput) PeeredNetwork() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NetworkConfig) *string {
if v == nil {
return nil
}
return &v.PeeredNetwork
}).(pulumi.StringPtrOutput)
}
// Network describes the network configuration for a `WorkerPool`.
type NetworkConfigResponse struct {
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
PeeredNetwork string `pulumi:"peeredNetwork"`
}
// Network describes the network configuration for a `WorkerPool`.
type NetworkConfigResponseOutput struct{ *pulumi.OutputState }
func (NetworkConfigResponseOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NetworkConfigResponse)(nil)).Elem()
}
func (o NetworkConfigResponseOutput) ToNetworkConfigResponseOutput() NetworkConfigResponseOutput {
return o
}
func (o NetworkConfigResponseOutput) ToNetworkConfigResponseOutputWithContext(ctx context.Context) NetworkConfigResponseOutput {
return o
}
// Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)
func (o NetworkConfigResponseOutput) PeeredNetwork() pulumi.StringOutput {
return o.ApplyT(func(v NetworkConfigResponse) string { return v.PeeredNetwork }).(pulumi.StringOutput)
}
// Defines the configuration to be used for creating workers in the pool.
type WorkerConfig struct {
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
DiskSizeGb *string `pulumi:"diskSizeGb"`
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
MachineType *string `pulumi:"machineType"`
// If true, workers are created without any public address, which prevents network egress to public IPs.
NoExternalIp *bool `pulumi:"noExternalIp"`
}
// WorkerConfigInput is an input type that accepts WorkerConfigArgs and WorkerConfigOutput values.
// You can construct a concrete instance of `WorkerConfigInput` via:
//
// WorkerConfigArgs{...}
type WorkerConfigInput interface {
pulumi.Input
ToWorkerConfigOutput() WorkerConfigOutput
ToWorkerConfigOutputWithContext(context.Context) WorkerConfigOutput
}
// Defines the configuration to be used for creating workers in the pool.
type WorkerConfigArgs struct {
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
DiskSizeGb pulumi.StringPtrInput `pulumi:"diskSizeGb"`
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
MachineType pulumi.StringPtrInput `pulumi:"machineType"`
// If true, workers are created without any public address, which prevents network egress to public IPs.
NoExternalIp pulumi.BoolPtrInput `pulumi:"noExternalIp"`
}
func (WorkerConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*WorkerConfig)(nil)).Elem()
}
func (i WorkerConfigArgs) ToWorkerConfigOutput() WorkerConfigOutput {
return i.ToWorkerConfigOutputWithContext(context.Background())
}
func (i WorkerConfigArgs) ToWorkerConfigOutputWithContext(ctx context.Context) WorkerConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkerConfigOutput)
}
func (i WorkerConfigArgs) ToWorkerConfigPtrOutput() WorkerConfigPtrOutput {
return i.ToWorkerConfigPtrOutputWithContext(context.Background())
}
func (i WorkerConfigArgs) ToWorkerConfigPtrOutputWithContext(ctx context.Context) WorkerConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkerConfigOutput).ToWorkerConfigPtrOutputWithContext(ctx)
}
// WorkerConfigPtrInput is an input type that accepts WorkerConfigArgs, WorkerConfigPtr and WorkerConfigPtrOutput values.
// You can construct a concrete instance of `WorkerConfigPtrInput` via:
//
// WorkerConfigArgs{...}
//
// or:
//
// nil
type WorkerConfigPtrInput interface {
pulumi.Input
ToWorkerConfigPtrOutput() WorkerConfigPtrOutput
ToWorkerConfigPtrOutputWithContext(context.Context) WorkerConfigPtrOutput
}
type workerConfigPtrType WorkerConfigArgs
func WorkerConfigPtr(v *WorkerConfigArgs) WorkerConfigPtrInput {
return (*workerConfigPtrType)(v)
}
func (*workerConfigPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**WorkerConfig)(nil)).Elem()
}
func (i *workerConfigPtrType) ToWorkerConfigPtrOutput() WorkerConfigPtrOutput {
return i.ToWorkerConfigPtrOutputWithContext(context.Background())
}
func (i *workerConfigPtrType) ToWorkerConfigPtrOutputWithContext(ctx context.Context) WorkerConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkerConfigPtrOutput)
}
// Defines the configuration to be used for creating workers in the pool.
type WorkerConfigOutput struct{ *pulumi.OutputState }
func (WorkerConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WorkerConfig)(nil)).Elem()
}
func (o WorkerConfigOutput) ToWorkerConfigOutput() WorkerConfigOutput {
return o
}
func (o WorkerConfigOutput) ToWorkerConfigOutputWithContext(ctx context.Context) WorkerConfigOutput {
return o
}
func (o WorkerConfigOutput) ToWorkerConfigPtrOutput() WorkerConfigPtrOutput {
return o.ToWorkerConfigPtrOutputWithContext(context.Background())
}
func (o WorkerConfigOutput) ToWorkerConfigPtrOutputWithContext(ctx context.Context) WorkerConfigPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v WorkerConfig) *WorkerConfig {
return &v
}).(WorkerConfigPtrOutput)
}
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
func (o WorkerConfigOutput) DiskSizeGb() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkerConfig) *string { return v.DiskSizeGb }).(pulumi.StringPtrOutput)
}
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
func (o WorkerConfigOutput) MachineType() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkerConfig) *string { return v.MachineType }).(pulumi.StringPtrOutput)
}
// If true, workers are created without any public address, which prevents network egress to public IPs.
func (o WorkerConfigOutput) NoExternalIp() pulumi.BoolPtrOutput {
return o.ApplyT(func(v WorkerConfig) *bool { return v.NoExternalIp }).(pulumi.BoolPtrOutput)
}
type WorkerConfigPtrOutput struct{ *pulumi.OutputState }
func (WorkerConfigPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkerConfig)(nil)).Elem()
}
func (o WorkerConfigPtrOutput) ToWorkerConfigPtrOutput() WorkerConfigPtrOutput {
return o
}
func (o WorkerConfigPtrOutput) ToWorkerConfigPtrOutputWithContext(ctx context.Context) WorkerConfigPtrOutput {
return o
}
func (o WorkerConfigPtrOutput) Elem() WorkerConfigOutput {
return o.ApplyT(func(v *WorkerConfig) WorkerConfig {
if v != nil {
return *v
}
var ret WorkerConfig
return ret
}).(WorkerConfigOutput)
}
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
func (o WorkerConfigPtrOutput) DiskSizeGb() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkerConfig) *string {
if v == nil {
return nil
}
return v.DiskSizeGb
}).(pulumi.StringPtrOutput)
}
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
func (o WorkerConfigPtrOutput) MachineType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkerConfig) *string {
if v == nil {
return nil
}
return v.MachineType
}).(pulumi.StringPtrOutput)
}
// If true, workers are created without any public address, which prevents network egress to public IPs.
func (o WorkerConfigPtrOutput) NoExternalIp() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *WorkerConfig) *bool {
if v == nil {
return nil
}
return v.NoExternalIp
}).(pulumi.BoolPtrOutput)
}
// Defines the configuration to be used for creating workers in the pool.
type WorkerConfigResponse struct {
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
DiskSizeGb string `pulumi:"diskSizeGb"`
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
MachineType string `pulumi:"machineType"`
// If true, workers are created without any public address, which prevents network egress to public IPs.
NoExternalIp bool `pulumi:"noExternalIp"`
}
// Defines the configuration to be used for creating workers in the pool.
type WorkerConfigResponseOutput struct{ *pulumi.OutputState }
func (WorkerConfigResponseOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WorkerConfigResponse)(nil)).Elem()
}
func (o WorkerConfigResponseOutput) ToWorkerConfigResponseOutput() WorkerConfigResponseOutput {
return o
}
func (o WorkerConfigResponseOutput) ToWorkerConfigResponseOutputWithContext(ctx context.Context) WorkerConfigResponseOutput {
return o
}
// Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.
func (o WorkerConfigResponseOutput) DiskSizeGb() pulumi.StringOutput {
return o.ApplyT(func(v WorkerConfigResponse) string { return v.DiskSizeGb }).(pulumi.StringOutput)
}
// Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.
func (o WorkerConfigResponseOutput) MachineType() pulumi.StringOutput {
return o.ApplyT(func(v WorkerConfigResponse) string { return v.MachineType }).(pulumi.StringOutput)
}
// If true, workers are created without any public address, which prevents network egress to public IPs.
func (o WorkerConfigResponseOutput) NoExternalIp() pulumi.BoolOutput {
return o.ApplyT(func(v WorkerConfigResponse) bool { return v.NoExternalIp }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NetworkConfigInput)(nil)).Elem(), NetworkConfigArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*NetworkConfigPtrInput)(nil)).Elem(), NetworkConfigArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkerConfigInput)(nil)).Elem(), WorkerConfigArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkerConfigPtrInput)(nil)).Elem(), WorkerConfigArgs{})
pulumi.RegisterOutputType(NetworkConfigOutput{})
pulumi.RegisterOutputType(NetworkConfigPtrOutput{})
pulumi.RegisterOutputType(NetworkConfigResponseOutput{})
pulumi.RegisterOutputType(WorkerConfigOutput{})
pulumi.RegisterOutputType(WorkerConfigPtrOutput{})
pulumi.RegisterOutputType(WorkerConfigResponseOutput{})
}