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 during plan index out of range #3965

Closed
ghost opened this issue Jul 29, 2019 · 4 comments
Closed

TERRAFORM CRASH during plan index out of range #3965

ghost opened this issue Jul 29, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2019

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


Hi All, I am getting terraform crash while planning the application gateway. I am specifically having this issue while planning for application gateway.

Could you please take a look at this and let me know if I am missing anything. Below are the versions I am using for this. I am storing the terraform state remotely in Storage blob container.
terraform {
required_version = "= 0.11.14"
}
provider "azurerm" {
version = "= 1.27.1"
}
provider "null" {
version = "= 2.1.1"
}
provider "template" {
version = "= 2.1.1"
}

PS D:> terraform plan --target=module.appgateway

Warning: azurerm_subnet.agw1subnet: "network_security_group_id": [DEPRECATED] Use the azurerm_subnet_network_security_group_association resource instead.

Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Error: Error refreshing state: 1 error occurred:
* module.appgateway.azurerm_application_gateway.application_gateway: 1 error occurred:
* module.appgateway.azurerm_application_gateway.application_gateway: azurerm_application_gateway.application_gateway: unexpected EOF

panic: runtime error: index out of range
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe:
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: goroutine 127 [running]:
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/azurerm.flattenApplicationGatewayAuthenticationCertificates(0xc0007c2b40, 0xc0006a6380, 0x5, 0x0, 0x0)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_application_gateway.go:1276 +0x562
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/azurerm.resourceArmApplicationGatewayRead(0xc0006a6380, 0x2e56180, 0xc000cdc000, 0xc0006a6380, 0x0)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_application_gateway.go:1113 +0x631
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc00008ae00, 0xc0004f9ef0, 0x2e56180, 0xc000cdc000, 0xc000080fd8, 0x4d4201, 0x2a12
fe0)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:503 +0x179
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc000950980, 0xc0004f9ea0, 0xc0004f9ef0, 0xc000721c00, 0x0, 0x320000)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:324 +0x99
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc000c16780, 0xc0001346b0, 0xc000134780, 0x0, 0x0)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:552 +0x55
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: reflect.Value.call(0xc0000fd7a0, 0xc0000077d0, 0x13, 0x2f17ce5, 0x4, 0xc00060ff18, 0x3, 0x3, 0xc00005c9c0, 0xc0001e6390, ...)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/goenv/versions/1.11.5/src/reflect/value.go:447 +0x45b
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: reflect.Value.Call(0xc0000fd7a0, 0xc0000077d0, 0x13, 0xc00060ff18, 0x3, 0x3, 0x1000200000000, 0xc0001e6380, 0x0)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/goenv/versions/1.11.5/src/reflect/value.go:308 +0xab
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: net/rpc.(*service).call(0xc000bca100, 0xc0004f8b90, 0xc000c3f7f8, 0xc000c3f810, 0xc000950e80, 0xc000c16d80, 0x2a12fa0, 0xc0001346b0, 0x16, 0x2a12fe0, ...)
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/goenv/versions/1.11.5/src/net/rpc/server.go:384 +0x155
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: created by net/rpc.(*Server).ServeCodec
2019-07-29T14:12:43.363-0400 [DEBUG] plugin.terraform-provider-azurerm_v1.27.1_x4.exe: /opt/goenv/versions/1.11.5/src/net/rpc/server.go:481 +0x485
2019/07/29 14:12:43 [ERROR] root.appgateway: eval: *terraform.EvalRefresh, err: azurerm_application_gateway.application_gateway: unexpected EOF
2019/07/29 14:12:43 [ERROR] root.appgateway: eval: *terraform.EvalSequence, err: azurerm_application_gateway.application_gateway: unexpected EOF
2019/07/29 14:12:43 [TRACE] [walkRefresh] Exiting eval tree: module.appgateway.azurerm_application_gateway.application_gateway
2019/07/29 14:12:43 [TRACE] dag/walk: upstream errored, not walking "provider.azurerm (close)"
2019/07/29 14:12:43 [TRACE] dag/walk: upstream errored, not walking "root"
2019-07-29T14:12:43.379-0400 [DEBUG] plugin: plugin process exited: path=D:\SVN\Release\Release\Terraform\PrimaryInsights.terraform\plugins\windows_amd64\terraform-provider-azurerm_v1.27.1_x4.exe
2019/07/29 14:12:43 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-07-29T14:12:43.385-0400 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2019-07-29T14:12:43.387-0400 [DEBUG] plugin.terraform.exe: local-exec-provisioner (internal) 2019/07/29 14:12:43 [ERR] plugin: plugin server: accept tcp 127.0.0.1:10001: use of closed network connection
2019-07-29T14:12:43.387-0400 [DEBUG] plugin.terraform.exe: local-exec-provisioner (internal) 2019/07/29 14:12:43 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-07-29T14:12:43.397-0400 [DEBUG] plugin: plugin process exited: path="C:\Program Files\Terraform\terraform.exe"

!!!!!!!!!!!!!!!!!!!!!!!!!!! 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 Terraform1 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.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

@mbfrahry
Copy link
Member

Hey @roshanp85. Thanks for opening up this issue. We found the crash and patched it in #3966. It will go out in the next release (v1.32.1). Feel free to reopen this if you continue to have issues after that release goes out.

@roshanp85
Copy link

roshanp85 commented Jul 29, 2019 via email

@ghost
Copy link
Author

ghost commented Aug 1, 2019

This has been released in version 1.32.1 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.32.1"
}
# ... other configuration ...

@ghost
Copy link
Author

ghost commented Aug 29, 2019

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 Aug 29, 2019
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

3 participants