Loading...
Loading...
### Terraform Version ```shell $ terraform version Terraform v1.10.0 on linux_amd64 ``` ### Terraform Configuration Files Can not easily share this and I doubt, that it is actually very relevant for this crash. The thing that I think is noteworthy is, that the Terraform configuration in question manages resources outside of Azure (in the case in question a Elastic Cloud Deployment) and Azure is only used for state management. ### Debug Output n/a The issue is not (easily) reproducible for me, so I can not run the task with `TF_LOG=trace` again. ### Expected Behavior Terraform azure/backend should not panic. ### Actual Behavior While executing a time consuming Terraform configuration (runtime ~2h 40min) at the end of my workday (relevant, since I assume, that my Azure credentials, timed out during the execution of Terraform), Terraform crashed with the following output: ``` !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! Terraform crashed! This is always indicative of a bug within Terraform. Please report the crash with Terraform[1] so that we can fix this. When reporting bugs, please include your terraform version, the stack trace shown below, and any additional information which may help replicate the issue. [1]: https://github.com/hashicorp/terraform/issues !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! panic: runtime error: invalid memory address or nil pointer dereference elasticstack_elasticsearch_transform.parsefailurestats: Modifications complete after 9m6s [id=0rCRR1y9Ty6xvFvKZ7kWLQ/parsefailurestats] elasticstack_elasticsearch_transform.logvolumebyapplication: Modifications complete after 9m6s [id=0rCRR1y9Ty6xvFvKZ7kWLQ/logvolumebyapplication] goroutine 1637 [running]: runtime/debug.Stack() runtime/debug/stack.go:26 +0x5e github.com/hashicorp/terraform/internal/logging.PanicHandler() github.com/hashicorp/terraform/internal/logging/panic.go:84 +0x16a panic({0x31d37a0?, 0x595a960?}) runtime/panic.go:785 +0x132 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1.1() github.com/hashicorp/terraform/internal/terraform/graph.go:59 +0x4c5 panic({0x31d37a0?, 0x595a960?}) runtime/panic.go:785 +0x132 github.com/hashicorp/terraform/internal/backend/remote-state/azure.(*RemoteClient).Put(0xc001186d20, {0xc00d9d4000, 0x4b495e, 0x4b6000}) github.com/hashicorp/terraform/internal/backend/remote-state/azure@v0.0.0-00010101000000-000000000000/client.go:92 +0x5e3 github.com/hashicorp/terraform/internal/states/remote.(*State).PersistState(0xc000640c60, 0x35a9620?) github.com/hashicorp/terraform/internal/states/remote/state.go:213 +0x763 github.com/hashicorp/terraform/internal/backend/local.(*StateHook).PostStateUpdate(0xc0009d6d70, 0xc00ac283a8) github.com/hashicorp/terraform/internal/backend/local/hook_state.go:60 +0x295 github.com/hashicorp/terraform/internal/terraform.updateStateHook.func1({0x3e3e7e0?, 0xc0009d6d70?}) github.com/hashicorp/terraform/internal/terraform/update_state_hook.go:16 +0x28 github.com/hashicorp/terraform/internal/terraform.(*BuiltinEvalContext).Hook(0x0?, 0xc0071cbf10) github.com/hashicorp/terraform/internal/terraform/eval_context_builtin.go:116 +0x71 github.com/hashicorp/terraform/internal/terraform.updateStateHook({0x3e48bb8, 0xc004cd9700}) github.com/hashicorp/terraform/internal/terraform/update_state_hook.go:15 +0xc6 github.com/hashicorp/terraform/internal/terraform.(*NodeApplyableResourceInstance).managedResourceExecute(0xc0039a4ff0, {0x3e48bb8, 0xc004cd9700}) github.com/hashicorp/terraform/internal/terraform/node_resource_apply_instance.go:380 +0x1cc7 github.com/hashicorp/terraform/internal/terraform.(*NodeApplyableResourceInstance).Execute(0x3e0fad0?, {0x3e48bb8?, 0xc004cd9700?}, 0x50?) github.com/hashicorp/terraform/internal/terraform/node_resource_apply_instance.go:123 +0x99 github.com/hashicorp/terraform/internal/terraform.(*ContextGraphWalker).Execute(0xc006e50000, {0x3e48bb8, 0xc004cd9700}, {0x7753e417e8d0, 0xc0039a4ff0}) github.com/hashicorp/terraform/internal/terraform/graph_walk_context.go:161 +0xb5 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x371d8a0, 0xc0039a4ff0}) github.com/hashicorp/terraform/internal/terraform/graph.go:143 +0x7c3 github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0xc0015a4000, {0x371d8a0, 0xc0039a4ff0}, 0xc006e06c40) github.com/hashicorp/terraform/internal/dag/walk.go:384 +0x2d1 created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 1430 github.com/hashicorp/terraform/internal/dag/walk.go:307 +0xfb3 ``` ### Steps to Reproduce 1. Have the state in Azure 2. Manage resources outside of Azure, which are time consuming to update (e.g. manage deployments in Elastic Cloud) 3. Start the Terraform apply shortly before the Azure credentials expire (make sure, that the azure credentials expire during the execution of the Terraform configuration) 4. Hopefully observe the crash to happen ### Additional Context _No response_ ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.