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 is always recreated. #1963

Closed
kedare opened this issue Aug 30, 2018 · 2 comments
Closed

google_compute_vpn_tunnel is always recreated. #1963

kedare opened this issue Aug 30, 2018 · 2 comments
Assignees
Labels

Comments

@kedare
Copy link

kedare commented Aug 30, 2018

Terraform Version

Terraform v0.11.8
+ provider.google v1.17.1

Affected Resource(s)

  • google_compute_vpn_tunnel

Terraform Configuration Files

resource "google_compute_vpn_tunnel" "gc-euw1-infra-to-hq-1" {
  name          = "gc-infra-to-hq-1"
  peer_ip       = "${var.hq-vpn-ip}"
  shared_secret = "${var.hq-vpn-psk}"
  router        = "${google_compute_router.gc-euw1-infra-router.self_link}"
  ike_version   = 1

  target_vpn_gateway = "${google_compute_vpn_gateway.gc-euw1-infra-vpngw-1.self_link}"
}

resource "google_compute_vpn_tunnel" "gc-euw1-infra-to-hq-2" {
  name          = "gc-infra-to-hq-2"
  peer_ip       = "${var.hq-vpn-ip}"
  shared_secret = "${var.hq-vpn-psk}"
  router        = "${google_compute_router.gc-euw1-infra-router.self_link}"
  ike_version   = 1

  target_vpn_gateway = "${google_compute_vpn_gateway.gc-euw1-infra-vpngw-2.self_link}"
}

Debug Output

https://gist.github.com/kedare/b4220314458d0e18507345e46871cd97

Panic Output

No panic

Expected Behavior

Desired state would match

Actual Behavior

A difference is detected on the state, even after applying the changes, it still doesn't match when running it right after applying it.
When checking with a terraform state show of the tunnel, it does match the desired state.

Steps to Reproduce

  1. terraform apply

Important Factoids

Nothing special, the whole Google Cloud project is managed by Terraform, no external changes are allowed.

References

Nothing

@paddycarver
Copy link
Contributor

This looks like a bug in our resource definition in Magic Modules--I believe we need to set the router field to diffsuppress using compareSelfLinkOrResourceName.

@danawillow danawillow self-assigned this Sep 6, 2018
modular-magician pushed a commit to modular-magician/terraform-provider-google that referenced this issue Sep 7, 2018
@ghost
Copy link

ghost commented Nov 17, 2018

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 Nov 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants