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
Add update support for machine type, min cpu platform, and service accounts (hashicorp#1005)
* Add update support for compute instance fields that require the machine to be stopped
* add warnings in docs about stopping the instance before updating
* add allow_stopping_for_update field
**Note**: [`allow_stopping_for_update`](#allow_stopping_for_update) must be set to true in order to update this field.
67
68
68
69
*`name` - (Required) A unique name for the resource, required by GCE.
69
70
Changing this forces a new resource to be created.
@@ -75,6 +76,9 @@ The following arguments are supported:
75
76
76
77
- - -
77
78
79
+
*`allow_stopping_for_update` - (Optional) If true, allows Terraform to stop the instance to update its properties.
80
+
If you try to update a property that requires stopping the instance without setting this field, the update will fail.
81
+
78
82
*`attached_disk` - (Optional) List of disks to attach to the instance. Structure is documented below.
79
83
80
84
*`can_ip_forward` - (Optional) Whether to allow sending and receiving of
@@ -86,6 +90,8 @@ The following arguments are supported:
86
90
87
91
*`description` - (Optional) A brief description of this resource.
88
92
93
+
*`guest_accelerator` - (Optional) List of the type and count of accelerator cards attached to the instance. Structure documented below.
94
+
89
95
*`labels` - (Optional) A set of key/value label pairs to assign to the instance.
90
96
91
97
*`metadata` - (Optional) Metadata key/value pairs to make available from
@@ -97,6 +103,10 @@ The following arguments are supported:
97
103
startup-script metadata key on the created instance and thus the two
98
104
mechanisms are not allowed to be used simultaneously.
99
105
106
+
*`min_cpu_platform` - (Optional) Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
107
+
`Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
108
+
**Note**: [`allow_stopping_for_update`](#allow_stopping_for_update) must be set to true in order to update this field.
109
+
100
110
*`project` - (Optional) The project in which the resource belongs. If it
101
111
is not provided, the provider project is used.
102
112
@@ -108,6 +118,7 @@ The following arguments are supported:
108
118
109
119
*`service_account` - (Optional) Service account to attach to the instance.
110
120
Structure is documented below.
121
+
**Note**: [`allow_stopping_for_update`](#allow_stopping_for_update) must be set to true in order to update this field.
111
122
112
123
*`tags` - (Optional) A list of tags to attach to the instance.
113
124
@@ -215,10 +226,12 @@ The `service_account` block supports:
215
226
216
227
*`email` - (Optional) The service account e-mail address. If not given, the
217
228
default Google Compute Engine service account is used.
229
+
**Note**: [`allow_stopping_for_update`](#allow_stopping_for_update) must be set to true in order to update this field.
218
230
219
231
*`scopes` - (Required) A list of service scopes. Both OAuth2 URLs and gcloud
220
232
short names are supported. To allow full access to all Cloud APIs, use the
221
233
`cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
234
+
**Note**: [`allow_stopping_for_update`](#allow_stopping_for_update) must be set to true in order to update this field.
222
235
223
236
The `scheduling` block supports:
224
237
@@ -231,13 +244,6 @@ The `scheduling` block supports:
231
244
*`automatic_restart` - (Optional) Specifies if the instance should be
232
245
restarted if it was terminated by Compute Engine (not a user).
233
246
234
-
---
235
-
236
-
*`guest_accelerator` - (Optional) List of the type and count of accelerator cards attached to the instance. Structure documented below.
237
-
238
-
*`min_cpu_platform` - (Optional) Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
239
-
`Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
240
-
241
247
The `guest_accelerator` block supports:
242
248
243
249
*`type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
0 commit comments