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 crash while trying to import remote existing resources to state for Azure #17986

Closed
bardhi232 opened this issue May 3, 2018 · 2 comments

Comments

@bardhi232
Copy link

bardhi232 commented May 3, 2018

Terraform Version

0.11.7

Terraform Configuration Files

...

Debug Output

Crash Output

[root@u185178-fatbardh-hysa test3]# /home/centos/proxychains/proxychains4 terraform import azurerm_virtual_network.tvn /subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /home/centos/proxychains/libproxychains4.so
azurerm_virtual_network.tvn: Importing from ID "/subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3"...
azurerm_virtual_network.tvn: Import complete!
  Imported azurerm_virtual_network (ID: /subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3)
azurerm_virtual_network.tvn: Refreshing state... (ID: /subscriptions/7174e288-bcac-4aee-94e8-...virtualnetworks/test-vnet/subnets/sub3)
 
Error: azurerm_virtual_network.tvn (import id: /subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3): 1 error(s) occurred:
 
* import azurerm_virtual_network.tvn result: /subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3: azurerm_virtual_network.tvn: unexpected EOF
 
 
panic: runtime error: invalid memory address or nil pointer dereference
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x459078]
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: goroutine 38 [running]:
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm.resourceArmVirtualNetworkRead(0xc42012ec40, 0x1bf5460, 0xc4203b4000, 0xc42012ec40, 0x0)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_virtual_network.go:165 +0x290
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc4203f2540, 0xc42005c370, 0x1bf5460, 0xc4203b4000, 0xc4203fe980, 0xb9ca01, 0x800203f2a80)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:354 +0x17e
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc4203f2a80, 0xc42005c320, 0xc42005c370, 0x7f470dcfa000, 0x0, 0x18)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:308 +0x9a
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc4202b1260, 0xc4205955c0, 0xc420595800, 0x0, 0x0)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:549 +0x4e
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: reflect.Value.call(0xc4203667e0, 0xc42000d098, 0x13, 0x1c363e5, 0x4, 0xc42063af20, 0x3, 0x3, 0xc42010b700, 0xc42010b720, ...)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /usr/local/go/src/reflect/value.go:434 +0x905
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: reflect.Value.Call(0xc4203667e0, 0xc42000d098, 0x13, 0xc420777f20, 0x3, 0x3, 0xc42010b860, 0xc42010b880, 0xc42010b8a0)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /usr/local/go/src/reflect/value.go:302 +0xa4
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: net/rpc.(*service).call(0xc4201e1c00, 0xc42005db30, 0xc420361768, 0xc4200a5280, 0xc4202b1e40, 0x1940d00, 0xc4205955c0, 0x16, 0x1940d40, 0xc420595800, ...)
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /usr/local/go/src/net/rpc/server.go:381 +0x142
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4: created by net/rpc.(*Server).ServeCodec
2018-05-02T09:13:20.530Z [DEBUG] plugin.terraform-provider-azurerm_v1.3.3_x4:   /usr/local/go/src/net/rpc/server.go:475 +0x36b
2018-05-02T09:13:20.530Z [DEBUG] plugin: plugin process exited: path=/root/.terraform.d/plugins/linux_amd64/terraform-provider-azurerm_v1.3.3_x4
2018-05-02T09:13:20.530Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2018-05-02T09:13:20.532Z [DEBUG] plugin: plugin process exited: path=/root/.terraform.d/plugins/linux_amd64/terraform-provider-random_v1.2.0_x4
 
 
 
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.
 
When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.
 
[1]: https://github.com/hashicorp/terraform/issues
 
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expected Behavior

Actual Behavior

Steps to Reproduce

terraform import azurerm_virtual_network.tvn /subscriptions/SUBSCRIPTION_ID/resourceGroups/fhy-test-rs/providers/Microsoft.Network/virtualnetworks/test-vnet/subnets/sub3

Additional Context

References

@ghost
Copy link

ghost commented May 3, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-azurerm#1196 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-azurerm#1196.

@ghost
Copy link

ghost commented Apr 3, 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 3, 2020
This issue was closed.
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

2 participants