Skip to content

Commit 4e6ea18

Browse files
Fix 7.0.0 upgrade guide (#14959) (#10604)
[upstream:983fceee42bd88a21bb3fc9604431b622f25d789] Signed-off-by: Modular Magician <[email protected]>
1 parent 4362e23 commit 4e6ea18

File tree

1 file changed

+109
-71
lines changed

1 file changed

+109
-71
lines changed

website/docs/guides/version_7_upgrade.html.markdown

Lines changed: 109 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,12 @@ terraform {
102102

103103
## Provider
104104

105-
### Provider-level change example header
106-
107-
Description of the change and how users should adjust their configuration (if needed).
108-
109105
### Resource import formats have improved validation
110106

111107
Throughout the provider there were many resources which erroneously gave false positives to poorly formatted import input if a subset of the provided input was valid to their configured import formats. All GCP resource IDs supplied to "terraform import" must match the documentation specified import formats exactly.
112108

113109
## Datasources
114110

115-
## Datasource: `google_product_datasource`
116-
117-
### Datasource-level change example header
118-
119-
Description of the change and how users should adjust their configuration (if needed).
120-
121111
## Datasource: `google_service_account_key`
122112

123113
### `project` is now removed
@@ -134,22 +124,32 @@ The field `deletion_protection` has been added with a default value of `true`. T
134124
Terraform from destroying or recreating the cluster during `terraform apply`. In 7.0.0, existing clusters will have
135125
`deletion_protection` set to `true` during the next refresh unless otherwise set in configuration.
136126

137-
## Resource: `google_beyondcorp_application` is now removed
127+
## Resource: `google_apigee_keystores_aliases_key_cert_file`
138128

139-
`google_beyondcorp_application`, the associated IAM resources `google_beyondcorp_application_iam_binding`, `google_beyondcorp_application_iam_member`, and `google_beyondcorp_application_iam_policy`, and the `google_beyondcorp_application_iam_policy` datasource have been removed.
140-
Use `google_beyondcorp_security_gateway_application` instead.
129+
### `google_apigee_keystores_aliases_key_cert_file` Migrated to the Plugin Framework
130+
131+
This resource has been migrated from SDKv2 to the more modern [plugin framework resource implementation](https://developer.hashicorp.com/terraform/plugin/framework). One potential breaking change is expected with this migration; please review the details below.
132+
133+
### `certs_info` is now output-only
134+
135+
Previously the `certis_info` field was set as an optional value, but the configured value was never used by the API. It is now correctly marked as output-only. If set in your configuration, simply remove it and the API value will continue to be used.
141136

142137
## Resource: `google_artifact_registry_repository`
143138

144139
### `public_repository` fields have had their default values removed.
145140

146141
`public_repository` fields have had their default values removed. If your state has been reliant on them, they will need to be manually included into your configuration now.
147142

143+
## Resource: `google_beyondcorp_application` is now removed
144+
145+
`google_beyondcorp_application`, the associated IAM resources `google_beyondcorp_application_iam_binding`, `google_beyondcorp_application_iam_member`, and `google_beyondcorp_application_iam_policy`, and the `google_beyondcorp_application_iam_policy` datasource have been removed.
146+
Use `google_beyondcorp_security_gateway_application` instead.
147+
148148
## Resource: `google_bigquery_table`
149149

150150
### `view.use_legacy_sql` no longer has a default value of `True`
151151

152-
The `view.use_legacy_sql` field no longer has a default value. Configurations that relied on the old default will show no diff in the plan, and there will be no change to existing views. For a new view, leaving this field unspecified in the configuration will result in the view being created with no `use_legacy_sql` value, which the API interprets as a `true` and assumes the legacy SQL dialect for its query. See the [API documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ViewDefinition) for more details.
152+
The `view.use_legacy_sql` field no longer has a default value. Configurations that relied on the old default will show no diff in the plan, and there will be no change to existing views. For newly created views, leaving this field unspecified in the configuration will result in the view being created with no `use_legacy_sql` value, which the API interprets as a `true` and assumes the legacy SQL dialect for its query. See the [API documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ViewDefinition) for more details.
153153

154154
## Resource: `google_bigtable_table_iam_binding`
155155

@@ -175,43 +175,57 @@ The `view.use_legacy_sql` field no longer has a default value. Configurations th
175175

176176
`budget_filter.credit types` and `budget_filter.subaccounts` are no longer O+C. These fields already did not export any API-default values, so no change to your configuration should be necessary.
177177

178-
## Resource: `google_compute_packet_mirroring`
178+
## Resource: `google_cloudfunctions2_function`
179179

180-
### `subnetworks` and `instances` fields have been converted to sets
180+
### `event_trigger.event_type` is now required
181181

182-
`subnetworks` and `instances` fields have been converted to sets. If you need to access values in their nested objects, it will need to be accessed via `for_each` or locally converting the field to a list/array in your configuration.
182+
The `event_type` field is now required when `event_trigger` is configured.
183183

184-
## Resource: `google_compute_subnetwork`
184+
### `service_config.service` is now an output only field
185185

186-
### `enable_flow_logs`is now removed
186+
Remove `service_config.service` from your configuration after upgrade.
187187

188-
`enable_flow_logs` has been removed in favor of `log_config`.
188+
## Resource: `google_cloud_run_v2_worker_pool`
189+
190+
### `template.containers.depends_on` is now removed
191+
192+
Remove `template.containers.depends_on` from your configuration after upgrade.
193+
194+
## Resource: `google_colab_runtime_template`
195+
196+
### `post_startup_script_config` is now removed
197+
198+
Remove `post_startup_script_config` from your configuration after upgrade.
189199

190200
## Resource: `google_compute_instance_template`
191201

192-
### The resource will no longer use hardcoded values
202+
### `disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values
193203

194-
`disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values and instead will be set by the API. This shouldn't have any effect on the functionality of the resource.
204+
`disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values and instead will be set by the API. See the [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates) for more details.
195205

196-
## Resource: `google_compute_region_instance_template`
206+
## Resource: `google_compute_packet_mirroring`
197207

198-
### The resource will no longer use hardcoded values
208+
### `subnetworks` and `instances` fields have been converted to sets
199209

200-
`disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values and instead will be set by the API. This shouldn't have any effect on the functionality of the resource.
210+
`subnetworks` and `instances` fields have been converted to sets. If you need to access values in their nested objects, it will need to be accessed via `for_each` or locally converting the field to a list/array in your configuration.
201211

202-
## Resource: `google_notebooks_location` is now removed
212+
## Resource: `google_compute_region_instance_template`
203213

204-
This resource is not functional.
214+
### `disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values
205215

206-
## Resource: `google_storage_bucket`
216+
`disk.type`, `disk.mode` and `disk.interface` will no longer use provider configured default values and instead will be set by the API. See the [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/regionInstanceTemplates) for more details.
207217

208-
### `retention_period` changed to `string` data type
218+
## Resource: `google_compute_router`
209219

210-
`retention_period` was changed to the [`string` data type](https://developer.hashicorp.com/terraform/language/expressions/types#string) to handle higher values for the bucket's retention period.
220+
### `advertised_ip_ranges` fields have been converted to sets
211221

212-
Terraform [Type Conversion](https://developer.hashicorp.com/terraform/language/expressions/types#type-conversion) will handle the change automatically for most configurations, and they will not need to be modified.
222+
`advertised_ip_ranges` fields have been converted to sets. If you need to access values `advertised_ip_ranges`'s' nested object, it will need to be accessed via `for_each` or locally converting the field to a list/array in your configuration.
213223

214-
To reflect the new type explicitly, surround the current integer value in quotes, i.e. `retention_period = 10` -> `retention_period = "10"`.
224+
## Resource: `google_compute_subnetwork`
225+
226+
### `enable_flow_logs`is now removed
227+
228+
`enable_flow_logs` has been removed in favor of `log_config`.
215229

216230
## Resource: `google_gke_hub_feature_membership`
217231

@@ -225,49 +239,37 @@ Remove `configmanagement.binauthz` from your configuration after upgrade.
225239

226240
Remove `description` from your configuration after upgrade.
227241

228-
## Resource: `google_colab_runtime_template`
229-
230-
### `post_startup_script_config` is now removed.
242+
## Resource: `google_memorystore_instance`
231243

232-
Remove `post_startup_script_config` from your configuration after upgrade.
244+
`allow_fewer_zones_deployment` has been removed because it isn't user-configurable.
233245

234246
## Resource: `google_monitoring_uptime_check_config`
235247

236248
### Exactly one of `http_check.auth_info.password` and `http_check.auth_info.password_wo` must be set
237249

238-
At least one must be set, and setting both would make it unclear which was being used.
250+
Setting exactly one of `http_check.auth_info.password` and `http_check.auth_info.password_wo` is now enforced in order to avoid situations where it is unclear which was being used.
239251

240252
## Resource: `google_network_services_lb_traffic_extension`
241253

242254
### `load_balancing_scheme` is now required
243255

244-
`load_balancing_scheme` is now a required field.
256+
`load_balancing_scheme` is now a required field. This field was already required for resource functionality so no change to your configuration should be necessary.
245257

246-
## Resource: `google_storage_transfer_job`
247-
248-
### `transfer_spec.gcs_data_sink.path` Implemented validation to prevent strings from starting with a '/' character, while still permitting empty strings."
249-
250-
### `transfer_spec.gcs_data_source.path` Implemented validation to prevent strings from starting with a '/' character, while still permitting empty strings."
251-
252-
### `replication_spec.gcs_data_source.path` Implemented validation to prevent strings from starting with a '/' character, while still permitting empty strings."
253-
254-
### `replication_spec.gcs_data_sink.path` Implemented validation to prevent strings from starting with a '/' character, while still permitting empty strings."
255-
256-
## Resource: `google_cloudfunctions2_function`
258+
## Resource: `google_notebooks_location` is now removed
257259

258-
### `event_trigger.event_type` is now required
260+
This resource is not functional and can safely be removed from your configuration.
259261

260-
The `event_type` field is now required when `event_trigger` is configured.
262+
## Resource: `google_project_service`
261263

262-
### `service_config.service` is changed from `Argument` to `Attribute`
264+
### `disable_on_destroy` now defaults to `false`
263265

264-
Remove `service_config.service` from your configuration after upgrade.
266+
The default value for `disable_on_destroy` has been changed to `false`. The previous default (`true`) created a risk of unintended service disruptions, as destroying a single `google_project_service` resource would disable the API for the entire project.
265267

266-
## Resource: `google_cloud_run_v2_worker_pool`
268+
Now, destroying the resource will only remove it from Terraform's state and leave the service enabled. To disable a service when the resource is destroyed, you must now make an explicit decision by setting `disable_on_destroy = true`.
267269

268-
### `template.containers.depends_on` is removed as it is not supported.
270+
## Resource: `google_redis_cluster`
269271

270-
Remove `template.containers.depends_on` from your configuration after upgrade.
272+
`allow_fewer_zones_deployment` has been removed because it isn't user-configurable.
271273

272274
## Resource: `google_secret_manager_secret_version`
273275

@@ -277,34 +279,70 @@ This standardizes the behavior of write-only fields across the provider and make
277279

278280
## Resource: `google_sql_user`
279281

280-
### `password_wo_version` is now required when `password_wo` is set
282+
### `password_wo` and `password_wo_version` must be set together
281283

282284
This standardizes the behavior of write-only fields across the provider and makes it easier to remember to update the fields together.
283285

284-
## Resource: `google_vertex_ai_endpoint`
286+
## Resource: `google_secure_source_manager_instance`
285287

286-
### `enable_secure_private_service_connect` is removed as it is not available in the GA version of the API, only in the beta version.
288+
### `deletion_policy` has had its default value changed to `PREVENT`
287289

288-
## Resource: `google_vertex_ai_index`
290+
`deletion_policy` has had its default value changed to `PREVENT`. This field prevents
291+
Terraform from destroying or recreating the cluster during `terraform apply`. In 7.0.0, existing resources will have
292+
`deletion_policy` set to `true` during the next refresh unless otherwise set in configuration.
289293

290-
### `metadata`, and `metadata.config` are now required. Resource creation would fail without these attributes already, so no change is necessary to existing configurations.
294+
## Resource: `google_secure_source_manager_repository`
291295

292-
## Resource: `google_tpu_node` is now removed
296+
### `deletion_policy` has had its default value changed to `PREVENT`
293297

294-
`google_tpu_node` is removed in favor of `google_tpu_v2_vm`. For moving from TPU Node to TPU VM architecture, see https://cloud.google.com/tpu/docs/system-architecture-tpu-vm#from-tpu-node-to-tpu-vm.
298+
`deletion_policy` has had its default value changed to `PREVENT`. This field prevents
299+
Terraform from destroying or recreating the cluster during `terraform apply`. In 7.0.0, existing resources will have
300+
`deletion_policy` set to `true` during the next refresh unless otherwise set in configuration.
295301

296-
## Resource: `google_project_service`
302+
## Resource: `google_storage_transfer_job`
297303

298-
### `disable_on_destroy` now defaults to `false`
304+
### Several `path` fields have improved validation
299305

300-
The default value for `disable_on_destroy` has been changed to `false`. The previous default (`true`) created a risk of unintended service disruptions, as destroying a single `google_project_service` resource would disable the API for the entire project.
306+
`transfer_spec.gcs_data_sink.path`, `transfer_spec.gcs_data_source.path`, `replication_spec.gcs_data_source.path`, and `replication_spec.gcs_data_sink.path` are now required to not start with a '/' character.
301307

302-
Now, destroying the resource will only remove it from Terraform's state and leave the service enabled. To disable a service when the resource is destroyed, you must now make an explicit decision by setting `disable_on_destroy = true`.
308+
## Resource: `google_storage_bucket`
303309

304-
## Resource: `google_memorystore_instance`
310+
### `retention_period` changed to `string` data type
305311

306-
`allow_fewer_zones_deployment` has been removed because it isn't user-configurable.
312+
`retention_period` was changed to the [`string` data type](https://developer.hashicorp.com/terraform/language/expressions/types#string) to handle higher values for the bucket's retention period.
307313

308-
## Resource: `google_redis_cluster`
314+
Terraform [Type Conversion](https://developer.hashicorp.com/terraform/language/expressions/types#type-conversion) will handle the change automatically for most configurations, and they will not need to be modified.
315+
316+
To reflect the new type explicitly, surround the current integer value in quotes, i.e. `retention_period = 10` -> `retention_period = "10"`.
317+
318+
## Resource: `google_storage_notification`
319+
320+
### `google_storage_notification` Migrated to the Plugin Framework
321+
322+
This resource has been migrated from SDKv2 to the more modern [plugin framework resource implementation](https://developer.hashicorp.com/terraform/plugin/framework). One associated breaking change is expected with this migration; please review the details below.
323+
324+
### `topic` Field Format Change
325+
326+
The `topic` field for `google_storage_notification` must now be provided in the format `projects/{{project}}/topics/{{topic}}`.
327+
328+
The previous SDKv2 implementation accepted both `projects/{{project}}/topics/{{topic}}` and the fully qualified Google API format `//pubsub.googleapis.com/projects/{{project}}/topics/{{topic}}` in configuration. However, it consistently stored the latter (fully qualified) format in the Terraform state.
329+
330+
With this migration, only the `projects/{{project}}/topics/{{topic}}` format is allowed in configuration, aligning with the `id` format of the `google_pubsub_topic` resource.
331+
332+
A state upgrader will automatically migrate the `topic` field's format in your Terraform state when you upgrade to this provider version. However, you **must ensure your Terraform configuration files are updated** to use the `projects/{{project}}/topics/{{topic}}` format to avoid validation errors.
333+
334+
## Resource: `google_tpu_node` is now removed
335+
336+
`google_tpu_node` is removed in favor of `google_tpu_v2_vm`. For moving from TPU Node to TPU VM architecture, see https://cloud.google.com/tpu/docs/system-architecture-tpu-vm#from-tpu-node-to-tpu-vm.
337+
338+
## Resource: `google_vertex_ai_endpoint`
339+
340+
### `enable_secure_private_service_connect` is now removed from the GA provider
341+
342+
`enable_secure_private_service_connect` has been removed from the GA provider it is not available in the GA version of the API. The field is still available when using the beta provider.
343+
344+
## Resource: `google_vertex_ai_index`
345+
346+
### `metadata`, and `metadata.config` are now required.
309347

310-
`allow_fewer_zones_deployment` has been removed because it isn't user-configurable.
348+
`metadata`, and `metadata.config` are now required. These fields were already required for resource functionality, so no change is necessary to existing configurations.

0 commit comments

Comments
 (0)