-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 panic: runtime error: index out of range #9495
Comments
Hi @Dinomoe, I have the same issue with Terraform v0.7.7. The panic
tells that the bug is at https://github.com/hashicorp/terraform/blob/v0.7.7/builtin/providers/vsphere/resource_vsphere_virtual_machine.go#L1066 (line 1066 in resource_vsphere_virtual_machine.go) which has been introduced by @thetuxkeeper on 2016-05-11 (see |
Same issue here, still happening with Terraform 0.8 |
+1 v0.7.0 - v0.8.4 all have this issue. |
I only hit this when the Guest OS is shutdown. With the Guest OS shutdown, there are not network interfaces, thus the array is left empty, thus an index out of bounds it thrown. |
I have noticed a few things since I first reported this. I can run a plan
against a new environment and it works. However after some time (24 hours)
if I make a modification to the TF file and re-run the plan I receive an
error. I have confirmed that the guest OS is powered on.
…-George
On Tue, Jan 24, 2017 at 12:38 PM, MichielVanderlee ***@***.*** > wrote:
I only hit this when the Guest OS is shutdown.
The reason is that it builds an array based on the Guest network
interfaces. Then later it just assumes the array populated and is ready for
modifications.
With the Guest OS shutdown, there are not network interfaces, thus the
array is left empty, thus an index out of bounds it thrown.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9495 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFNKkKUS31AG_bTDHYH4X3nyFOa5isRqks5rVlM9gaJpZM4Kcrpd>
.
|
Also getting this error in v0.9.8. Is there a solution or workaround for this issue? Thanks. |
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. |
Hello Newb Here,
When running a terraform plan I receive a !!! TERRAFORM CRASH !!!
Troubleshooting:
Original version Terraform v0.7.3
Upgraded to Terraform v0.7.7
Deploying to vSphere Resources
vsphere_virtual_machine.mi-edge-nodes
vsphere_virtual_machine.mi-control-nodes
vsphere_virtual_machine.mi-worker-nodes
vsphere_virtual_machine.mi-kubeworker-nodes
Terraform Configuration Files
vsphere.tf
https://gist.github.com/Dinomoe/73c7d70abb6127e81f773aa47c17a916
main.tf
https://gist.github.com/Dinomoe/16916ec517d67913a682e3d1124e7a2d
Debug Output
https://gist.github.com/Dinomoe/0d793c170525917eb6c8df8d5137e0ce
Panic Output
https://gist.github.com/Dinomoe/118221eb94fe3bb4180015e418772240
terraform.tfstate Output
https://gist.github.com/Dinomoe/b345aca90047c68805496263a019c166
Expected Behavior
What should have happened? Terraform Plan output expected.
Actual Behavior
What actually happened? Terraform Crash
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
The text was updated successfully, but these errors were encountered: