You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: autogen/variables.tf.tmpl
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -86,13 +86,14 @@ variable "stateful_disks" {
86
86
variable "update_policy" {
87
87
description = "The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy"
88
88
type = list(object({
89
-
max_surge_fixed = number
90
-
max_surge_percent = number
91
-
max_unavailable_fixed = number
92
-
max_unavailable_percent = number
93
-
min_ready_sec = number
94
-
minimal_action = string
95
-
type = string
89
+
max_surge_fixed = number
90
+
instance_redistribution_type = string
91
+
max_surge_percent = number
92
+
max_unavailable_fixed = number
93
+
max_unavailable_percent = number
94
+
min_ready_sec = number
95
+
minimal_action = string
96
+
type = string
96
97
}))
97
98
default = []
98
99
}
@@ -203,3 +204,22 @@ variable "named_ports" {
203
204
}))
204
205
default = []
205
206
}
207
+
208
+
variable "wait_for_instances" {
209
+
description = "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, Terraform will continue trying until it times out."
210
+
default = "false"
211
+
}
212
+
213
+
variable "mig_timeouts" {
214
+
description = "Times for creation, deleting and updating the MIG resources. Can be helpful when using wait_for_instances to allow a longer VM startup time. "
description="The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy"
Copy file name to clipboardExpand all lines: modules/mig/README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,19 @@ The current version is 2.X. The following guides are available to assist with up
28
28
| hostname | Hostname prefix for instances | string |`"default"`| no |
29
29
| instance\_template | Instance template self_link used to create compute instances | string | n/a | yes |
30
30
| max\_replicas | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. | string |`"10"`| no |
31
+
| mig\_timeouts | Times for creation, deleting and updating the MIG resources. Can be helpful when using wait_for_instances to allow a longer VM startup time. | object |`<map>`| no |
31
32
| min\_replicas | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. | string |`"2"`| no |
32
33
| named\_ports | Named name and named port. https://cloud.google.com/load-balancing/docs/backend-service#named_ports| object |`<list>`| no |
33
34
| network | Network to deploy to. Only one of network or subnetwork should be specified. | string |`""`| no |
34
35
| project\_id | The GCP project ID | string |`"null"`| no |
35
36
| region | The GCP region where the managed instance group resides. | string | n/a | yes |
37
+
| stateful\_disks | Disks created on the instances that will be preserved on instance delete. https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs| object |`<list>`| no |
36
38
| subnetwork | Subnet to deploy to. Only one of network or subnetwork should be specified. | string |`""`| no |
37
39
| subnetwork\_project | The project that subnetwork belongs to | string |`""`| no |
38
40
| target\_pools | The target load balancing pools to assign this group to. | list(string) |`<list>`| no |
39
41
| target\_size | 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. | string |`"1"`| no |
40
42
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy| object |`<list>`| no |
43
+
| wait\_for\_instances | 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, Terraform will continue trying until it times out. | string |`"false"`| no |
Copy file name to clipboardExpand all lines: modules/mig/variables.tf
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,7 @@ variable "stateful_disks" {
63
63
}))
64
64
default=[]
65
65
}
66
+
66
67
#################
67
68
# Rolling Update
68
69
#################
@@ -188,3 +189,22 @@ variable "named_ports" {
188
189
}))
189
190
default=[]
190
191
}
192
+
193
+
variable"wait_for_instances" {
194
+
description="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, Terraform will continue trying until it times out."
195
+
default="false"
196
+
}
197
+
198
+
variable"mig_timeouts" {
199
+
description="Times for creation, deleting and updating the MIG resources. Can be helpful when using wait_for_instances to allow a longer VM startup time. "
Copy file name to clipboardExpand all lines: modules/mig_with_percent/README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,17 +28,20 @@ The current version is 2.X. The following guides are available to assist with up
28
28
| instance\_template\_initial\_version | Instance template self_link used to create compute instances for the initial version | string | n/a | yes |
29
29
| instance\_template\_next\_version | Instance template self_link used to create compute instances for the second version | string | n/a | yes |
30
30
| max\_replicas | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. | string |`"10"`| no |
31
+
| mig\_timeouts | Times for creation, deleting and updating the MIG resources. Can be helpful when using wait_for_instances to allow a longer VM startup time. | object |`<map>`| no |
31
32
| min\_replicas | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. | string |`"2"`| no |
32
33
| named\_ports | Named name and named port. https://cloud.google.com/load-balancing/docs/backend-service#named_ports| object |`<list>`| no |
33
34
| network | Network to deploy to. Only one of network or subnetwork should be specified. | string |`""`| no |
34
35
| next\_version\_percent | Percentage of instances defined in the second version | string | n/a | yes |
35
36
| project\_id | The GCP project ID | string |`"null"`| no |
36
37
| region | The GCP region where the managed instance group resides. | string | n/a | yes |
38
+
| stateful\_disks | Disks created on the instances that will be preserved on instance delete. https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs| object |`<list>`| no |
37
39
| subnetwork | Subnet to deploy to. Only one of network or subnetwork should be specified. | string |`""`| no |
38
40
| subnetwork\_project | The project that subnetwork belongs to | string |`""`| no |
39
41
| target\_pools | The target load balancing pools to assign this group to. | list(string) |`<list>`| no |
40
42
| target\_size | 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. | string |`"1"`| no |
41
43
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy| object |`<list>`| no |
44
+
| wait\_for\_instances | 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, Terraform will continue trying until it times out. | string |`"false"`| no |
description="Disks created on the instances that will be preserved on instance delete. https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs"
68
+
type=list(object({
69
+
device_name =string
70
+
delete_rule =string
71
+
}))
72
+
default=[]
73
+
}
74
+
63
75
#################
64
76
# Rolling Update
65
77
#################
66
78
67
79
variable"update_policy" {
68
80
description="The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy"
69
81
type=list(object({
70
-
max_surge_fixed =number
71
-
max_surge_percent =number
72
-
max_unavailable_fixed =number
73
-
max_unavailable_percent =number
74
-
min_ready_sec =number
75
-
minimal_action =string
76
-
type =string
82
+
max_surge_fixed =number
83
+
instance_redistribution_type =string
84
+
max_surge_percent =number
85
+
max_unavailable_fixed =number
86
+
max_unavailable_percent =number
87
+
min_ready_sec =number
88
+
minimal_action =string
89
+
type =string
77
90
}))
78
91
default=[]
79
92
}
@@ -184,3 +197,22 @@ variable "named_ports" {
184
197
}))
185
198
default=[]
186
199
}
200
+
201
+
variable"wait_for_instances" {
202
+
description="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, Terraform will continue trying until it times out."
203
+
default="false"
204
+
}
205
+
206
+
variable"mig_timeouts" {
207
+
description="Times for creation, deleting and updating the MIG resources. Can be helpful when using wait_for_instances to allow a longer VM startup time. "
0 commit comments