Skip to content

Terraform CRASH after updating terraform version to 1.6 #33977

@henriquebrunialti

Description

@henriquebrunialti

Terraform Version

1.6.0

Terraform Configuration Files

I don't think the configuration has any impact here, since this crash has started after the release of the new version.

We aways install the lastest version of terraforms in our pipeline machines.

Providers:

2023-10-04T18:57:06.0116711Z ├── provider[registry.terraform.io/hashicorp/http]
2023-10-04T18:57:06.0117376Z ├── provider[registry.terraform.io/betr-io/mssql] 0.2.7
2023-10-04T18:57:06.0117815Z ├── provider[registry.terraform.io/mastercard/restapi] 1.18.2
2023-10-04T18:57:06.0119706Z ├── provider[registry.terraform.io/hashicorp/azurerm] 3.71.0
2023-10-04T18:57:06.0120458Z ├── provider[registry.terraform.io/cloudflare/cloudflare] 4.14.0
2023-10-04T18:57:06.0120978Z ├── provider[registry.terraform.io/hashicorp/template]
2023-10-04T18:57:06.0123309Z ├── provider[registry.terraform.io/hashicorp/time] 0.9.1
2023-10-04T18:57:06.0123865Z ├── provider[registry.terraform.io/hashicorp/local]
2023-10-04T18:57:06.0124345Z ├── provider[registry.terraform.io/hashicorp/azuread]

Debug Output

