Skip to content

Terraform crashed: interface {} is string, not float64 #33472

@yeighta

Description

@yeighta

Terraform Version

1.5.2

Terraform Configuration Files

...terraform config...

Debug Output

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

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

[1]: https://github.com/hashicorp/terraform/issues

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


Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
interface conversion: interface {} is string, not float64
goroutine 37 [running]:
runtime/debug.Stack()
        /Users/runner/hostedtoolcache/go/1.20.0/x64/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
        /Users/runner/hostedtoolcache/go/1.20.0/x64/src/runtime/debug/stack.go:16 +0x19
github.com/hashicorp/terraform/internal/logging.PanicHandler()
        /Users/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x153
panic({0x304bf80, 0xc002452d80})
        /Users/runner/hostedtoolcache/go/1.20.0/x64/src/runtime/panic.go:884 +0x213
github.com/hashicorp/terraform/internal/command/jsonformat/structured/attribute_path.(*PathMatcher).GetChildWithIndex(0xc00013be60, 0x0)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/structured/attribute_path/matcher.go:176 +0x2cb
github.com/hashicorp/terraform/internal/command/jsonformat/structured.ChangeSlice.GetChild({{0xc002bd69e0, 0x1, 0x1}, {0xc002bd6da0, 0x1, 0x1}, {0x0, 0x0, 0x0}, {0xc002bd6f30, ...}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/structured/slice.go:75 +0x252
github.com/hashicorp/terraform/internal/command/jsonformat/differ.processNestedList({0x1, 0x1, {0x2ed0720, 0xc0019cb980}, {0x2ed0720, 0xc0019cbb60}, {0x0, 0x0}, {0x2ed0720, 0xc0019cbd58}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/differ/list.go:83 +0x13b
github.com/hashicorp/terraform/internal/command/jsonformat/differ.computeBlockDiffsAsList({0x1, 0x1, {0x2ed0720, 0xc0019cb980}, {0x2ed0720, 0xc0019cbb60}, {0x0, 0x0}, {0x2ed0720, 0xc0019cbd58}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/differ/list.go:72 +0x145
github.com/hashicorp/terraform/internal/command/jsonformat/differ.ComputeDiffForBlock({0x0, 0x0, {0x3007cc0, 0xc0022e2c90}, {0x3007cc0, 0xc0022e2f00}, {0x3007cc0, 0xc0022e3140}, {0x3007cc0, 0xc0022e3170}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/differ/block.go:92 +0xf98
github.com/hashicorp/terraform/internal/command/jsonformat.precomputeDiffs({{0x33dc6ed, 0x3}, 0xc001bf5fb0, {0xc0006cf000, 0x13, 0x22}, {0xc0012fc800, 0xa, 0x11}, {0xc0019fd680, ...}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/diff.go:52 +0x3b8
github.com/hashicorp/terraform/internal/command/jsonformat.Plan.renderHuman({{0x33dc6ed, 0x3}, 0xc001bf5fb0, {0xc0006cf000, 0x13, 0x22}, {0xc0012fc800, 0xa, 0x11}, {0xc0019fd680, ...}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/plan.go:64 +0xa5
github.com/hashicorp/terraform/internal/command/jsonformat.Renderer.RenderHumanPlan({0xc000120d68?, 0xc0002a6cc0?, 0x17?}, {{0x33dc6ed, 0x3}, 0xc001bf5fb0, {0xc0006cf000, 0x13, 0x22}, {0xc0012fc800, ...}, ...}, ...)
        /Users/runner/work/terraform/terraform/internal/command/jsonformat/renderer.go:92 +0x1ef
github.com/hashicorp/terraform/internal/command/views.(*OperationHuman).Plan(0xc000ac0790, 0xc0010983c0, 0x0?)
        /Users/runner/work/terraform/terraform/internal/command/views/operation.go:126 +0x31c
github.com/hashicorp/terraform/internal/backend/local.(*Local).opApply(0x0?, {0x39deb38, 0xc0008343c0}, {0x39deb38, 0xc000834410}, 0xc000aba5a0, 0xc000aaed00)
        /Users/runner/work/terraform/terraform/internal/backend/local/backend_apply.go:117 +0x996
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
        /Users/runner/work/terraform/terraform/internal/backend/local/backend.go:326 +0xc3
created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation
        /Users/runner/work/terraform/terraform/internal/backend/local/backend.go:319 +0x44a
make: *** [apply] Error 11

Expected Behavior

I expected terraform apply successfully

Actual Behavior

terraform crashed

Steps to Reproduce

  1. terraform init
  2. terraform apply

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

Labels

bugconfirmeda Terraform Core team member has reproduced this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions