Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make terraform_labels field immutable for immutable resources #16469

Conversation

modular-magician
Copy link
Collaborator

part of #16374

ForceNew is added to the following resources. The state upgrades are needed for these resources to avoid resource recreation when upgrading to provider 5.x.

  • Beyondcorp_app_gateway
  • Bigquery_job
  • Certificate_manager_certificate_issuance_config
  • Cloud_run_domain_mapping
  • Database_migration_servcie_private_connection
  • Datastream_private_connection
  • Ml_engine_mode
  • Network_connectivity_policy_basd_route
  • Network_services_service_binding
  • Dataproc_workflow_template (DCL)

Empty update method is added to the handwritten resources and ForceNew is removed from 'labels' field to address the error All fields are ForceNew or Computed w/out Optional, Update is superfluous

  • Compute_instance_template
  • Compute_region_instance_template

Unaffected resources with update methods:

  • Dataflow_flex_template
  • dataflow_job
  • tpu_node
  • Certificate_manager_trust_confgi
  • Dataproc_job
  • Edge_container_vpn_connection

Release Note Template for Downstream PRs (will be copied)

provider: made `terraform_labels` immutable in immutable resources to not block the upgrade. This will create a Terraform plan that recreates the resource on `4.X` -> `5.6.0` upgrade for affected resources. A mitigation to backfill the values during the upgrade is planned, and will release resource-by-resource.

Derived from GoogleCloudPlatform/magic-modules#9394

…orp#9394)

* Make terraform_labels field immutable for immutable resources

* Revert change for dataflow job

* Skip updatable resources

* Use empty update for the handwritten immutable resources

* Update upgrade guide

* Remove dataflow tests

* Address comments

* Add forceNew to all subfields
[upstream:0756b25fd53a506eb23837a979eff784997f1366]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 2f25eb8 into hashicorp:main Nov 7, 2023
3 checks passed
Copy link

github-actions bot commented Dec 8, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant