hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.35k stars 9.49k forks source link

Terraform crashed during upgrade from 1.5.7 to 1.6.0 #34027

Closed manoj7shekhawat closed 11 months ago

manoj7shekhawat commented 11 months ago

Terraform Version

Terraform v1.6.0
on darwin_arm64

Terraform Configuration Files

...terraform config...
backend.conf
resource_group_name  = "dev-we-pro-core-rg"
storage_account_name = "dev0we0pro0state0st"
container_name              = "backend"
key                                   = "dev.terraform.tfstate"% 

Debug Output

value is marked, so must be unmarked first goroutine 556 [running]: runtime/debug.Stack() /Users/runner/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:24 +0x64 runtime/debug.PrintStack() /Users/runner/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:16 +0x1c github.com/hashicorp/terraform/internal/logging.PanicHandler() /Users/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x164 panic({0x1054ae8a0?, 0x105a9e060?}) /Users/runner/hostedtoolcache/go/1.21.1/x64/src/runtime/panic.go:920 +0x26c github.com/zclconf/go-cty/cty.Value.assertUnmarked(...) /Users/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/marks.go:141 github.com/zclconf/go-cty/cty.Value.AsString({{{0x105adbb88?, 0x14000010c89?}}, {0x10573b9a0?, 0x14001d01338?}}) /Users/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_ops.go:1385 +0x54 github.com/zclconf/go-cty/cty.Value.Range({{{0x105adbb88?, 0x14000010c89?}}, {0x10573b9a0?, 0x14001d01338?}}) /Users/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_range.go:53 +0x25c github.com/hashicorp/hcl/v2/hclsyntax.(ConditionalExpr).Value(0x140007eb9d0, 0x14001d01308) /Users/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:745 +0x9c0 github.com/hashicorp/hcl/v2/hclsyntax.(ObjectConsExpr).Value(0x140007ffae0, 0x14001d01308) /Users/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:1082 +0x1f0 github.com/hashicorp/terraform/internal/lang.(Scope).EvalExpr(0x14002a081b0, {0x108129898?, 0x140007ffae0}, {{0x105adc3a8?, 0x107298580?}}) /Users/runner/work/terraform/terraform/internal/lang/eval.go:175 +0x17c github.com/hashicorp/terraform/internal/terraform.(BuiltinEvalContext).EvaluateExpr(0x14001b5f758?, {0x108129898, 0x140007ffae0}, {{0x105adc3a8?, 0x107298580?}}, {0x0?, 0x0?}) /Users/runner/work/terraform/terraform/internal/terraform/eval_context_builtin.go:289 +0x84 github.com/hashicorp/terraform/internal/terraform.(NodeLocal).Execute(0x12ecebc38?, {0x105af6450, 0x14001c200e0}, 0x80?) /Users/runner/work/terraform/terraform/internal/terraform/node_local.go:158 +0x440 github.com/hashicorp/terraform/internal/terraform.(ContextGraphWalker).Execute(0x14001922d80, {0x105af6450, 0x14001c200e0}, {0x12ec6c0b0, 0x14002c94ea0}) /Users/runner/work/terraform/terraform/internal/terraform/graph_walk_context.go:143 +0xa0 github.com/hashicorp/terraform/internal/terraform.(Graph).walk.func1({0x1058780a0, 0x14002c94ea0}) /Users/runner/work/terraform/terraform/internal/terraform/graph.go:78 +0x280 github.com/hashicorp/terraform/internal/dag.(Walker).walkVertex(0x14001098b40, {0x1058780a0, 0x14002c94ea0}, 0x14002d2dd80) /Users/runner/work/terraform/terraform/internal/dag/walk.go:384 +0x2a8 created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 363 /Users/runner/work/terraform/terraform/internal/dag/walk.go:307 +0xb0c

Expected Behavior

Terraform should not crash while generating plan

Actual Behavior

Terraform is crashing while generating plan

Steps to Reproduce

terraform init terraform plan

Additional Context

We are planning to upgrade terraform from 1.5.7 to 1.6.0

References

No response

jbardin commented 11 months ago

Duplicate of #33977

github-actions[bot] commented 9 months ago

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.