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.71k stars 9.55k forks source link

value is marked, so must be unmarked first #34076

Closed UA-Admin2023 closed 1 year ago

UA-Admin2023 commented 1 year ago

Terraform Version

Terraform v1.6.0
on linux_amd64

Terraform Configuration Files

https://github.com/GoogleCloudPlatform/marketing-analytics-jumpstart/tree/main/infrastructure/terraform

Debug Output

Initializing the backend... Initializing modules... Downloading registry.terraform.io/terraform-google-modules/gcloud/google 3.1.2 for activation.add_invoker_binding...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work.

If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.

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

Terraform crashed! This is always indicative of a bug within Terraform. Please report the crash with Terraform1 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.

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

value is marked, so must be unmarked first goroutine 3820 [running]: runtime/debug.Stack() /opt/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:24 +0x5e runtime/debug.PrintStack() /opt/hostedtoolcache/go/1.21.1/x64/src/runtime/debug/stack.go:16 +0x13 github.com/hashicorp/terraform/internal/logging.PanicHandler() /home/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x13b panic({0x2b92ec0?, 0x38c4c30?}) /opt/hostedtoolcache/go/1.21.1/x64/src/runtime/panic.go:920 +0x270 github.com/zclconf/go-cty/cty.Value.assertUnmarked(...) /home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/marks.go:141 github.com/zclconf/go-cty/cty.Value.AsString({{{0x3902720?, 0xc000012ca1?}}, {0x2e1de40?, 0xc003c71200?}}) /home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_ops.go:1385 +0x47 github.com/zclconf/go-cty/cty.Value.Range({{{0x3902720?, 0xc000012ca1?}}, {0x2e1de40?, 0xc003c71200?}}) /home/runner/go/pkg/mod/github.com/zclconf/go-cty@v1.14.0/cty/value_range.go:53 +0x285 github.com/hashicorp/hcl/v2/hclsyntax.(ConditionalExpr).Value(0xc0002dc460, 0xc003c71188) /home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:746 +0xd6a github.com/hashicorp/hcl/v2/hclsyntax.(ObjectConsExpr).Value(0xc001769ae0, 0xc003c71188) /home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:1082 +0x27e github.com/hashicorp/hcl/v2/hclsyntax.(TupleConsExpr).Value(0xc001769c20, 0x0?) /home/runner/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.18.0/hclsyntax/expression.go:1018 +0x105 github.com/hashicorp/terraform/internal/lang.(Scope).EvalExpr(0xc004d42e10, {0x7ddebbcbba18?, 0xc001769c20}, {{0x3902f48?, 0x5130520?}}) /home/runner/work/terraform/terraform/internal/lang/eval.go:175 +0x1bd github.com/hashicorp/terraform/internal/terraform.(nodeModuleVariable).evalModuleVariable(0xc001593ec0, {0x391fb60?, 0xc002ba4d20?}, 0x80?) /home/runner/work/terraform/terraform/internal/terraform/node_module_variable.go:248 +0x225 github.com/hashicorp/terraform/internal/terraform.(nodeModuleVariable).Execute(0xc001593ec0, {0x391fb60, 0xc002ba4d20}, 0x4) /home/runner/work/terraform/terraform/internal/terraform/node_module_variable.go:183 +0x12c github.com/hashicorp/terraform/internal/terraform.(ContextGraphWalker).Execute(0xc001e3c000, {0x391fb60, 0xc002ba4d20}, {0x7ddebb96a838, 0xc001593ec0}) /home/runner/work/terraform/terraform/internal/terraform/graph_walk_context.go:143 +0xbe github.com/hashicorp/terraform/internal/terraform.(Graph).walk.func1({0x2f07ca0, 0xc001593ec0}) /home/runner/work/terraform/terraform/internal/terraform/graph.go:78 +0x375 github.com/hashicorp/terraform/internal/dag.(Walker).walkVertex(0xc0015a2060, {0x2f07ca0, 0xc001593ec0}, 0xc004d7e440) /home/runner/work/terraform/terraform/internal/dag/walk.go:384 +0x2e5 created by github.com/hashicorp/terraform/internal/dag.(Walker).Update in goroutine 1339 /home/runner/work/terraform/terraform/internal/dag/walk.go:307 +0xde8

Expected Behavior

Resources created

Actual Behavior

Terraform crash

Steps to Reproduce

terraform -chdir="${TERRAFORM_RUN_DIR}" init terraform -chdir="${TERRAFORM_RUN_DIR}" apply -lock=false

Additional Context

No response

References

No response

liamcervante commented 1 year ago

Duplicate of https://github.com/hashicorp/terraform/issues/33977.

@UA-Admin2023, if you upgrade to v1.6.1 this should be fixed for you.

github-actions[bot] commented 11 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.