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 change on google_compute_network_peering non destructive #5971

Closed
sdif opened this issue Mar 25, 2020 · 4 comments · Fixed by GoogleCloudPlatform/magic-modules#4138, hashicorp/terraform-provider-google-beta#2633 or #7619

Comments

@sdif
Copy link

sdif commented Mar 25, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Hi,
We want to enable export_custom_routes on a previously created google_compute_network_peering resource but it's a destructive operation when done through Terraform where it is not the case when done through the GCP Web UI.

Here is the output of the Terraform plan:

  # google_compute_network_peering.peering-production-data-prod must be replaced
-/+ resource "google_compute_network_peering" "peering-production-data-prod" {
      ~ auto_create_routes   = true -> (known after apply)
      ~ export_custom_routes = false -> true # forces replacement
      ~ id                   = "production-network/peering-production-data-prod" -> (known after apply)
        import_custom_routes = false
        name                 = "peering-production-data-prod"
        network              = "https://www.googleapis.com/compute/v1/projects/***/global/networks/production-network"
        peer_network         = "https://www.googleapis.com/compute/v1/projects/***/global/networks/data-prod-network"
      ~ state                = "ACTIVE" -> (known after apply)
      ~ state_details        = "[2020-03-25T07:38:13.328-07:00]: Connected." -> (known after apply)
    }

Is it possible to make this change non destructive ?
Thanks!

New or Affected Resource(s)

  • google_compute_network_peering

Potential Terraform Configuration

resource "google_compute_network_peering" "peering-production-data-prod" {
  name         = "peering-production-data-prod"
  network      = google_compute_network.production.self_link
  peer_network = data.google_compute_network.data-prod-network.self_link

  export_custom_routes = true
}

References

@ghost ghost added the enhancement label Mar 25, 2020
@danawillow danawillow added this to the Goals milestone Mar 30, 2020
@anGie44 anGie44 linked a pull request Apr 1, 2020 that will close this issue
@anGie44 anGie44 self-assigned this Apr 2, 2020
@mzaheer
Copy link

mzaheer commented Oct 16, 2020

Hi is there an update on this issue? Making any changes to export or import custom routes should be a non-destructive operation on the peering connection. Making the same changes via the console or the SDK does not destroy the peering connection in question.

@anGie44 I see you have a pull request in for the change but do we know when we can expect the request to be merged/resolved?

@rileykarson
Copy link
Collaborator

Internal reference: b/171209909

@mzaheer
Copy link

mzaheer commented Oct 23, 2020

Awesome. Thank you guys!

@ghost
Copy link

ghost commented Nov 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 23, 2020
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-network-peering labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.