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 Azure returns a azurerm_virtual_machine with empty Network interface properties #207

Closed
sschne opened this issue Aug 2, 2017 · 3 comments

Comments

@sschne
Copy link
Contributor

sschne commented Aug 2, 2017

Hi there,

I am experiencing a crash when using Terraform v0.9.2+
The crash.log shows that a response from the Azure API returns a azurerm_virtual_machine configuration with a network Interface and an empty properties field.

The Bug was introduced with Commit

On Line 659 it is checked if NetworkInterfaceReferenceProperties is nil, which is not when a empty properties field is returned. The following attempt to access the "Primary" key is resulting in a nil pointer dereference.

I'm not sure if it is a Bug at Azure site that an empty properties field is returned. If not, it must be further checked if the properties field is empty before trying to access a key.

Affected Resource(s)

  • azurerm_virtual_machine

Panic Output

crash.log

@sschne
Copy link
Contributor Author

sschne commented Aug 2, 2017

Checking if "Primary" field exists before dereferencing it, tested with 0.9.11
#208

@tombuildsstuff
Copy link
Contributor

Fixed via #208

@ghost
Copy link

ghost commented Apr 1, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 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

2 participants