/
regionInstanceGroupManager.go
459 lines (401 loc) · 35.9 KB
/
regionInstanceGroupManager.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
// 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 alpha
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
type RegionInstanceGroupManager struct {
pulumi.CustomResourceState
// Specifies configuration that overrides the instance template configuration for the group.
AllInstancesConfig InstanceGroupManagerAllInstancesConfigResponseOutput `pulumi:"allInstancesConfig"`
// The autohealing policy for this managed instance group. You can specify only one value.
AutoHealingPolicies InstanceGroupManagerAutoHealingPolicyResponseArrayOutput `pulumi:"autoHealingPolicies"`
// The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
BaseInstanceName pulumi.StringOutput `pulumi:"baseInstanceName"`
// The creation timestamp for this managed instance group in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
CurrentActions InstanceGroupManagerActionsSummaryResponseOutput `pulumi:"currentActions"`
// An optional description of this resource.
Description pulumi.StringOutput `pulumi:"description"`
// Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
DistributionPolicy DistributionPolicyResponseOutput `pulumi:"distributionPolicy"`
// The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
FailoverAction pulumi.StringOutput `pulumi:"failoverAction"`
// Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
Fingerprint pulumi.StringOutput `pulumi:"fingerprint"`
// Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.
InstanceFlexibilityPolicy InstanceGroupManagerInstanceFlexibilityPolicyResponseOutput `pulumi:"instanceFlexibilityPolicy"`
// The URL of the Instance Group resource.
InstanceGroup pulumi.StringOutput `pulumi:"instanceGroup"`
// The repair policy for this managed instance group.
InstanceLifecyclePolicy InstanceGroupManagerInstanceLifecyclePolicyResponseOutput `pulumi:"instanceLifecyclePolicy"`
// The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
InstanceTemplate pulumi.StringOutput `pulumi:"instanceTemplate"`
// The resource type, which is always compute#instanceGroupManager for managed instance groups.
Kind pulumi.StringOutput `pulumi:"kind"`
// Pagination behavior of the listManagedInstances API method for this managed instance group.
ListManagedInstancesResults pulumi.StringOutput `pulumi:"listManagedInstancesResults"`
// The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Name pulumi.StringOutput `pulumi:"name"`
// Named ports configured for the Instance Groups complementary to this Instance Group Manager.
NamedPorts NamedPortResponseArrayOutput `pulumi:"namedPorts"`
Project pulumi.StringOutput `pulumi:"project"`
Region pulumi.StringOutput `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
// The URL for this managed instance group. The server defines this URL.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// Server-defined URL for this resource with the resource id.
SelfLinkWithId pulumi.StringOutput `pulumi:"selfLinkWithId"`
// The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
ServiceAccount pulumi.StringOutput `pulumi:"serviceAccount"`
// Standby policy for stopped and suspended instances.
StandbyPolicy InstanceGroupManagerStandbyPolicyResponseOutput `pulumi:"standbyPolicy"`
// Stateful configuration for this Instanced Group Manager
StatefulPolicy StatefulPolicyResponseOutput `pulumi:"statefulPolicy"`
// The status of this managed instance group.
Status InstanceGroupManagerStatusResponseOutput `pulumi:"status"`
// The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
TargetPools pulumi.StringArrayOutput `pulumi:"targetPools"`
// The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
TargetSize pulumi.IntOutput `pulumi:"targetSize"`
// The unit of measure for the target size.
TargetSizeUnit pulumi.StringOutput `pulumi:"targetSizeUnit"`
// The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method.
TargetStoppedSize pulumi.IntOutput `pulumi:"targetStoppedSize"`
// The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method.
TargetSuspendedSize pulumi.IntOutput `pulumi:"targetSuspendedSize"`
// The update policy for this managed instance group.
UpdatePolicy InstanceGroupManagerUpdatePolicyResponseOutput `pulumi:"updatePolicy"`
// Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
Versions InstanceGroupManagerVersionResponseArrayOutput `pulumi:"versions"`
// The URL of a zone where the managed instance group is located (for zonal resources).
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewRegionInstanceGroupManager registers a new resource with the given unique name, arguments, and options.
func NewRegionInstanceGroupManager(ctx *pulumi.Context,
name string, args *RegionInstanceGroupManagerArgs, opts ...pulumi.ResourceOption) (*RegionInstanceGroupManager, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
"region",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RegionInstanceGroupManager
err := ctx.RegisterResource("google-native:compute/alpha:RegionInstanceGroupManager", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegionInstanceGroupManager gets an existing RegionInstanceGroupManager 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 GetRegionInstanceGroupManager(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegionInstanceGroupManagerState, opts ...pulumi.ResourceOption) (*RegionInstanceGroupManager, error) {
var resource RegionInstanceGroupManager
err := ctx.ReadResource("google-native:compute/alpha:RegionInstanceGroupManager", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RegionInstanceGroupManager resources.
type regionInstanceGroupManagerState struct {
}
type RegionInstanceGroupManagerState struct {
}
func (RegionInstanceGroupManagerState) ElementType() reflect.Type {
return reflect.TypeOf((*regionInstanceGroupManagerState)(nil)).Elem()
}
type regionInstanceGroupManagerArgs struct {
// Specifies configuration that overrides the instance template configuration for the group.
AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `pulumi:"allInstancesConfig"`
// The autohealing policy for this managed instance group. You can specify only one value.
AutoHealingPolicies []InstanceGroupManagerAutoHealingPolicy `pulumi:"autoHealingPolicies"`
// The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
BaseInstanceName *string `pulumi:"baseInstanceName"`
// An optional description of this resource.
Description *string `pulumi:"description"`
// Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
DistributionPolicy *DistributionPolicy `pulumi:"distributionPolicy"`
// The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
FailoverAction *RegionInstanceGroupManagerFailoverAction `pulumi:"failoverAction"`
// Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.
InstanceFlexibilityPolicy *InstanceGroupManagerInstanceFlexibilityPolicy `pulumi:"instanceFlexibilityPolicy"`
// The repair policy for this managed instance group.
InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `pulumi:"instanceLifecyclePolicy"`
// The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
InstanceTemplate *string `pulumi:"instanceTemplate"`
// Pagination behavior of the listManagedInstances API method for this managed instance group.
ListManagedInstancesResults *RegionInstanceGroupManagerListManagedInstancesResults `pulumi:"listManagedInstancesResults"`
// The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Name *string `pulumi:"name"`
// Named ports configured for the Instance Groups complementary to this Instance Group Manager.
NamedPorts []NamedPort `pulumi:"namedPorts"`
Project *string `pulumi:"project"`
Region string `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId *string `pulumi:"requestId"`
// The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
ServiceAccount *string `pulumi:"serviceAccount"`
// Standby policy for stopped and suspended instances.
StandbyPolicy *InstanceGroupManagerStandbyPolicy `pulumi:"standbyPolicy"`
// Stateful configuration for this Instanced Group Manager
StatefulPolicy *StatefulPolicy `pulumi:"statefulPolicy"`
// The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
TargetPools []string `pulumi:"targetPools"`
// The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
TargetSize *int `pulumi:"targetSize"`
// The unit of measure for the target size.
TargetSizeUnit *RegionInstanceGroupManagerTargetSizeUnit `pulumi:"targetSizeUnit"`
// The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method.
TargetStoppedSize *int `pulumi:"targetStoppedSize"`
// The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method.
TargetSuspendedSize *int `pulumi:"targetSuspendedSize"`
// The update policy for this managed instance group.
UpdatePolicy *InstanceGroupManagerUpdatePolicy `pulumi:"updatePolicy"`
// Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
Versions []InstanceGroupManagerVersion `pulumi:"versions"`
}
// The set of arguments for constructing a RegionInstanceGroupManager resource.
type RegionInstanceGroupManagerArgs struct {
// Specifies configuration that overrides the instance template configuration for the group.
AllInstancesConfig InstanceGroupManagerAllInstancesConfigPtrInput
// The autohealing policy for this managed instance group. You can specify only one value.
AutoHealingPolicies InstanceGroupManagerAutoHealingPolicyArrayInput
// The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
BaseInstanceName pulumi.StringPtrInput
// An optional description of this resource.
Description pulumi.StringPtrInput
// Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
DistributionPolicy DistributionPolicyPtrInput
// The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
FailoverAction RegionInstanceGroupManagerFailoverActionPtrInput
// Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.
InstanceFlexibilityPolicy InstanceGroupManagerInstanceFlexibilityPolicyPtrInput
// The repair policy for this managed instance group.
InstanceLifecyclePolicy InstanceGroupManagerInstanceLifecyclePolicyPtrInput
// The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
InstanceTemplate pulumi.StringPtrInput
// Pagination behavior of the listManagedInstances API method for this managed instance group.
ListManagedInstancesResults RegionInstanceGroupManagerListManagedInstancesResultsPtrInput
// The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
Name pulumi.StringPtrInput
// Named ports configured for the Instance Groups complementary to this Instance Group Manager.
NamedPorts NamedPortArrayInput
Project pulumi.StringPtrInput
Region pulumi.StringInput
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrInput
// The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
ServiceAccount pulumi.StringPtrInput
// Standby policy for stopped and suspended instances.
StandbyPolicy InstanceGroupManagerStandbyPolicyPtrInput
// Stateful configuration for this Instanced Group Manager
StatefulPolicy StatefulPolicyPtrInput
// The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
TargetPools pulumi.StringArrayInput
// The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
TargetSize pulumi.IntPtrInput
// The unit of measure for the target size.
TargetSizeUnit RegionInstanceGroupManagerTargetSizeUnitPtrInput
// The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method.
TargetStoppedSize pulumi.IntPtrInput
// The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method.
TargetSuspendedSize pulumi.IntPtrInput
// The update policy for this managed instance group.
UpdatePolicy InstanceGroupManagerUpdatePolicyPtrInput
// Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
Versions InstanceGroupManagerVersionArrayInput
}
func (RegionInstanceGroupManagerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*regionInstanceGroupManagerArgs)(nil)).Elem()
}
type RegionInstanceGroupManagerInput interface {
pulumi.Input
ToRegionInstanceGroupManagerOutput() RegionInstanceGroupManagerOutput
ToRegionInstanceGroupManagerOutputWithContext(ctx context.Context) RegionInstanceGroupManagerOutput
}
func (*RegionInstanceGroupManager) ElementType() reflect.Type {
return reflect.TypeOf((**RegionInstanceGroupManager)(nil)).Elem()
}
func (i *RegionInstanceGroupManager) ToRegionInstanceGroupManagerOutput() RegionInstanceGroupManagerOutput {
return i.ToRegionInstanceGroupManagerOutputWithContext(context.Background())
}
func (i *RegionInstanceGroupManager) ToRegionInstanceGroupManagerOutputWithContext(ctx context.Context) RegionInstanceGroupManagerOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegionInstanceGroupManagerOutput)
}
type RegionInstanceGroupManagerOutput struct{ *pulumi.OutputState }
func (RegionInstanceGroupManagerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RegionInstanceGroupManager)(nil)).Elem()
}
func (o RegionInstanceGroupManagerOutput) ToRegionInstanceGroupManagerOutput() RegionInstanceGroupManagerOutput {
return o
}
func (o RegionInstanceGroupManagerOutput) ToRegionInstanceGroupManagerOutputWithContext(ctx context.Context) RegionInstanceGroupManagerOutput {
return o
}
// Specifies configuration that overrides the instance template configuration for the group.
func (o RegionInstanceGroupManagerOutput) AllInstancesConfig() InstanceGroupManagerAllInstancesConfigResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerAllInstancesConfigResponseOutput {
return v.AllInstancesConfig
}).(InstanceGroupManagerAllInstancesConfigResponseOutput)
}
// The autohealing policy for this managed instance group. You can specify only one value.
func (o RegionInstanceGroupManagerOutput) AutoHealingPolicies() InstanceGroupManagerAutoHealingPolicyResponseArrayOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerAutoHealingPolicyResponseArrayOutput {
return v.AutoHealingPolicies
}).(InstanceGroupManagerAutoHealingPolicyResponseArrayOutput)
}
// The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
func (o RegionInstanceGroupManagerOutput) BaseInstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.BaseInstanceName }).(pulumi.StringOutput)
}
// The creation timestamp for this managed instance group in RFC3339 text format.
func (o RegionInstanceGroupManagerOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
func (o RegionInstanceGroupManagerOutput) CurrentActions() InstanceGroupManagerActionsSummaryResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerActionsSummaryResponseOutput {
return v.CurrentActions
}).(InstanceGroupManagerActionsSummaryResponseOutput)
}
// An optional description of this resource.
func (o RegionInstanceGroupManagerOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
func (o RegionInstanceGroupManagerOutput) DistributionPolicy() DistributionPolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) DistributionPolicyResponseOutput { return v.DistributionPolicy }).(DistributionPolicyResponseOutput)
}
// The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
func (o RegionInstanceGroupManagerOutput) FailoverAction() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.FailoverAction }).(pulumi.StringOutput)
}
// Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
func (o RegionInstanceGroupManagerOutput) Fingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Fingerprint }).(pulumi.StringOutput)
}
// Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.
func (o RegionInstanceGroupManagerOutput) InstanceFlexibilityPolicy() InstanceGroupManagerInstanceFlexibilityPolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerInstanceFlexibilityPolicyResponseOutput {
return v.InstanceFlexibilityPolicy
}).(InstanceGroupManagerInstanceFlexibilityPolicyResponseOutput)
}
// The URL of the Instance Group resource.
func (o RegionInstanceGroupManagerOutput) InstanceGroup() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.InstanceGroup }).(pulumi.StringOutput)
}
// The repair policy for this managed instance group.
func (o RegionInstanceGroupManagerOutput) InstanceLifecyclePolicy() InstanceGroupManagerInstanceLifecyclePolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerInstanceLifecyclePolicyResponseOutput {
return v.InstanceLifecyclePolicy
}).(InstanceGroupManagerInstanceLifecyclePolicyResponseOutput)
}
// The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
func (o RegionInstanceGroupManagerOutput) InstanceTemplate() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.InstanceTemplate }).(pulumi.StringOutput)
}
// The resource type, which is always compute#instanceGroupManager for managed instance groups.
func (o RegionInstanceGroupManagerOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// Pagination behavior of the listManagedInstances API method for this managed instance group.
func (o RegionInstanceGroupManagerOutput) ListManagedInstancesResults() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.ListManagedInstancesResults }).(pulumi.StringOutput)
}
// The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
func (o RegionInstanceGroupManagerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Named ports configured for the Instance Groups complementary to this Instance Group Manager.
func (o RegionInstanceGroupManagerOutput) NamedPorts() NamedPortResponseArrayOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) NamedPortResponseArrayOutput { return v.NamedPorts }).(NamedPortResponseArrayOutput)
}
func (o RegionInstanceGroupManagerOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
func (o RegionInstanceGroupManagerOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
func (o RegionInstanceGroupManagerOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
// The URL for this managed instance group. The server defines this URL.
func (o RegionInstanceGroupManagerOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// Server-defined URL for this resource with the resource id.
func (o RegionInstanceGroupManagerOutput) SelfLinkWithId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.SelfLinkWithId }).(pulumi.StringOutput)
}
// The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
func (o RegionInstanceGroupManagerOutput) ServiceAccount() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.ServiceAccount }).(pulumi.StringOutput)
}
// Standby policy for stopped and suspended instances.
func (o RegionInstanceGroupManagerOutput) StandbyPolicy() InstanceGroupManagerStandbyPolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerStandbyPolicyResponseOutput {
return v.StandbyPolicy
}).(InstanceGroupManagerStandbyPolicyResponseOutput)
}
// Stateful configuration for this Instanced Group Manager
func (o RegionInstanceGroupManagerOutput) StatefulPolicy() StatefulPolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) StatefulPolicyResponseOutput { return v.StatefulPolicy }).(StatefulPolicyResponseOutput)
}
// The status of this managed instance group.
func (o RegionInstanceGroupManagerOutput) Status() InstanceGroupManagerStatusResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerStatusResponseOutput { return v.Status }).(InstanceGroupManagerStatusResponseOutput)
}
// The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
func (o RegionInstanceGroupManagerOutput) TargetPools() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringArrayOutput { return v.TargetPools }).(pulumi.StringArrayOutput)
}
// The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
func (o RegionInstanceGroupManagerOutput) TargetSize() pulumi.IntOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.IntOutput { return v.TargetSize }).(pulumi.IntOutput)
}
// The unit of measure for the target size.
func (o RegionInstanceGroupManagerOutput) TargetSizeUnit() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.TargetSizeUnit }).(pulumi.StringOutput)
}
// The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method.
func (o RegionInstanceGroupManagerOutput) TargetStoppedSize() pulumi.IntOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.IntOutput { return v.TargetStoppedSize }).(pulumi.IntOutput)
}
// The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method.
func (o RegionInstanceGroupManagerOutput) TargetSuspendedSize() pulumi.IntOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.IntOutput { return v.TargetSuspendedSize }).(pulumi.IntOutput)
}
// The update policy for this managed instance group.
func (o RegionInstanceGroupManagerOutput) UpdatePolicy() InstanceGroupManagerUpdatePolicyResponseOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerUpdatePolicyResponseOutput {
return v.UpdatePolicy
}).(InstanceGroupManagerUpdatePolicyResponseOutput)
}
// Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
func (o RegionInstanceGroupManagerOutput) Versions() InstanceGroupManagerVersionResponseArrayOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) InstanceGroupManagerVersionResponseArrayOutput { return v.Versions }).(InstanceGroupManagerVersionResponseArrayOutput)
}
// The URL of a zone where the managed instance group is located (for zonal resources).
func (o RegionInstanceGroupManagerOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *RegionInstanceGroupManager) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegionInstanceGroupManagerInput)(nil)).Elem(), &RegionInstanceGroupManager{})
pulumi.RegisterOutputType(RegionInstanceGroupManagerOutput{})
}