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

refresh error on manually-deleted google_compute_instance_group_manager #13943

Closed
evralston opened this issue Apr 25, 2017 · 5 comments
Closed

Comments

@evralston
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

$ terraform --version
Terraform v0.9.3

Affected Resource(s)

Please list the resources as a list, for example:

  • google_compute_instance_group_manager

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "google_compute_instance_group_manager" "placeholder_group" {
  name               = "placeholder-group"
  instance_template  = "${google_compute_instance_template.placeholder_template.self_link}"
  base_instance_name = "placeholder"
  zone               = "us-central1-b"
  target_size        = "3"
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

What should have happened?

Remove the missing object from the state file.

Actual Behavior

What actually happened?

Error refreshing state: 1 error(s) occurred:

* google_compute_instance_group_manager.placeholder_group: google_compute_instance_group_manager.placeholder_group: googleapi: Error 404: The resource 'projects/project-name/zones/us-central1-b/instanceGroupManagers/placeholder-group' was not found, notFound

Steps to Reproduce

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

  1. terraform apply
  2. Delete the instance group from the Google console
  3. terraform refresh

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@evralston
Copy link
Author

I mostly opened this because even though it's an easy thing to fix when it comes up, looking around at the other related tickets & PRs e.g. #1254 I get the sense that 404's need to be addressed in the more general case instead of on each resource.

@dasch
Copy link
Contributor

dasch commented Apr 26, 2017

I also keep running into this issue. Would love to see a fix.

@danawillow danawillow self-assigned this May 3, 2017
@danawillow
Copy link
Contributor

Hey @evralston and @dasch, I don't think this is something that can be easily fixed across providers that use different error types, but we can definitely improve the code a bit for the google one (it'll still be something that has to go in each resource though, unless you have an idea on how to make it more automatic).

@danawillow
Copy link
Contributor

Fixed for the rest of the resources in #14335

@ghost
Copy link

ghost commented Apr 12, 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 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants