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

GCE terraform refresh google_compute_instance does not refresh machine_type #11552

Closed
leighmhart opened this issue Jan 31, 2017 · 3 comments
Closed

Comments

@leighmhart
Copy link

Terraform Version 0.8.2 but issue is also present in 0.8.5

Affected Resource(s)

Please list the resources as a list, for example:

  • google_compute_instance

Terraform Configuration Files

resource "google_compute_instance" "testInstance" {
  name = "testInstance"
  description = "testInstance"
  machine_type = "custom-1-6144"
  zone = "europe-west1-b"

  lifecycle {
    ignore_changes = [
      "create_timeout"
    ]
  }

  disk {
    disk = "disk-1"
    device_name = "disk1"
    auto_delete = "false"
  }

  network_interface {
    subnetwork = "somewhere-europe-west"
  }

  can_ip_forward = "false"
}

Debug Output

Please contact me privately for Gist link, but it is easily repeatable, see below.

Panic Output:

none

Expected Behavior

https://www.terraform.io/docs/commands/refresh.html

reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state, and to update the state file.

Actual Behavior

The state file is not updated from the real-world infrastructure.

Steps to Reproduce

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

  1. deploy a google_compute_instance with terraform
  2. edit the machine-type using GCP's console's sizing recommendations tool (https://cloud.google.com/compute/docs/instances/viewing-sizing-recommendations-for-instances)
  3. terraform refresh - does not update state from GCP

Important Factoids

https://cloud.google.com/compute/docs/instances/viewing-sizing-recommendations-for-instances

is a new feature (currently listed as Beta, but widely adopted) - so there may have been an assumption in the Terraform code for google_compute_instance to not need to refresh normally un-editable resource attributes via the console.

References

None found.

@mbfrahry
Copy link
Member

mbfrahry commented Feb 3, 2017

Hey @allandrick! Thanks for finding and posting this issue. We just merged a fix for this, PR #11645

@mbfrahry mbfrahry closed this as completed Feb 3, 2017
@leighmhart
Copy link
Author

Hi @mbfrahry,

Do you happen to know which release will include this PR? I checked the changelog on various tags but couldn't see a reference to it.

Thanks!

@ghost
Copy link

ghost commented Apr 16, 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 16, 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

3 participants