KNOWN ISSUES:
- Updating some resources post-upgrade results in an error like "The update_mask in the Update{{Resource}}Request must be set". This should be resolved in
5.1.0
, see hashicorp/terraform-provider-google#16091 for details.
Terraform Google Provider 5.0.0 Upgrade Guide
NOTES:
- provider: some provider default values are now shown at plan-time (#6188)
LABELS REWORK:
- provider: default labels configured on the provider through the new
default_labels
field are now supported. The default labels configured on the provider will be applied to all of the resources with standardlabels
field. - provider: resources with labels - three label-related fields are now in all of the resources with standard
labels
field.labels
field is non-authoritative and only manages the labels defined by the users on the resource through Terraform. The new output-onlyterraform_labels
field merges the labels defined by the users on the resource through Terraform and the default labels configured on the provider. The new output-onlyeffective_labels
field lists all of labels present on the resource in GCP, including the labels configured through Terraform, the system, and other clients. - provider: resources with annotations - two annotation-related fields are now in all of the resources with standard
annotations
field. Theannotations
field is non-authoritative and only manages the annotations defined by the users on the resource through Terraform. The new output-onlyeffective_annotations
field lists all of annotations present on the resource in GCP, including the annotations configured through Terraform, the system, and other clients. - provider: datasources with labels - three fields
labels
,terraform_labels
, andeffective_labels
are now present in most resource-based datasources. All three fields have all of labels present on the resource in GCP including the labels configured through Terraform, the system, and other clients, equivalent toeffective_labels
on the resource. - provider: datasources with annotations - both
annotations
andeffective_annotations
are now present in most resource-based datasources. Both fields have all of annotations present on the resource in GCP including the annotations configured through Terraform, the system, and other clients, equivalent toeffective_annotations
on the resource.
BREAKING CHANGES:
- provider: added provider-level validation so these fields are not set as empty strings in a user's config:
credentials
,access_token
,impersonate_service_account
,project
,billing_project
,region
,zone
(#6358) - provider: fixed many import functions throughout the provider that matched a subset of the provided input when possible. Now, the GCP resource id supplied to "terraform import" must match exactly. (#6364)
- provider: made data sources return errors on 404s when applicable instead of silently failing (#6241)
- provider: made empty strings in the provider configuration block no longer be ignored when configuring the provider (#6358)
- accesscontextmanager: changed multiple array fields to sets where appropriate to prevent duplicates and fix diffs caused by server side reordering. (#6217)
- bigquery: added more input validations for
google_bigquery_table
schema (#5975) - bigquery: made
routine_type
required forgoogle_bigquery_routine
(#6080) - cloudfunction2: made
location
required ongoogle_cloudfunctions2_function
(#6260) - cloudiot: removed deprecated datasource
google_cloudiot_registry_iam_policy
(#6206) - cloudiot: removed deprecated resource
google_cloudiot_device
(#6206) - cloudiot: removed deprecated resource
google_cloudiot_registry
(#6206) - cloudiot: removed deprecated resource
google_cloudiot_registry_iam_*
(#6206) - cloudrunv2: removed deprecated field
liveness_probe.tcp_socket
fromgoogle_cloud_run_v2_service
resource. (#6029) - cloudrunv2: removed deprecated fields
startup_probe
andliveness_probe
fromgoogle_cloud_run_v2_job
resource. (#6029) - cloudrunv2: retyped
volumes.cloud_sql_instance.instances
to SET from ARRAY forgoogle_cloud_run_v2_service
(#6261) - compute: made
google_compute_node_group
require one ofinitial_size
orautoscaling_policy
fields configured upon resource creation (#6384) - compute: made
size
ingoogle_compute_node_group
an output only field. (#6384) - compute: removed default value for
rule.rate_limit_options.encorce_on_key
on resourcegoogle_compute_security_policy
(#6174) - compute: retyped
consumer_accept_lists
to a SET from an ARRAY type forgoogle_compute_service_attachment
(#6369) - container: added
deletion_protection
togoogle_container_cluster
which is enabled totrue
by default. When enabled, this field prevents Terraform from deleting the resource. (#6391) - container: changed
management.auto_repair
andmanagement.auto_upgrade
defaults to true ingoogle_container_node_pool
(#6329) - container: changed
networking_mode
default toVPC_NATIVE
for newly createdgoogle_container_cluster
resources (#6402) - container: removed
enable_binary_authorization
ingoogle_container_cluster
(#6285) - container: removed default for
logging_variant
ingoogle_container_node_pool
(#6329) - container: removed default value in
network_policy.provider
ingoogle_container_cluster
(#6323) - container: removed the behaviour that
google_container_cluster
will delete the cluster if it's created in an error state. Instead, it will mark the cluster as tainted, allowing manual inspection and intervention. To proceed with deletion, run anotherterraform apply
. (#6301) - container: reworked the
taint
field ingoogle_container_cluster
andgoogle_container_node_pool
to only manage a subset of taint keys based on those already in state. Most existing resources are unaffected, unless they usesandbox_config
- see upgrade guide for details. (#6351) - dataplex: removed
data_profile_result
anddata_quality_result
fromgoogle_dataplex_scan
(#6070) - firebase: changed
deletion_policy
default toDELETE
forgoogle_firebase_web_app
. (#6018) - firebase: removed
google_firebase_project_location
(#6223) - gameservices: removed Terraform support for
gameservices
(#6112) - logging: changed the default value of
unique_writer_identity
fromfalse
totrue
ingoogle_logging_project_sink
. (#6210) - logging: made
growth_factor
,num_finite_buckets
, andscale
required forgoogle_logging_metric
(#6173) - looker: removed
LOOKER_MODELER
as a possible value ingoogle_looker_instance.platform_edition
(#6349) - monitoring: fixed perma-diffs in
google_monitoring_dashboard.dashboard_json
by suppressing values returned by the API that are not in configuration (#6392) - monitoring: made
labels
immutable ingoogle_monitoring_metric_descriptor
(#6372) - privateca: removed deprecated fields
config_values
,pem_certificates
fromgoogle_privateca_certificate
(#6097) - secretmanager: removed
automatic
field ingoogle_secret_manager_secret
resource (#6279) - servicenetworking: used Create instead of Patch to create
google_service_networking_connection
(#6222) - servicenetworking: used the
deleteConnection
method to delete the resourcegoogle_service_networking_connection
(#6332)
FEATURES:
- New Resource:
google_scc_folder_custom_module
(#6367) - New Resource:
google_scc_organization_custom_module
(#6390)
IMPROVEMENTS:
- alloydb: added additional fields to
google_alloydb_instance
andgoogle_alloydb_backup
(#6363) - artifactregistry: added support for remote APT and YUM repositories to
google_artifact_registry_repository
(#6362) - baremetal: made delete a noop for the resource
google_bare_metal_admin_cluster
to better align with actual behavior (#6388) - bigtable: added
state
output attribute togoogle_bigtable_instance
clusters (#6353) - compute: made
google_compute_node_group
mutable (#6384) - compute: added
network_interface.security_policy
field togoogle_compute_instance
resource (#6343) - compute: added
type
field togoogle_compute_router_nat
resource (#6331) - compute: added
rules.action.source_nat_active_ranges
andrules.action.source_nat_drain_ranges
field togoogle_compute_router_nat
resource (#6331) - compute: added
network_attachment
togoogle_compute_instance
(#6331) - container: added the
effective_taints
attribute togoogle_container_cluster
andgoogle_container_node_pool
, outputting all known taint values (#6351) - container: allowed setting
addons_config.gcs_fuse_csi_driver_config
ongoogle_container_cluster
withenable_autopilot: true
. (#6378) - containeraws: added
binary_authorization
togoogle_container_aws_cluster
(#6373) - containeraws: added
update_settings
togoogle_container_aws_node_pool
(#6373) - osconfig: added
week_day_of_month.day_offset
field to thegoogle_os_config_patch_deployment
resource (#6379) - secretmanager: allowed update for
rotation.rotation_period
field ingoogle_secret_manager_secret
resource (#6345) - sql: added
preferred_zone
field togoogle_sql_database_instance
resource (#6360) - storagetransfer: added
event_stream
field togoogle_storage_transfer_job
resource (#6382) - workstations: added
replica_zones
,service_account_scopes
, andenable_audit_agent
togoogle_workstations_workstation_config
(beta) (#6355)
BUG FIXES:
- bigquery: fixed diff suppression in
external_data_configuration.connection_id
ingoogle_bigquery_table
(#6368) - bigquery: fixed view and materialized view creation when schema is specified in
google_bigquery_table
(#6034) - bigtable: avoided re-creation of
google_bigtable_instance
when cluster is still updating and storage type changed (#6353) - bigtable: fixed a bug where dynamically created clusters would incorrectly run into duplication error in
google_bigtable_instance
(#6338) - compute: added default value to
metric.filter
in the resourcegoogle_compute_autoscaler
(beta) (#6082) - compute: removed the default value for field
reconcile_connections
in resourcegoogle_compute_service_attachment
, the field will now default to a value returned by the API when not set in configuration (#6322) - compute: replaced incorrect default value for
enable_endpoint_independent_mapping
with APIs default in resourcegoogle_compute_router_nat
(#6053) - container: fixed an issue in
google_container_node_pool
where emptylinux_node_config.sysctls
would crash the provider (#6339) - dataflow: fixed issue causing error message when max_workers and num_workers were supplied via parameters in
google_dataflow_flex_template_job
(#6357) - dataflow: fixed max_workers read value permanently displaying as 0 in
google_dataflow_flex_template_job
(#6357) - dataflow: fixed permadiff when SdkPipeline values are supplied via parameters in
google_dataflow_flex_template_job
(#6357) - firebase: made
google_firebase_rules.release
immutable (#6373) - identityplayform: fixed a potential perma-diff for
sign_in
ingoogle_identity_platform_config
resource (#6317) - monitoring: fixed an issue where
metadata
was not able to be updated ingoogle_monitoring_metric_descriptor
(#6372) - monitoring: fixed bug where importing
google_monitoring_notification_channel
failed when no default project was supplied in provider configuration or through environment variables (#6327) - secretmanager: fixed an issue in
google_secretmanager_secret
where replacingreplication.automatic
withreplication.auto
would destroy and recreate the resource (#6325) - sql: fixed diffs when re-ordering existing
database_flags
ingoogle_sql_database_instance
(#6172) - tags: fixed import failure on
google_tags_tag_binding
(#6383) - vertexai: made
contents_delta_uri
a required field ingoogle_vertex_ai_index
as omitting it would result in an error (#6374) - workstations: fixed in-place updates of
host.gce_instance.accelerators
ingoogle_workstation_config
(#6354)