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_route forces new resource for next_hop_instance #16508

Closed
mwallman opened this issue Oct 31, 2017 · 3 comments
Closed

google_compute_route forces new resource for next_hop_instance #16508

mwallman opened this issue Oct 31, 2017 · 3 comments

Comments

@mwallman
Copy link

mwallman commented Oct 31, 2017

Terraform Version

Terraform v0.10.8

Terraform Configuration Files

resource "google_compute_route" "route" {
  name = "${var.name}-route"
  network = "${var.network}"
  dest_range = "0.0.0.0/0"
  priority = "${var.priority}"
  next_hop_instance = "${google_compute_instance.nat.self_link}"
  next_hop_instance_zone = "${var.zone}"
  tags = "${var.route_tags}"
}

Expected Behavior

Nothing, because nothing changed.

Actual Behavior

Terraform will perform the following actions:

  + google_compute_route.route
      id:                     <computed>
      dest_range:             "0.0.0.0/0"
      name:                   "us-west1-a-nat-route"
      network:                "https://www.googleapis.com/compute/v1/projects/marketo-network-dev/global/networks/dev-vpc"
      next_hop_instance:      "https://www.googleapis.com/compute/v1/projects/marketo-network-dev/zones/us-west1-a/instances/us-west1-a-nat"
      next_hop_instance_zone: "us-west1-a"
      next_hop_network:       <computed>
      priority:               "800"
      self_link:              <computed>
      tags.#:                 "1"
      tags.1668485976:        "us-west1-nat-external"

  - module.us-west1-a-nat.google_compute_route.route


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

**It recreates the instance, and hence the route, on each apply

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform plan
@morgante
Copy link

morgante commented Nov 2, 2017

As a temporary fix, you might be able to ignore changes either to the next_hop or the underlying instance's cloud data: https://www.terraform.io/docs/configuration/resources.html#ignore_changes

@hashibot
Copy link
Contributor

hashibot commented Nov 3, 2017

This issue has been automatically migrated to hashicorp/terraform-provider-google#677 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@hashibot hashibot closed this as completed Nov 3, 2017
@ghost
Copy link

ghost commented Apr 6, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants