/
instanceGroupManager.go
930 lines (858 loc) · 51.1 KB
/
instanceGroupManager.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
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
// 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 compute
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The Google Compute Engine Instance Group Manager API creates and manages pools
// of homogeneous Compute Engine virtual machine instances from a common instance
// template. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/manager)
// and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers)
//
// > **Note:** Use [compute.RegionInstanceGroupManager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) to create a regional (multi-zone) instance group manager.
//
// ## Example Usage
//
// ### With Top Level Instance Template (`Google` Provider)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// autohealing, err := compute.NewHealthCheck(ctx, "autohealing", &compute.HealthCheckArgs{
// Name: pulumi.String("autohealing-health-check"),
// CheckIntervalSec: pulumi.Int(5),
// TimeoutSec: pulumi.Int(5),
// HealthyThreshold: pulumi.Int(2),
// UnhealthyThreshold: pulumi.Int(10),
// HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
// RequestPath: pulumi.String("/healthz"),
// Port: pulumi.Int(8080),
// },
// })
// if err != nil {
// return err
// }
// _, err = compute.NewInstanceGroupManager(ctx, "appserver", &compute.InstanceGroupManagerArgs{
// Name: pulumi.String("appserver-igm"),
// BaseInstanceName: pulumi.String("app"),
// Zone: pulumi.String("us-central1-a"),
// Versions: compute.InstanceGroupManagerVersionArray{
// &compute.InstanceGroupManagerVersionArgs{
// InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
// },
// },
// AllInstancesConfig: &compute.InstanceGroupManagerAllInstancesConfigArgs{
// Metadata: pulumi.StringMap{
// "metadata_key": pulumi.String("metadata_value"),
// },
// Labels: pulumi.StringMap{
// "label_key": pulumi.String("label_value"),
// },
// },
// TargetPools: pulumi.StringArray{
// appserverGoogleComputeTargetPool.Id,
// },
// TargetSize: pulumi.Int(2),
// NamedPorts: compute.InstanceGroupManagerNamedPortArray{
// &compute.InstanceGroupManagerNamedPortArgs{
// Name: pulumi.String("customhttp"),
// Port: pulumi.Int(8888),
// },
// },
// AutoHealingPolicies: &compute.InstanceGroupManagerAutoHealingPoliciesArgs{
// HealthCheck: autohealing.ID(),
// InitialDelaySec: pulumi.Int(300),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Multiple Versions (`Google-Beta` Provider)
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewInstanceGroupManager(ctx, "appserver", &compute.InstanceGroupManagerArgs{
// Name: pulumi.String("appserver-igm"),
// BaseInstanceName: pulumi.String("app"),
// Zone: pulumi.String("us-central1-a"),
// TargetSize: pulumi.Int(5),
// Versions: compute.InstanceGroupManagerVersionArray{
// &compute.InstanceGroupManagerVersionArgs{
// Name: pulumi.String("appserver"),
// InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
// },
// &compute.InstanceGroupManagerVersionArgs{
// Name: pulumi.String("appserver-canary"),
// InstanceTemplate: pulumi.Any(appserver_canary.SelfLinkUnique),
// TargetSize: &compute.InstanceGroupManagerVersionTargetSizeArgs{
// Fixed: pulumi.Int(1),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Instance group managers can be imported using any of these accepted formats:
//
// * `projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}`
//
// * `{{project}}/{{zone}}/{{name}}`
//
// * `{{project}}/{{name}}`
//
// * `{{name}}`
//
// When using the `pulumi import` command, instance group managers can be imported using one of the formats above. For example:
//
// ```sh
// $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default {{project}}/{{zone}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default {{project}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default {{name}}
// ```
type InstanceGroupManager struct {
pulumi.CustomResourceState
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
AllInstancesConfig InstanceGroupManagerAllInstancesConfigPtrOutput `pulumi:"allInstancesConfig"`
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
AutoHealingPolicies InstanceGroupManagerAutoHealingPoliciesPtrOutput `pulumi:"autoHealingPolicies"`
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName pulumi.StringOutput `pulumi:"baseInstanceName"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// An optional textual description of the instance
// group manager.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The fingerprint of the instance group manager.
Fingerprint pulumi.StringOutput `pulumi:"fingerprint"`
// The full URL of the instance group created by the manager.
InstanceGroup pulumi.StringOutput `pulumi:"instanceGroup"`
// The instance lifecycle policy for this managed instance group.
InstanceLifecyclePolicy InstanceGroupManagerInstanceLifecyclePolicyOutput `pulumi:"instanceLifecyclePolicy"`
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
ListManagedInstancesResults pulumi.StringPtrOutput `pulumi:"listManagedInstancesResults"`
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
Name pulumi.StringOutput `pulumi:"name"`
// The named port configuration. See the section below
// for details on configuration.
NamedPorts InstanceGroupManagerNamedPortArrayOutput `pulumi:"namedPorts"`
Operation pulumi.StringOutput `pulumi:"operation"`
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
Params InstanceGroupManagerParamsPtrOutput `pulumi:"params"`
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// The URL of the created resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
StatefulDisks InstanceGroupManagerStatefulDiskArrayOutput `pulumi:"statefulDisks"`
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulExternalIps InstanceGroupManagerStatefulExternalIpArrayOutput `pulumi:"statefulExternalIps"`
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulInternalIps InstanceGroupManagerStatefulInternalIpArrayOutput `pulumi:"statefulInternalIps"`
// The status of this managed instance group.
Statuses InstanceGroupManagerStatusArrayOutput `pulumi:"statuses"`
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools pulumi.StringArrayOutput `pulumi:"targetPools"`
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize pulumi.IntOutput `pulumi:"targetSize"`
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
UpdatePolicy InstanceGroupManagerUpdatePolicyOutput `pulumi:"updatePolicy"`
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Versions InstanceGroupManagerVersionArrayOutput `pulumi:"versions"`
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
WaitForInstances pulumi.BoolPtrOutput `pulumi:"waitForInstances"`
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
WaitForInstancesStatus pulumi.StringPtrOutput `pulumi:"waitForInstancesStatus"`
// The zone that instances in this group should be created
// in.
//
// ***
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewInstanceGroupManager registers a new resource with the given unique name, arguments, and options.
func NewInstanceGroupManager(ctx *pulumi.Context,
name string, args *InstanceGroupManagerArgs, opts ...pulumi.ResourceOption) (*InstanceGroupManager, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BaseInstanceName == nil {
return nil, errors.New("invalid value for required argument 'BaseInstanceName'")
}
if args.Versions == nil {
return nil, errors.New("invalid value for required argument 'Versions'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InstanceGroupManager
err := ctx.RegisterResource("gcp:compute/instanceGroupManager:InstanceGroupManager", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstanceGroupManager gets an existing InstanceGroupManager 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 GetInstanceGroupManager(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceGroupManagerState, opts ...pulumi.ResourceOption) (*InstanceGroupManager, error) {
var resource InstanceGroupManager
err := ctx.ReadResource("gcp:compute/instanceGroupManager:InstanceGroupManager", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InstanceGroupManager resources.
type instanceGroupManagerState struct {
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `pulumi:"allInstancesConfig"`
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
AutoHealingPolicies *InstanceGroupManagerAutoHealingPolicies `pulumi:"autoHealingPolicies"`
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName *string `pulumi:"baseInstanceName"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp *string `pulumi:"creationTimestamp"`
// An optional textual description of the instance
// group manager.
Description *string `pulumi:"description"`
// The fingerprint of the instance group manager.
Fingerprint *string `pulumi:"fingerprint"`
// The full URL of the instance group created by the manager.
InstanceGroup *string `pulumi:"instanceGroup"`
// The instance lifecycle policy for this managed instance group.
InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `pulumi:"instanceLifecyclePolicy"`
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
ListManagedInstancesResults *string `pulumi:"listManagedInstancesResults"`
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
Name *string `pulumi:"name"`
// The named port configuration. See the section below
// for details on configuration.
NamedPorts []InstanceGroupManagerNamedPort `pulumi:"namedPorts"`
Operation *string `pulumi:"operation"`
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
Params *InstanceGroupManagerParams `pulumi:"params"`
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The URL of the created resource.
SelfLink *string `pulumi:"selfLink"`
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
StatefulDisks []InstanceGroupManagerStatefulDisk `pulumi:"statefulDisks"`
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulExternalIps []InstanceGroupManagerStatefulExternalIp `pulumi:"statefulExternalIps"`
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulInternalIps []InstanceGroupManagerStatefulInternalIp `pulumi:"statefulInternalIps"`
// The status of this managed instance group.
Statuses []InstanceGroupManagerStatus `pulumi:"statuses"`
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools []string `pulumi:"targetPools"`
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize *int `pulumi:"targetSize"`
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
UpdatePolicy *InstanceGroupManagerUpdatePolicy `pulumi:"updatePolicy"`
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Versions []InstanceGroupManagerVersion `pulumi:"versions"`
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
WaitForInstances *bool `pulumi:"waitForInstances"`
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
WaitForInstancesStatus *string `pulumi:"waitForInstancesStatus"`
// The zone that instances in this group should be created
// in.
//
// ***
Zone *string `pulumi:"zone"`
}
type InstanceGroupManagerState struct {
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
AllInstancesConfig InstanceGroupManagerAllInstancesConfigPtrInput
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
AutoHealingPolicies InstanceGroupManagerAutoHealingPoliciesPtrInput
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName pulumi.StringPtrInput
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringPtrInput
// An optional textual description of the instance
// group manager.
Description pulumi.StringPtrInput
// The fingerprint of the instance group manager.
Fingerprint pulumi.StringPtrInput
// The full URL of the instance group created by the manager.
InstanceGroup pulumi.StringPtrInput
// The instance lifecycle policy for this managed instance group.
InstanceLifecyclePolicy InstanceGroupManagerInstanceLifecyclePolicyPtrInput
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
ListManagedInstancesResults pulumi.StringPtrInput
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
Name pulumi.StringPtrInput
// The named port configuration. See the section below
// for details on configuration.
NamedPorts InstanceGroupManagerNamedPortArrayInput
Operation pulumi.StringPtrInput
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
Params InstanceGroupManagerParamsPtrInput
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The URL of the created resource.
SelfLink pulumi.StringPtrInput
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
StatefulDisks InstanceGroupManagerStatefulDiskArrayInput
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulExternalIps InstanceGroupManagerStatefulExternalIpArrayInput
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulInternalIps InstanceGroupManagerStatefulInternalIpArrayInput
// The status of this managed instance group.
Statuses InstanceGroupManagerStatusArrayInput
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools pulumi.StringArrayInput
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize pulumi.IntPtrInput
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
UpdatePolicy InstanceGroupManagerUpdatePolicyPtrInput
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Versions InstanceGroupManagerVersionArrayInput
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
WaitForInstances pulumi.BoolPtrInput
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
WaitForInstancesStatus pulumi.StringPtrInput
// The zone that instances in this group should be created
// in.
//
// ***
Zone pulumi.StringPtrInput
}
func (InstanceGroupManagerState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceGroupManagerState)(nil)).Elem()
}
type instanceGroupManagerArgs struct {
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `pulumi:"allInstancesConfig"`
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
AutoHealingPolicies *InstanceGroupManagerAutoHealingPolicies `pulumi:"autoHealingPolicies"`
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName string `pulumi:"baseInstanceName"`
// An optional textual description of the instance
// group manager.
Description *string `pulumi:"description"`
// The instance lifecycle policy for this managed instance group.
InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `pulumi:"instanceLifecyclePolicy"`
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
ListManagedInstancesResults *string `pulumi:"listManagedInstancesResults"`
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
Name *string `pulumi:"name"`
// The named port configuration. See the section below
// for details on configuration.
NamedPorts []InstanceGroupManagerNamedPort `pulumi:"namedPorts"`
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
Params *InstanceGroupManagerParams `pulumi:"params"`
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
StatefulDisks []InstanceGroupManagerStatefulDisk `pulumi:"statefulDisks"`
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulExternalIps []InstanceGroupManagerStatefulExternalIp `pulumi:"statefulExternalIps"`
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulInternalIps []InstanceGroupManagerStatefulInternalIp `pulumi:"statefulInternalIps"`
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools []string `pulumi:"targetPools"`
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize *int `pulumi:"targetSize"`
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
UpdatePolicy *InstanceGroupManagerUpdatePolicy `pulumi:"updatePolicy"`
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Versions []InstanceGroupManagerVersion `pulumi:"versions"`
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
WaitForInstances *bool `pulumi:"waitForInstances"`
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
WaitForInstancesStatus *string `pulumi:"waitForInstancesStatus"`
// The zone that instances in this group should be created
// in.
//
// ***
Zone *string `pulumi:"zone"`
}
// The set of arguments for constructing a InstanceGroupManager resource.
type InstanceGroupManagerArgs struct {
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
AllInstancesConfig InstanceGroupManagerAllInstancesConfigPtrInput
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
AutoHealingPolicies InstanceGroupManagerAutoHealingPoliciesPtrInput
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName pulumi.StringInput
// An optional textual description of the instance
// group manager.
Description pulumi.StringPtrInput
// The instance lifecycle policy for this managed instance group.
InstanceLifecyclePolicy InstanceGroupManagerInstanceLifecyclePolicyPtrInput
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
ListManagedInstancesResults pulumi.StringPtrInput
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
Name pulumi.StringPtrInput
// The named port configuration. See the section below
// for details on configuration.
NamedPorts InstanceGroupManagerNamedPortArrayInput
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
Params InstanceGroupManagerParamsPtrInput
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
StatefulDisks InstanceGroupManagerStatefulDiskArrayInput
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulExternalIps InstanceGroupManagerStatefulExternalIpArrayInput
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
StatefulInternalIps InstanceGroupManagerStatefulInternalIpArrayInput
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools pulumi.StringArrayInput
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize pulumi.IntPtrInput
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
UpdatePolicy InstanceGroupManagerUpdatePolicyPtrInput
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Versions InstanceGroupManagerVersionArrayInput
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
WaitForInstances pulumi.BoolPtrInput
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
WaitForInstancesStatus pulumi.StringPtrInput
// The zone that instances in this group should be created
// in.
//
// ***
Zone pulumi.StringPtrInput
}
func (InstanceGroupManagerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceGroupManagerArgs)(nil)).Elem()
}
type InstanceGroupManagerInput interface {
pulumi.Input
ToInstanceGroupManagerOutput() InstanceGroupManagerOutput
ToInstanceGroupManagerOutputWithContext(ctx context.Context) InstanceGroupManagerOutput
}
func (*InstanceGroupManager) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceGroupManager)(nil)).Elem()
}
func (i *InstanceGroupManager) ToInstanceGroupManagerOutput() InstanceGroupManagerOutput {
return i.ToInstanceGroupManagerOutputWithContext(context.Background())
}
func (i *InstanceGroupManager) ToInstanceGroupManagerOutputWithContext(ctx context.Context) InstanceGroupManagerOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupManagerOutput)
}
// InstanceGroupManagerArrayInput is an input type that accepts InstanceGroupManagerArray and InstanceGroupManagerArrayOutput values.
// You can construct a concrete instance of `InstanceGroupManagerArrayInput` via:
//
// InstanceGroupManagerArray{ InstanceGroupManagerArgs{...} }
type InstanceGroupManagerArrayInput interface {
pulumi.Input
ToInstanceGroupManagerArrayOutput() InstanceGroupManagerArrayOutput
ToInstanceGroupManagerArrayOutputWithContext(context.Context) InstanceGroupManagerArrayOutput
}
type InstanceGroupManagerArray []InstanceGroupManagerInput
func (InstanceGroupManagerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceGroupManager)(nil)).Elem()
}
func (i InstanceGroupManagerArray) ToInstanceGroupManagerArrayOutput() InstanceGroupManagerArrayOutput {
return i.ToInstanceGroupManagerArrayOutputWithContext(context.Background())
}
func (i InstanceGroupManagerArray) ToInstanceGroupManagerArrayOutputWithContext(ctx context.Context) InstanceGroupManagerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupManagerArrayOutput)
}
// InstanceGroupManagerMapInput is an input type that accepts InstanceGroupManagerMap and InstanceGroupManagerMapOutput values.
// You can construct a concrete instance of `InstanceGroupManagerMapInput` via:
//
// InstanceGroupManagerMap{ "key": InstanceGroupManagerArgs{...} }
type InstanceGroupManagerMapInput interface {
pulumi.Input
ToInstanceGroupManagerMapOutput() InstanceGroupManagerMapOutput
ToInstanceGroupManagerMapOutputWithContext(context.Context) InstanceGroupManagerMapOutput
}
type InstanceGroupManagerMap map[string]InstanceGroupManagerInput
func (InstanceGroupManagerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceGroupManager)(nil)).Elem()
}
func (i InstanceGroupManagerMap) ToInstanceGroupManagerMapOutput() InstanceGroupManagerMapOutput {
return i.ToInstanceGroupManagerMapOutputWithContext(context.Background())
}
func (i InstanceGroupManagerMap) ToInstanceGroupManagerMapOutputWithContext(ctx context.Context) InstanceGroupManagerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupManagerMapOutput)
}
type InstanceGroupManagerOutput struct{ *pulumi.OutputState }
func (InstanceGroupManagerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceGroupManager)(nil)).Elem()
}
func (o InstanceGroupManagerOutput) ToInstanceGroupManagerOutput() InstanceGroupManagerOutput {
return o
}
func (o InstanceGroupManagerOutput) ToInstanceGroupManagerOutputWithContext(ctx context.Context) InstanceGroupManagerOutput {
return o
}
// Properties to set on all instances in the group. After setting
// allInstancesConfig on the group, you must update the group's instances to
// apply the configuration.
func (o InstanceGroupManagerOutput) AllInstancesConfig() InstanceGroupManagerAllInstancesConfigPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerAllInstancesConfigPtrOutput {
return v.AllInstancesConfig
}).(InstanceGroupManagerAllInstancesConfigPtrOutput)
}
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
func (o InstanceGroupManagerOutput) AutoHealingPolicies() InstanceGroupManagerAutoHealingPoliciesPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerAutoHealingPoliciesPtrOutput {
return v.AutoHealingPolicies
}).(InstanceGroupManagerAutoHealingPoliciesPtrOutput)
}
// The base instance name to use for
// instances in this group. The value must be a valid
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
func (o InstanceGroupManagerOutput) BaseInstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.BaseInstanceName }).(pulumi.StringOutput)
}
// Creation timestamp in RFC3339 text format.
func (o InstanceGroupManagerOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// An optional textual description of the instance
// group manager.
func (o InstanceGroupManagerOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The fingerprint of the instance group manager.
func (o InstanceGroupManagerOutput) Fingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.Fingerprint }).(pulumi.StringOutput)
}
// The full URL of the instance group created by the manager.
func (o InstanceGroupManagerOutput) InstanceGroup() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.InstanceGroup }).(pulumi.StringOutput)
}
// The instance lifecycle policy for this managed instance group.
func (o InstanceGroupManagerOutput) InstanceLifecyclePolicy() InstanceGroupManagerInstanceLifecyclePolicyOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerInstanceLifecyclePolicyOutput {
return v.InstanceLifecyclePolicy
}).(InstanceGroupManagerInstanceLifecyclePolicyOutput)
}
// Pagination behavior of the `listManagedInstances` API
// method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
// If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
// `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
// response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
// respected.
func (o InstanceGroupManagerOutput) ListManagedInstancesResults() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringPtrOutput { return v.ListManagedInstancesResults }).(pulumi.StringPtrOutput)
}
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
// include lowercase letters, numbers, and hyphens.
func (o InstanceGroupManagerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The named port configuration. See the section below
// for details on configuration.
func (o InstanceGroupManagerOutput) NamedPorts() InstanceGroupManagerNamedPortArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerNamedPortArrayOutput { return v.NamedPorts }).(InstanceGroupManagerNamedPortArrayOutput)
}
func (o InstanceGroupManagerOutput) Operation() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.Operation }).(pulumi.StringOutput)
}
// Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
//
// ***
func (o InstanceGroupManagerOutput) Params() InstanceGroupManagerParamsPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerParamsPtrOutput { return v.Params }).(InstanceGroupManagerParamsPtrOutput)
}
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
func (o InstanceGroupManagerOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The URL of the created resource.
func (o InstanceGroupManagerOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).
func (o InstanceGroupManagerOutput) StatefulDisks() InstanceGroupManagerStatefulDiskArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerStatefulDiskArrayOutput { return v.StatefulDisks }).(InstanceGroupManagerStatefulDiskArrayOutput)
}
// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
func (o InstanceGroupManagerOutput) StatefulExternalIps() InstanceGroupManagerStatefulExternalIpArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerStatefulExternalIpArrayOutput {
return v.StatefulExternalIps
}).(InstanceGroupManagerStatefulExternalIpArrayOutput)
}
// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
func (o InstanceGroupManagerOutput) StatefulInternalIps() InstanceGroupManagerStatefulInternalIpArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerStatefulInternalIpArrayOutput {
return v.StatefulInternalIps
}).(InstanceGroupManagerStatefulInternalIpArrayOutput)
}
// The status of this managed instance group.
func (o InstanceGroupManagerOutput) Statuses() InstanceGroupManagerStatusArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerStatusArrayOutput { return v.Statuses }).(InstanceGroupManagerStatusArrayOutput)
}
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
func (o InstanceGroupManagerOutput) TargetPools() pulumi.StringArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringArrayOutput { return v.TargetPools }).(pulumi.StringArrayOutput)
}
// The target number of running instances for this managed instance group. This value should always be explicitly set
// unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
func (o InstanceGroupManagerOutput) TargetSize() pulumi.IntOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.IntOutput { return v.TargetSize }).(pulumi.IntOutput)
}
// The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/patch).
func (o InstanceGroupManagerOutput) UpdatePolicy() InstanceGroupManagerUpdatePolicyOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerUpdatePolicyOutput { return v.UpdatePolicy }).(InstanceGroupManagerUpdatePolicyOutput)
}
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
func (o InstanceGroupManagerOutput) Versions() InstanceGroupManagerVersionArrayOutput {
return o.ApplyT(func(v *InstanceGroupManager) InstanceGroupManagerVersionArrayOutput { return v.Versions }).(InstanceGroupManagerVersionArrayOutput)
}
// Whether to wait for all instances to be created/updated before
// returning. Note that if this is set to true and the operation does not succeed, this provider will
// continue trying until it times out.
func (o InstanceGroupManagerOutput) WaitForInstances() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.BoolPtrOutput { return v.WaitForInstances }).(pulumi.BoolPtrOutput)
}
// When used with `waitForInstances` it specifies the status to wait for.
// When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
func (o InstanceGroupManagerOutput) WaitForInstancesStatus() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringPtrOutput { return v.WaitForInstancesStatus }).(pulumi.StringPtrOutput)
}
// The zone that instances in this group should be created
// in.
//
// ***
func (o InstanceGroupManagerOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroupManager) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
type InstanceGroupManagerArrayOutput struct{ *pulumi.OutputState }
func (InstanceGroupManagerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceGroupManager)(nil)).Elem()
}
func (o InstanceGroupManagerArrayOutput) ToInstanceGroupManagerArrayOutput() InstanceGroupManagerArrayOutput {
return o
}
func (o InstanceGroupManagerArrayOutput) ToInstanceGroupManagerArrayOutputWithContext(ctx context.Context) InstanceGroupManagerArrayOutput {
return o
}
func (o InstanceGroupManagerArrayOutput) Index(i pulumi.IntInput) InstanceGroupManagerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InstanceGroupManager {
return vs[0].([]*InstanceGroupManager)[vs[1].(int)]
}).(InstanceGroupManagerOutput)
}
type InstanceGroupManagerMapOutput struct{ *pulumi.OutputState }
func (InstanceGroupManagerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceGroupManager)(nil)).Elem()
}
func (o InstanceGroupManagerMapOutput) ToInstanceGroupManagerMapOutput() InstanceGroupManagerMapOutput {
return o
}
func (o InstanceGroupManagerMapOutput) ToInstanceGroupManagerMapOutputWithContext(ctx context.Context) InstanceGroupManagerMapOutput {
return o
}
func (o InstanceGroupManagerMapOutput) MapIndex(k pulumi.StringInput) InstanceGroupManagerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InstanceGroupManager {
return vs[0].(map[string]*InstanceGroupManager)[vs[1].(string)]
}).(InstanceGroupManagerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupManagerInput)(nil)).Elem(), &InstanceGroupManager{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupManagerArrayInput)(nil)).Elem(), InstanceGroupManagerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupManagerMapInput)(nil)).Elem(), InstanceGroupManagerMap{})
pulumi.RegisterOutputType(InstanceGroupManagerOutput{})
pulumi.RegisterOutputType(InstanceGroupManagerArrayOutput{})
pulumi.RegisterOutputType(InstanceGroupManagerMapOutput{})
}