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

Terraform crashes when importing an Azure virtual machine #13974

Closed
omame opened this issue Apr 26, 2017 · 2 comments
Closed

Terraform crashes when importing an Azure virtual machine #13974

omame opened this issue Apr 26, 2017 · 2 comments

Comments

@omame
Copy link

omame commented Apr 26, 2017

Terraform Version

Terraform v0.9.3

Affected Resource(s)

azurerm_virtual_machine

Terraform Configuration Files

Not applicable.

Debug Output

It's all in the crash.log gist linked below.

Panic Output

Here's the gist

Expected Behavior

The resource should've been imported.

Actual Behavior

Terraform crashed and the resource didn't get imported.

Steps to Reproduce

  1. terraform import azurerm_virtual_machine.worker-web05-prod /subscriptions/<redacted>/resourceGroups/WebProd/providers/Microsoft.Compute/virtualMachines/worker-web05

Important Factoids

Maybe it's irrelevant but I created this virtual machine manually importing a managed disk.

Everything else has been successfully imported in the state, including the new managed disk, but for some reason the virtual machine is failing. In the past I've been able to import virtual machines just fine.

References

None.

@grubernaut
Copy link
Contributor

Stack Trace:

2017/04/26 12:11:26 [DEBUG] plugin: terraform: panic: runtime error: invalid memory address or nil pointer dereference
2017/04/26 12:11:26 [DEBUG] plugin: terraform: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x28f0f79]
2017/04/26 12:11:26 [DEBUG] plugin: terraform:
2017/04/26 12:11:26 [DEBUG] plugin: terraform: goroutine 299 [running]:
2017/04/26 12:11:26 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/azurerm.resourceArmVirtualMachineRead(0xc420339180, 0x546fa40, 0xc420596000, 0x0, 0x83f7760)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/private/tmp/terraform-20170412-58701-xi9h2i/terraform-0.9.3/src/github.com/hashicorp/terraform/builtin/providers/azurerm/resource_arm_virtual_machine.go:655 +0x6e9
2017/04/26 12:11:26 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc4202b7da0, 0xc4208e6050, 0x546fa40, 0xc420596000, 0xc420754710, 0xc420992801, 0x0)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/private/tmp/terraform-20170412-58701-xi9h2i/terraform-0.9.3/src/github.com/hashicorp/terraform/helper/schema/resource.go:314 +0x21d
2017/04/26 12:11:26 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc4202c4850, 0xc4208e6000, 0xc4208e6050, 0x971c000, 0x0, 0x0)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/private/tmp/terraform-20170412-58701-xi9h2i/terraform-0.9.3/src/github.com/hashicorp/terraform/helper/schema/provider.go:267 +0x91
2017/04/26 12:11:26 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc4200dffe0, 0xc42089e020, 0xc42089e280, 0x0, 0x0)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/private/tmp/terraform-20170412-58701-xi9h2i/terraform-0.9.3/src/github.com/hashicorp/terraform/plugin/resource_provider.go:510 +0x4e
2017/04/26 12:11:26 [DEBUG] plugin: terraform: reflect.Value.call(0xc420336480, 0xc4201de378, 0x13, 0x5a871f9, 0x4, 0xc420690f20, 0x3, 0x3, 0x5c1ccd0, 0xc42008c6e8, ...)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/usr/local/Cellar/go/1.8.1/libexec/src/reflect/value.go:434 +0x91f
2017/04/26 12:11:26 [DEBUG] plugin: terraform: reflect.Value.Call(0xc420336480, 0xc4201de378, 0x13, 0xc42008c720, 0x3, 0x3, 0xc42008c70c, 0x1, 0x1100000000)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/usr/local/Cellar/go/1.8.1/libexec/src/reflect/value.go:302 +0xa4
2017/04/26 12:11:26 [DEBUG] plugin: terraform: net/rpc.(*service).call(0xc420136140, 0xc420351fc0, 0xc420422190, 0xc4205d0480, 0xc4200de440, 0x4c772e0, 0xc42089e020, 0x16, 0x4c77320, 0xc42089e280, ...)
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/usr/local/Cellar/go/1.8.1/libexec/src/net/rpc/server.go:387 +0x144
2017/04/26 12:11:26 [DEBUG] plugin: terraform: created by net/rpc.(*Server).ServeCodec
2017/04/26 12:11:26 [DEBUG] plugin: terraform: 	/usr/local/Cellar/go/1.8.1/libexec/src/net/rpc/server.go:481 +0x404

@ghost
Copy link

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