You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panic: not a string
goroutine 46 [running]:
github.com/zclconf/go-cty/cty.Value.AsString(...)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/zclconf/[email protected]/cty/value_ops.go:1026
github.com/zclconf/go-cty/cty.Value.AsValueMap(0x2e278a0, 0xc0005144a0, 0x25cba80, 0xc0005144c0, 0x8)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/zclconf/[email protected]/cty/value_ops.go:1095 +0x38a
github.com/hashicorp/terraform/terraform.evaluateResourceForEachExpressionKnown(0x2e26560, 0xc0004c5c20, 0x2e594c0, 0xc0000d2d00, 0xc0000e2dc0, 0xc0000e2e70, 0xc0000e2f20, 0x100b609, 0xc00065b6b8)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval_for_each.go:84 +0x5bd
github.com/hashicorp/terraform/terraform.(*EvalValidateResource).validateForEach(0xc000260870, 0x2e594c0, 0xc0000d2d00, 0x2e26560, 0xc0004c5c20, 0x0, 0xc0000bdef0, 0xc0000b6900)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval_validate.go:572 +0x59
github.com/hashicorp/terraform/terraform.(*EvalValidateResource).Eval(0xc000260870, 0x2e594c0, 0xc0000d2d00, 0x2, 0x2, 0x0, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval_validate.go:394 +0x1b57
github.com/hashicorp/terraform/terraform.EvalRaw(0x2de5e80, 0xc000260870, 0x2e594c0, 0xc0000d2d00, 0x0, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval.go:57 +0x131
github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc000435b00, 0x2e594c0, 0xc0000d2d00, 0x2, 0x2, 0x1ad38c5, 0x2de5e80)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval_sequence.go:20 +0xfd
github.com/hashicorp/terraform/terraform.EvalRaw(0x2de5de0, 0xc000435b00, 0x2e594c0, 0xc0000d2d00, 0x26826a0, 0x3e03465, 0x25ef1a0, 0xc0005be560)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval.go:57 +0x131
github.com/hashicorp/terraform/terraform.Eval(0x2de5de0, 0xc000435b00, 0x2e594c0, 0xc0000d2d00, 0xc000435b00, 0x2de5de0, 0xc000435b00, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/eval.go:35 +0x4d
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x28e1c20, 0xc000432080, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/terraform/graph.go:90 +0xf40
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc000442700, 0x28e1c20, 0xc000432080, 0xc000548300)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/dag/walk.go:392 +0x353
created by github.com/hashicorp/terraform/dag.(*Walker).Update
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/dag/walk.go:314 +0xa9b
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.
When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.
[1]: https://github.com/hashicorp/terraform/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
This panic is now fixed in 0.12.7 -- the example code given here is passing for_each a tuple, which is not a supported type for for_each.
In order to create instances, for_each uses the keys of the map (or the set of strings) provided to identify the instances. If you'd like to identify instances by their index in the list, you can use count, but that has clear downsides as if you remove an item from the middle of the list, that will cause cascading changes to be needed.
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.
ghost
locked and limited conversation to collaborators
Sep 26, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Crash Output
https://gist.github.com/rohrerb/3bc9f8de1be183986d298c8f39eaf0fe
Expected Behavior
Eight null_resource's would be created.
Actual Behavior
Steps to Reproduce
terraform init
terraform apply
Additional Context
Issue is also posted here > https://discuss.hashicorp.com/t/for-each-flattened-list/2494 and https://discuss.hashicorp.com/t/help-with-for-each-in-resource/2435/3
The text was updated successfully, but these errors were encountered: