Skip to content

Instantly share code, notes, and snippets.

@peikk0
Created April 27, 2021 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peikk0/813a660c334fef294db7b12557be9048 to your computer and use it in GitHub Desktop.
Save peikk0/813a660c334fef294db7b12557be9048 to your computer and use it in GitHub Desktop.
Terraform v0.15.1 setproduct() funtion panic
│ Error: Error in function call
│ on outputs.tf line 2, in output "panics":
│ 2: value = setproduct([], [])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 73 [running]:
│ runtime/debug.Stack(0xc0006ee070, 0x3018fc0, 0xc0006d6120)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc0006ee828, 0xc0006ee848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc0006d6120)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc0006d6110, 0x2edef60, 0xc0006e43c0, 0x30c5400, 0x0, 0x3398160, 0xc0006f0900, 0x0, 0xc0006e43a8)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc000880000, 0x2, 0x2, 0x3835d18, 0xc0006d6100, 0xc0006d6100, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc000880000, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0003ba000, 0xc0006e4330, 0x0, 0xc0006ef900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0006e2000, 0x3834b28, 0xc0003ba000, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc00064d790, 0x3834b28, 0xc0003ba000, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00068f9c0, 0x386ba90, 0xc00064d790, 0xc00013c004, 0xc0006d3ce8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc0006998c0, 0x386ba90, 0xc00064d790, 0x2caf4ce8, 0xc00068f9c0, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00068f9c0, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0003ed620, 0x3214220, 0xc00068f9c0, 0xc000076e40)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
│ Error: Error in function call
│ on outputs.tf line 6, in output "panics_too":
│ 6: value = setproduct(["a", "b"], [])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 74 [running]:
│ runtime/debug.Stack(0xc0005b2070, 0x3018fc0, 0xc00026a270)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc0005b2828, 0xc0005b2848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc00026a270)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc00026a260, 0x2edef60, 0xc000712ac8, 0x30c5400, 0x0, 0x3398160, 0xc0005c0690, 0x0, 0xc000712ab0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc000139c80, 0x2, 0x2, 0x3835d18, 0xc00026a250, 0xc00026a250, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc000139c80, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0003ba0f0, 0xc000712a38, 0x0, 0xc0005b3900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0000b4050, 0x3834b28, 0xc0003ba0f0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc00064d790, 0x3834b28, 0xc0003ba0f0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00068fa00, 0x386ba90, 0xc00064d790, 0xc00013c004, 0xc000115ce8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc0006998c0, 0x386ba90, 0xc00064d790, 0x2caf4ce8, 0xc00068fa00, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00068fa00, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0003ed620, 0x3214220, 0xc00068fa00, 0xc000076d00)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
│ Error: Error in function call
│ on outputs.tf line 10, in output "panics_again":
│ 10: value = setproduct([], ["c", "d"])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 75 [running]:
│ runtime/debug.Stack(0xc00075a070, 0x3018fc0, 0xc000191e40)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc00075a828, 0xc00075a848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc000191e40)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc000191e30, 0x2edef60, 0xc000652be8, 0x30c5400, 0x0, 0x3398160, 0xc0006a7560, 0x0, 0xc000652bd0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc000076ec0, 0x2, 0x2, 0x3835d18, 0xc000191e20, 0xc000191e20, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc000076ec0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0003ba1e0, 0xc000652b58, 0x0, 0xc00075b900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00013de50, 0x3834b28, 0xc0003ba1e0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc00064d790, 0x3834b28, 0xc0003ba1e0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00068fa40, 0x386ba90, 0xc00064d790, 0x2caf4c04, 0xc000113ce8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc0006998c0, 0x386ba90, 0xc00064d790, 0x2caf4ce8, 0xc00068fa40, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00068fa40, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0003ed620, 0x3214220, 0xc00068fa40, 0xc000076d40)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
2021-04-27T16:14:12.336+1200 [DEBUG] Adding temp file log sink: /var/folders/g4/f7pkh7c910d3qx5x7zykppd80000gn/T/terraform-log998750457
2021-04-27T16:14:12.336+1200 [INFO] Terraform version: 0.15.1
2021-04-27T16:14:12.337+1200 [INFO] Go runtime version: go1.16.2
2021-04-27T16:14:12.337+1200 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.2.0/versions/0.15.1/terraform", "plan"}
2021-04-27T16:14:12.337+1200 [TRACE] Stdout is a terminal of width 238
2021-04-27T16:14:12.337+1200 [TRACE] Stderr is a terminal of width 238
2021-04-27T16:14:12.337+1200 [TRACE] Stdin is a terminal
2021-04-27T16:14:12.337+1200 [DEBUG] Attempting to open CLI config file: /Users/pguinoiseau/.terraformrc
2021-04-27T16:14:12.337+1200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021-04-27T16:14:12.337+1200 [DEBUG] checking for credentials in "/Users/pguinoiseau/.terraform.d/plugins"
2021-04-27T16:14:12.337+1200 [DEBUG] checking for credentials in "/Users/pguinoiseau/.terraform.d/plugins/darwin_amd64"
2021-04-27T16:14:12.337+1200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021-04-27T16:14:12.337+1200 [DEBUG] will search for provider plugins in /Users/pguinoiseau/.terraform.d/plugins
2021-04-27T16:14:12.337+1200 [DEBUG] ignoring non-existing provider search directory /Users/pguinoiseau/Library/Application Support/io.terraform/plugins
2021-04-27T16:14:12.337+1200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2021-04-27T16:14:12.338+1200 [INFO] CLI command args: []string{"plan"}
2021-04-27T16:14:12.339+1200 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2021-04-27T16:14:12.339+1200 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2021-04-27T16:14:12.339+1200 [DEBUG] New state was assigned lineage "309140c9-2be0-4394-90ab-16634c15abda"
2021-04-27T16:14:12.339+1200 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2021-04-27T16:14:12.339+1200 [TRACE] Meta.Backend: instantiated backend of type <nil>
2021-04-27T16:14:12.339+1200 [DEBUG] checking for provisioner in "."
2021-04-27T16:14:12.339+1200 [DEBUG] checking for provisioner in "/usr/local/Cellar/tfenv/2.2.0/versions/0.15.1"
2021-04-27T16:14:12.339+1200 [DEBUG] checking for provisioner in "/Users/pguinoiseau/.terraform.d/plugins"
2021-04-27T16:14:12.339+1200 [DEBUG] checking for provisioner in "/Users/pguinoiseau/.terraform.d/plugins/darwin_amd64"
2021-04-27T16:14:12.339+1200 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2021-04-27T16:14:12.339+1200 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2021-04-27T16:14:12.339+1200 [INFO] backend/local: starting Plan operation
2021-04-27T16:14:12.339+1200 [TRACE] backend/local: requesting state manager for workspace "default"
2021-04-27T16:14:12.339+1200 [TRACE] backend/local: state manager for workspace "default" will:
- read initial snapshot from terraform.tfstate
- write new snapshots to terraform.tfstate
- create any backup at terraform.tfstate.backup
2021-04-27T16:14:12.339+1200 [TRACE] backend/local: requesting state lock for workspace "default"
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: existing snapshot has lineage "b647db16-e60b-242a-51ab-e77360e44b8a" serial 1
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info
2021-04-27T16:14:12.340+1200 [TRACE] backend/local: reading remote state for workspace "default"
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2021-04-27T16:14:12.340+1200 [TRACE] statemgr.Filesystem: read snapshot with lineage "b647db16-e60b-242a-51ab-e77360e44b8a" serial 1
2021-04-27T16:14:12.340+1200 [TRACE] backend/local: retrieving local state snapshot for workspace "default"
2021-04-27T16:14:12.340+1200 [TRACE] backend/local: building context for current working directory
2021-04-27T16:14:12.341+1200 [TRACE] terraform.NewContext: starting
2021-04-27T16:14:12.341+1200 [TRACE] terraform.NewContext: loading provider schemas
2021-04-27T16:14:12.341+1200 [TRACE] terraform.NewContext: complete
2021-04-27T16:14:12.341+1200 [TRACE] backend/local: finished building terraform.Context
2021-04-27T16:14:12.341+1200 [TRACE] backend/local: requesting interactive input, if necessary
2021-04-27T16:14:12.341+1200 [TRACE] Context.Input: Prompting for provider arguments
2021-04-27T16:14:12.341+1200 [TRACE] backend/local: running validation operation
2021-04-27T16:14:12.341+1200 [INFO] terraform: building graph: GraphTypeValidate
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.ConfigTransformer
2021-04-27T16:14:12.341+1200 [TRACE] ConfigTransformer: Starting for path:
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.ConfigTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.LocalTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.LocalTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.OutputTransformer
2021-04-27T16:14:12.341+1200 [TRACE] OutputTransformer: adding panics_again as *terraform.NodeApplyableOutput
2021-04-27T16:14:12.341+1200 [TRACE] OutputTransformer: adding does_not_panic as *terraform.NodeApplyableOutput
2021-04-27T16:14:12.341+1200 [TRACE] OutputTransformer: adding panics as *terraform.NodeApplyableOutput
2021-04-27T16:14:12.341+1200 [TRACE] OutputTransformer: adding panics_too as *terraform.NodeApplyableOutput
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.OutputTransformer with new graph:
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
------
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.StateTransformer
2021-04-27T16:14:12.341+1200 [TRACE] StateTransformer: state is empty, so nothing to do
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.StateTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
------
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2021-04-27T16:14:12.341+1200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.graphTransformerMulti (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2021-04-27T16:14:12.341+1200 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2021-04-27T16:14:12.341+1200 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2021-04-27T16:14:12.342+1200 [DEBUG] ReferenceTransformer: "output.panics_too" references: []
2021-04-27T16:14:12.342+1200 [DEBUG] ReferenceTransformer: "output.panics_again" references: []
2021-04-27T16:14:12.342+1200 [DEBUG] ReferenceTransformer: "output.does_not_panic" references: []
2021-04-27T16:14:12.342+1200 [DEBUG] ReferenceTransformer: "output.panics" references: []
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.attachDataResourceDependsOnTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.attachDataResourceDependsOnTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.TargetsTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
------
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.CloseProviderTransformer (no changes)
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
output.does_not_panic - *terraform.NodeApplyableOutput
output.panics - *terraform.NodeApplyableOutput
output.panics_again - *terraform.NodeApplyableOutput
output.panics_too - *terraform.NodeApplyableOutput
root - *terraform.nodeCloseModule
meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
------
2021-04-27T16:14:12.342+1200 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2021-04-27T16:14:12.342+1200 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer (no changes)
2021-04-27T16:14:12.342+1200 [DEBUG] Starting graph walk: walkValidate
2021-04-27T16:14:12.342+1200 [TRACE] vertex "output.panics_again": starting visit (*terraform.NodeApplyableOutput)
2021-04-27T16:14:12.342+1200 [TRACE] vertex "output.does_not_panic": starting visit (*terraform.NodeApplyableOutput)
2021-04-27T16:14:12.342+1200 [TRACE] vertex "output.panics": starting visit (*terraform.NodeApplyableOutput)
2021-04-27T16:14:12.342+1200 [TRACE] vertex "output.panics_too": starting visit (*terraform.NodeApplyableOutput)
2021-04-27T16:14:12.343+1200 [TRACE] setValue: Saving Create change for output.does_not_panic in changeset
2021-04-27T16:14:12.343+1200 [TRACE] setValue: Saving value for output.does_not_panic in state
2021-04-27T16:14:12.343+1200 [TRACE] setValue: Saving Create change for output.does_not_panic in changeset
2021-04-27T16:14:12.343+1200 [TRACE] setValue: Saving value for output.does_not_panic in state
2021-04-27T16:14:12.343+1200 [TRACE] vertex "output.does_not_panic": visit complete
2021-04-27T16:14:12.343+1200 [TRACE] vertex "output.panics_again": visit complete
2021-04-27T16:14:12.343+1200 [TRACE] vertex "output.panics_too": visit complete
2021-04-27T16:14:12.343+1200 [TRACE] vertex "output.panics": visit complete
2021-04-27T16:14:12.343+1200 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2021-04-27T16:14:12.343+1200 [TRACE] dag/walk: upstream of "root" errored, so skipping
2021-04-27T16:14:12.343+1200 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2021-04-27T16:14:12.346+1200 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
│ Error: Error in function call
│ on outputs.tf line 2, in output "panics":
│ 2: value = setproduct([], [])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 67 [running]:
│ runtime/debug.Stack(0xc0005c6070, 0x3018fc0, 0xc00070c2e0)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc0005c6828, 0xc0005c6848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc00070c2e0)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc00070c290, 0x2edef60, 0xc0005bc3c0, 0x30c5400, 0x0, 0x3398160, 0xc0005c8900, 0x0, 0xc0005bc3a8)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc0005d8000, 0x2, 0x2, 0x3835d18, 0xc00070c240, 0xc00070c240, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc0005d8000, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0001f2000, 0xc0005bc330, 0x0, 0xc0005c7900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0005ba000, 0x3834b28, 0xc0001f2000, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc0005681a0, 0x3834b28, 0xc0001f2000, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00029b780, 0x386ba90, 0xc0005681a0, 0xc00013c004, 0xc0005acce8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc00050e540, 0x386ba90, 0xc0005681a0, 0xa926638, 0xc00029b780, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00029b780, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc000558840, 0x3214220, 0xc00029b780, 0xc000560680)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
│ Error: Error in function call
│ on outputs.tf line 6, in output "panics_too":
│ 6: value = setproduct(["a", "b"], [])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 68 [running]:
│ runtime/debug.Stack(0xc00043e070, 0x3018fc0, 0xc0003488e0)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc00043e828, 0xc00043e848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc0003488e0)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc0003488d0, 0x2edef60, 0xc000127de8, 0x30c5400, 0x0, 0x3398160, 0xc0003779b0, 0x0, 0xc000127dd0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc000077280, 0x2, 0x2, 0x3835d18, 0xc0003488c0, 0xc0003488c0, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc000077280, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0001f20f0, 0xc000127d58, 0x0, 0xc00043f900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00013cd70, 0x3834b28, 0xc0001f20f0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc0005681a0, 0x3834b28, 0xc0001f20f0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00029b7c0, 0x386ba90, 0xc0005681a0, 0xc00013c004, 0xc0003dece8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc00050e540, 0x386ba90, 0xc0005681a0, 0xa926638, 0xc00029b7c0, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00029b7c0, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc000558840, 0x3214220, 0xc00029b7c0, 0xc0005606c0)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
│ Error: Error in function call
│ on outputs.tf line 10, in output "panics_again":
│ 10: value = setproduct([], ["c", "d"])
│ Call to function "setproduct" failed: panic in function implementation: runtime error: hash of unhashable type cty.ValueMarks
│ goroutine 65 [running]:
│ runtime/debug.Stack(0xc00057e070, 0x3018fc0, 0xc0007c7120)
│ /usr/local/go/src/runtime/debug/stack.go:24 +0x9f
│ github.com/zclconf/go-cty/cty/function.errorForPanic(...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/error.go:44
│ github.com/zclconf/go-cty/cty/function.Function.Call.func1(0xc00057e828, 0xc00057e848)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:291 +0x93
│ panic(0x3018fc0, 0xc0007c7120)
│ /usr/local/go/src/runtime/panic.go:965 +0x1b9
│ github.com/zclconf/go-cty/cty.Value.Mark(0x3835d18, 0xc0007c7110, 0x2edef60, 0xc00000dce0, 0x30c5400, 0x0, 0x3398160, 0xc00055f620, 0x0, 0xc00000dcc8)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/marks.go:208 +0x1dc
│ github.com/zclconf/go-cty/cty/function/stdlib.glob..func33(0xc000560780, 0x2, 0x2, 0x3835d18, 0xc0007c7100, 0xc0007c7100, 0x0, 0x0, 0x48f2100, 0x100d801, ...)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/stdlib/collection.go:956 +0xf05
│ github.com/zclconf/go-cty/cty/function.Function.Call(0xc000119ce0, 0xc000560780, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/zclconf/go-cty@v1.8.2/cty/function/function.go:295 +0x4a7
│ github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0001f21e0, 0xc00000dc50, 0x0, 0xc00057f900, 0x1, 0x1, 0x0, 0x0, 0x0)
│ /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.9.1/hclsyntax/expression.go:442 +0xff6
│ github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0000b4fa0, 0x3834b28, 0xc0001f21e0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
│ /home/circleci/project/project/lang/eval.go:171 +0x1bc
│ github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc0005681a0, 0x3834b28, 0xc0001f21e0, 0x3835ce0, 0x48f2100, 0x0, 0x0, 0x0, 0x100dff8, 0x37db3e0, ...)
│ /home/circleci/project/project/terraform/eval_context_builtin.go:280 +0xbb
│ github.com/hashicorp/terraform/terraform.(*NodeApplyableOutput).Execute(0xc00029b700, 0x386ba90, 0xc0005681a0, 0xa926604, 0xc0003d8ce8, 0x100b805, 0x3042560)
│ /home/circleci/project/project/terraform/node_output.go:272 +0x8fd
│ github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc00050e540, 0x386ba90, 0xc0005681a0, 0xa926638, 0xc00029b700, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbf
│ github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3214220, 0xc00029b700, 0x0, 0x0, 0x0)
│ /home/circleci/project/project/terraform/graph.go:59 +0xbd3
│ github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc000558840, 0x3214220, 0xc00029b700, 0xc000560600)
│ /home/circleci/project/project/dag/walk.go:381 +0x288
│ created by github.com/hashicorp/terraform/dag.(*Walker).Update
│ /home/circleci/project/project/dag/walk.go:304 +0x1246
│ .
output "panics" {
value = setproduct([], [])
}
output "panics_too" {
value = setproduct(["a", "b"], [])
}
output "panics_again" {
value = setproduct([], ["c", "d"])
}
output "does_not_panic" {
value = setproduct(["a", "b"], ["c", "d"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment