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

google_compute_vpn_tunnel always recreated #5045

Closed
cinder-fish opened this issue Dec 2, 2019 · 2 comments
Closed

google_compute_vpn_tunnel always recreated #5045

cinder-fish opened this issue Dec 2, 2019 · 2 comments
Labels
bug forward/review In review; remove label to forward service/compute-vpn

Comments

@cinder-fish
Copy link

cinder-fish commented Dec 2, 2019

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 an 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 an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

Terraform v0.12.13
provider-google v2.19.0
provider-google-beta v2.19.0

Affected Resource(s)

  • google_compute_vpn_tunnel

Terraform Configuration Files

resource "google_compute_vpn_tunnel" "tunnel1_from" {
  provider              = google-beta
  project               = var.from.project
  name                  = "${var.name}-1"
  region                = var.region
  vpn_gateway           = google_compute_ha_vpn_gateway.gateway_from.self_link
  peer_gcp_gateway      = google_compute_ha_vpn_gateway.gateway_to.self_link
  shared_secret         = var.vpn_secret
  router                = google_compute_router.vpn_router_from.self_link
  vpn_gateway_interface = 0
}

Debug Output

Plan summary:

  # module.omnienv-prod-vpn.google_compute_vpn_tunnel.tunnel2_from must be replaced
-/+ resource "google_compute_vpn_tunnel" "tunnel2_from" {
      ~ creation_timestamp              = "2019-12-02T07:05:05.555-08:00" -> (known after apply)
      ~ detailed_status                 = "Tunnel is up and running." -> (known after apply)
      ~ id                              = "bcp-to-omnienv-prod-2" -> (known after apply)
        ike_version                     = 2
      ~ label_fingerprint               = "42WmSpB8rSM=" -> (known after apply)
      - labels                          = {} -> null
      ~ local_traffic_selector          = [
          - "0.0.0.0/0",
        ] -> (known after apply)
        name                            = "bcp-to-omnienv-prod-2"
      - peer_external_gateway_interface = 0 -> null
        peer_gcp_gateway                = "https://www.googleapis.com/compute/v1/projects/at-infrastructure-omnienv-prod/regions/europe-west1/vpnGateways/bcp-to-omnienv-prod-gateway"
      ~ peer_ip                         = "35.220.106.180" -> (known after apply)
        project                         = "at-delivery-platform-bcp"
        region                          = "europe-west1"
      ~ remote_traffic_selector         = [
          - "0.0.0.0/0",
        ] -> (known after apply)
        router                          = "https://www.googleapis.com/compute/v1/projects/at-delivery-platform-bcp/regions/europe-west1/routers/bcp-to-omnienv-prod-vpn-router"
      ~ self_link                       = "https://www.googleapis.com/compute/v1/projects/at-delivery-platform-bcp/regions/europe-west1/vpnTunnels/bcp-to-omnienv-prod-2" -> (known after apply)
      ~ shared_secret                   = (sensitive value)
      ~ shared_secret_hash              = "*****" -> (known after apply)
      ~ tunnel_id                       = "793041773261264590" -> (known after apply)
        vpn_gateway                     = "https://www.googleapis.com/compute/v1/projects/at-delivery-platform-bcp/regions/europe-west1/vpnGateways/bcp-to-omnienv-prod-gateway"
        vpn_gateway_interface           = 1
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Panic Output

N/A (no panic)

Expected Behavior

The resource is not changed in subsequent plans that have the same input

Actual Behavior

A difference is detected and the resource is planned to be deleted and recreated

Steps to Reproduce

  1. terraform apply
  2. terraform plan without any changes after the resource has been created

Important Factoids

This is between two GCP projects / regions, so there are mirrored configurations of router, vpn_gateway, interface, peer, tunnel resources in each.

None of the other resources types are appearing as changed (e.g. like the linked router or gateways), only the tunnel resources.

As in other issues can see fields like localTrafficSelector coming back as set in the GCP responses in the debug output

References

These appear to be similar previous issues:

#1963
#2336

  • #0000
@ghost ghost added the bug label Dec 2, 2019
@cinder-fish
Copy link
Author

Closing as I believe we've found our issue, the shared_secret value was different in our CI pipeline

@ghost
Copy link

ghost commented Mar 28, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-vpn labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug forward/review In review; remove label to forward service/compute-vpn
Projects
None yet
Development

No branches or pull requests

1 participant