2023-10-04T18:57:12.9958114Z !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
2023-10-04T18:57:12.9958301Z 
2023-10-04T18:57:12.9973941Z value is marked, so must be unmarked first
2023-10-04T18:57:12.9974281Z goroutine 471 [running]:
2023-10-04T18:57:12.9974506Z runtime/debug.Stack()
2023-10-04T18:57:12.9974779Z 	/opt/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:24 +0x5e
2023-10-04T18:57:12.9975197Z runtime/debug.PrintStack()
2023-10-04T18:57:12.9975463Z 	/opt/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:16 +0x13
2023-10-04T18:57:12.9975751Z github.com/hashicorp/terraform/internal/logging.PanicHandler()
2023-10-04T18:57:12.9976027Z 	/home/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x13b
2023-10-04T18:57:12.9976526Z panic({0x2c47000?, 0x39833a0?})
2023-10-04T18:57:12.9976799Z 	/opt/hostedtoolcache/go/1.21.1/x64/src/runtime/panic.go:920 +0x270
2023-10-04T18:57:12.9977428Z github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)
2023-10-04T18:57:12.9977896Z 	/home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/marks.go:141
2023-10-04T18:57:12.9978388Z github.com/zclconf/go-cty/cty.Value.AsString({{{0x39c0fb0?, 0xc000122cb1?}}, {0x2ed3ce0?, 0xc002c872f0?}})
2023-10-04T18:57:12.9979020Z 	/home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_ops.go:1385 +0x47
2023-10-04T18:57:12.9980041Z github.com/zclconf/go-cty/cty.Value.Range({{{0x39c0fb0?, 0xc000122cb1?}}, {0x2ed3ce0?, 0xc002c872f0?}})
2023-10-04T18:57:12.9980469Z 	/home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_range.go:53 +0x285
2023-10-04T18:57:12.9980775Z github.com/hashicorp/hcl/v2/hclsyntax.(*ConditionalExpr).Value(0xc0006d4150, 0xc002c86c60)
2023-10-04T18:57:12.9981096Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:745 +0xd35
2023-10-04T18:57:12.9981447Z github.com/hashicorp/hcl/v2/hcldec.(*AttrSpec).decode(0xc0033d7470, 0xc002a54680?, {0xc002392c50?, 0x4?, 0xc0006346a0?}, 0xc002c86c60)
2023-10-04T18:57:12.9981961Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/spec.go:214 +0x1f5
2023-10-04T18:57:12.9982278Z github.com/hashicorp/hcl/v2/hcldec.ObjectSpec.decode(0xc0033d7380, 0xc0033d7380?, {0x5232260, 0x0, 0x0}, 0x10?)
2023-10-04T18:57:12.9982617Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/spec.go:88 +0x1f7
2023-10-04T18:57:12.9983132Z github.com/hashicorp/hcl/v2/hcldec.decode({0x39c2360, 0xc000b79080}, {0x5232260, 0x0, 0x0}, 0xc000a621f0?, {0x39c1838, 0xc0033d7380}, 0x0)
2023-10-04T18:57:12.9983473Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/decode.go:24 +0x10f
2023-10-04T18:57:12.9983801Z github.com/hashicorp/hcl/v2/hcldec.(*BlockSetSpec).decode(0xc0033d74a0, 0xc002c91440, {0xc002392538?, 0x4?, 0xc0006346a0?}, 0xc002c86c60?)
2023-10-04T18:57:12.9984712Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/spec.go:759 +0x1ff
2023-10-04T18:57:12.9985065Z github.com/hashicorp/hcl/v2/hcldec.ObjectSpec.decode(0xc0033d65d0, 0xc0033d65d0?, {0x0, 0x0, 0x0}, 0xc0030a8000?)
2023-10-04T18:57:12.9985565Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/spec.go:88 +0x1f7
2023-10-04T18:57:12.9985913Z github.com/hashicorp/hcl/v2/hcldec.decode({0x39c2360, 0xc000b78500}, {0x0, 0x0, 0x0}, 0x0?, {0x39c1838, 0xc0033d65d0}, 0x0)
2023-10-04T18:57:12.9986414Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/decode.go:24 +0x10f
2023-10-04T18:57:12.9986917Z github.com/hashicorp/hcl/v2/hcldec.Decode(...)
2023-10-04T18:57:12.9987448Z 	/home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hcldec/public.go:18
2023-10-04T18:57:12.9988168Z github.com/hashicorp/terraform/internal/lang.(*Scope).EvalBlock(0xc002c5fcb0, {0x39c1db0, 0xc003569cb0}, 0xc002a55178?)
2023-10-04T18:57:12.9988511Z 	/home/runner/work/terraform/terraform/internal/lang/eval.go:71 +0x1ea
2023-10-04T18:57:12.9988920Z github.com/hashicorp/terraform/internal/terraform.(*BuiltinEvalContext).EvaluateBlock(0xc0029e7920?, {0x39c1598, 0xc0006d3550}, 0xc001c5f9b0?, {0x0?, 0x0?}, {{{{0x0, 0x0}}, {0x0, 0x0}}, ...})
2023-10-04T18:57:12.9989344Z 	/home/runner/work/terraform/terraform/internal/terraform/eval_context_builtin.go:282 +0x145
2023-10-04T18:57:12.9990669Z github.com/hashicorp/terraform/internal/terraform.(*NodeValidatableResource).validateResource(0xc0012ce990, {0x39de640, 0xc000b640e0})
2023-10-04T18:57:12.9991198Z 	/home/runner/work/terraform/terraform/internal/terraform/node_resource_validate.go:372 +0x666
2023-10-04T18:57:12.9991559Z github.com/hashicorp/terraform/internal/terraform.(*NodeValidatableResource).Execute(0xc0012ce990, {0x39de640, 0xc000b640e0}, 0x0?)
2023-10-04T18:57:12.9991914Z 	/home/runner/work/terraform/terraform/internal/terraform/node_resource_validate.go:52 +0x55
2023-10-04T18:57:12.9992290Z github.com/hashicorp/terraform/internal/terraform.(*ContextGraphWalker).Execute(0xc0026f8480, {0x39de640, 0xc000b640e0}, {0x214fa4d8a20, 0xc0012ce990})
2023-10-04T18:57:12.9992653Z 	/home/runner/work/terraform/terraform/internal/terraform/graph_walk_context.go:143 +0xbe
2023-10-04T18:57:12.9993125Z github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x3190340, 0xc0012ce990})
2023-10-04T18:57:12.9993452Z 	/home/runner/work/terraform/terraform/internal/terraform/graph.go:78 +0x375
2023-10-04T18:57:12.9993788Z github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0xc00087f860, {0x3190340, 0xc0012ce990}, 0xc000e55640)
2023-10-04T18:57:12.9994219Z 	/home/runner/work/terraform/terraform/internal/dag/walk.go:384 +0x2e5
2023-10-04T18:57:12.9994534Z created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 21
2023-10-04T18:57:12.9994822Z 	/home/runner/work/terraform/terraform/internal/dag/walk.go:307 +0xde8

Expected Behavior

The terraform apply should have run successfully.

We had releases that ran fine 6 hours ago.

Actual Behavior

Terraform Apply is crashing even before the execution plan is made.

Steps to Reproduce

terraform init
terraform apply

with terraform 1.6.0

Additional Context

No response

References

No response

Metadata

Metadata

Labels

bugconfigconfirmeda Terraform Core team member has reproduced this issueupstream

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions