Loading...
Loading...
### Terraform Version ```shell latest ``` ### Terraform Configuration Files ```terraform terraform { required_version = ">= 1.14" required_providers { local = { source = "hashicorp/local" version = "~> 2.7" } } } module "bug" { version = "1" } ``` ### Debug Output ``` terraform init Initializing modules... !!!!!!!!!!!!!!!!!!!!!!!!!!! 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 goroutine 25 [running]: runtime/debug.Stack() runtime/debug/stack.go:26 +0x64 github.com/hashicorp/terraform/internal/logging.PanicHandler() github.com/hashicorp/terraform/internal/logging/panic.go:84 +0x16c panic({0x107bc8640?, 0x10a8a5820?}) runtime/panic.go:783 +0x120 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1.1() github.com/hashicorp/terraform/internal/terraform/graph.go:59 +0x30c panic({0x107bc8640?, 0x10a8a5820?}) runtime/panic.go:783 +0x120 github.com/hashicorp/terraform/internal/lang.(*Scope).EvalExpr(0x14000736000, {0x0, 0x0}, {{0x10847c2d8?, 0x1076c19b0?}}) github.com/hashicorp/terraform/internal/lang/eval.go:180 +0x148 github.com/hashicorp/terraform/internal/terraform.(*BuiltinEvalContext).EvaluateExpr(0x0?, {0x0, 0x0}, {{0x10847c2d8?, 0x1076c19b0?}}, {0x0?, 0x0?}) github.com/hashicorp/terraform/internal/terraform/eval_context_builtin.go:353 +0x84 github.com/hashicorp/terraform/internal/terraform.evalSource({0x0, 0x0}, 0x1, {0x1084b1fc0, 0x14000829680}) github.com/hashicorp/terraform/internal/terraform/node_module_install.go:188 +0x350 github.com/hashicorp/terraform/internal/terraform.(*nodeInstallModule).Execute(0x14000471ef0, {0x1084b1fc0, 0x14000829680}, 0xc0?) github.com/hashicorp/terraform/internal/terraform/node_module_install.go:87 +0x1b0 github.com/hashicorp/terraform/internal/terraform.(*ContextGraphWalker).Execute(0x1400085a000, {0x1084b1fc0, 0x14000829680}, {0x111ca42c0, 0x14000471ef0}) github.com/hashicorp/terraform/internal/terraform/graph_walk_context.go:170 +0xa0 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x107f1a0a0, 0x14000471ef0}) github.com/hashicorp/terraform/internal/terraform/graph.go:143 +0x598 github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0x1400083dda0, {0x107f1a0a0, 0x14000471ef0}, 0x14000819300) github.com/hashicorp/terraform/internal/dag/walk.go:393 +0x284 created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 1 github.com/hashicorp/terraform/internal/dag/walk.go:316 +0xae4 ``` ### Expected Behavior No panic ### Actual Behavior paaaanic ### Steps to Reproduce `terraform init` ### Additional Context Related: * https://github.com/hashicorp/terraform/pull/38560 * https://github.com/hashicorp/terraform/pull/38227/changes#diff-c53dd53740c81e9b2640a4013b03ba28088c2d1b90ca9c9014be7b368cd4f6efR181-R183 ### 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.