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

Crash when importing Google compute instance group manager #3077

Closed
ghost opened this issue Feb 19, 2019 · 4 comments
Closed

Crash when importing Google compute instance group manager #3077

ghost opened this issue Feb 19, 2019 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 19, 2019

This issue was originally opened by @djjudas21 as hashicorp/terraform#20378. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

[jonathan@xps terraform]$ terraform -v
Terraform v0.11.11
+ provider.google v1.18.0

Installed on Linux with brew

Terraform Configuration Files

resource "google_compute_instance_group" "jenkins-nodes-terraform-2" {
  name        = "jenkins-nodes-terraform-2"
  zone        = "europe-west3-c"
  description = "This instance group is controlled by Instance Group Manager 'jenkins-nodes-terraform-2'. To modify instances in this group, use the Instance Group Manager API: https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers"
}

resource "google_compute_instance_group_manager" "jenkins-nodes-terraform-2" {
  name               = "jenkins-nodes-terraform-2"
  base_instance_name = "jenkins-node-terraform"
  instance_template  = "projects/basekit-ci/global/instanceTemplates/jenkins-node-v24"
  zone               = "europe-west3-c"
}

Debug Output

https://gist.github.com/djjudas21/7bdea29bb75441c3d33773db04ff1f85#file-debug-log

Crash Output

https://gist.github.com/djjudas21/7bdea29bb75441c3d33773db04ff1f85#file-crash-log

Expected Behavior

Ran terraform apply, knowing that the real resource already existed:

Error: Error applying plan:

1 error(s) occurred:

* google_compute_instance_group_manager.jenkins-nodes-terraform-2: 1 error(s) occurred:

* google_compute_instance_group_manager.jenkins-nodes-terraform-2: Error creating InstanceGroupManager: googleapi: Error 409: The resource 'projects/basekit-ci/zones/europe-west3-c/instanceGroupManagers/jenkins-nodes-terraform-2' already exists, alreadyExists

Ran terraform import, expecting the resource to be importted.

Actual Behavior

Crash

[jonathan@xps terraform]$ terraform import google_compute_instance_group_manager.jenkins-nodes-terraform-2 jenkins-nodes-terraform-2
google_compute_instance_group_manager.jenkins-nodes-terraform-2: Importing from ID "jenkins-nodes-terraform-2"...
google_compute_instance_group_manager.jenkins-nodes-terraform-2: Import complete!
  Imported google_compute_instance_group_manager (ID: jenkins-nodes-terraform-2)
google_compute_instance_group_manager.jenkins-nodes-terraform-2: Refreshing state... (ID: jenkins-nodes-terraform-2)

Error: google_compute_instance_group_manager.jenkins-nodes-terraform-2 (import id: jenkins-nodes-terraform-2): 1 error(s) occurred:

* import google_compute_instance_group_manager.jenkins-nodes-terraform-2 result: jenkins-nodes-terraform-2: google_compute_instance_group_manager.jenkins-nodes-terraform-2: unexpected EOF

Steps to Reproduce

Attempt to import an existing instance group manager

terraform init
terraform plan
terraform apply
terraform import google_compute_instance_group_manager.jenkins-nodes-terraform-2 jenkins-nodes-terraform-2

Additional Context

Running from command line. No customisation or anything weird.

@rileykarson
Copy link
Collaborator

Hey @djjudas21! Are you able to reproduce this issue with version 1.20.0 or 2.0.0 of the provider? 1.18.0 was a while ago, and I'd imagine this issue has been fixed since then although I can't recall any specific fixes offhand.

@djjudas21
Copy link

Ah sorry, I thought I was already on the latest provider before submitting the report as I re-ran terraform init but I just realised I need the -upgrade flag. I've now upgraded to 1.20.0 and yes the crash still occurs. I attempted to try 2.0.0 but my codebase isn't currently compatible.

@ghost ghost removed the waiting-response label Feb 19, 2019
@rileykarson
Copy link
Collaborator

I was unable to repro this, and we're 20 minor releases later and about to cut 3.0.0 in a week or two. Closing as outdated.

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Feb 7, 2020
…p#3077)

* Implement new-style resource state handling, add post-create taint and post-update await.

* Review comments

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Feb 7, 2020
…5616)

* Implement new-style resource state handling, add post-create taint and post-update await.

* Review comments

Signed-off-by: Modular Magician <[email protected]>
@ghost
Copy link
Author

ghost commented Mar 29, 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 29, 2020
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

2 participants