Skip to content

Terraform crashed! This is always indicative of a bug within Terraform #37360

@shekharsanatan92

Description

@shekharsanatan92

Terraform Version

1.7.5

Terraform Configuration Files

...terraform config...

Debug Output

  !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
  interface conversion: interface {} is float64, not string
  goroutine 48 [running]:
  runtime/debug.Stack()
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/debug/stack.go:24 +0x64
  runtime/debug.PrintStack()
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/debug/stack.go:16 +0x1c
  github.com/hashicorp/terraform/internal/logging.PanicHandler()
    /home/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x164
  panic({0x26e4dc0?, 0x4006e89050?})
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/panic.go:914 +0x218
  github.com/hashicorp/terraform/internal/command/jsonformat/structured/attribute_path.(*PathMatcher).GetChildWithKey(0x40070f8780, {0x4006230c50, 0x9})
    /home/runner/work/terraform/terraform/internal/command/jsonformat/structured/attribute_path/matcher.go:154 +0x2dc
  github.com/hashicorp/terraform/internal/command/jsonformat/structured.ChangeMap.GetChild({0x4006e88060, 0x4006e88120, 0x0, 0x4006e88240, 0x4006e88300, {0x3385120, 0x40070f8760}, {0x3385120, 0x40070f8780}}, {0x4006230c50, ...})
    /home/runner/work/terraform/terraform/internal/command/jsonformat/structured/map.go:71 +0x330
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.processObject[...]({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/object.go:48 +0x1fc
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.computeAttributeDiffAsNestedObject({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/object.go:25 +0x98
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.computeDiffForNestedAttribute({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/attribute.go:34 +0x314
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.ComputeDiffForAttribute({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/attribute.go:18 +0xb0
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.ComputeDiffForBlock({0x0, 0x0, {0x26686c0, 0x4006e88030}, {0x26686c0, 0x4006e880f0}, {0x26686c0, 0x4006e881b0}, {0x26686c0, 0x4006e88210}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/block.go:50 +0x4e4
  github.com/hashicorp/terraform/internal/command/jsonformat.precomputeDiffs({{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, 0x1, 0x1}, {0x4000290000, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/diff.go:52 +0x354
  github.com/hashicorp/terraform/internal/command/jsonformat.Plan.renderHuman({{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, 0x1, 0x1}, {0x4000290000, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/plan.go:59 +0xa0
  github.com/hashicorp/terraform/internal/command/jsonformat.Renderer.RenderHumanPlan({0x40007fc990?, 0x40009ef460?, 0x1?}, {{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/renderer.go:118 +0x18c
  github.com/hashicorp/terraform/internal/command/views.(*OperationHuman).Plan(0x40006b3fd0, 0x40058ee6c0, 0x0?)
    /home/runner/work/terraform/terraform/internal/command/views/operation.go:126 +0x220
  github.com/hashicorp/terraform/internal/backend/local.(*Local).opPlan(0x40008c7ae0, {0x3383d90, 0x4000843e50}, {0x3383d90, 0x4000843ea0}, 0x40006f1320, 0x4000802ac0)
    /home/runner/work/terraform/terraform/internal/backend/local/backend_plan.go:202 +0xd1c
  github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
    /home/runner/work/terraform/terraform/internal/backend/local/backend.go:330 +0xd8
  created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation in goroutine 1
    /home/runner/work/terraform/terraform/internal/backend/local/backend.go:323 +0x3ec
  
  exit status 11

Expected Behavior

The pipeline should run without any issue.

Actual Behavior

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
  interface conversion: interface {} is float64, not string
  goroutine 48 [running]:
  runtime/debug.Stack()
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/debug/stack.go:24 +0x64
  runtime/debug.PrintStack()
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/debug/stack.go:16 +0x1c
  github.com/hashicorp/terraform/internal/logging.PanicHandler()
    /home/runner/work/terraform/terraform/internal/logging/panic.go:58 +0x164
  panic({0x26e4dc0?, 0x4006e89050?})
    /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/panic.go:914 +0x218
  github.com/hashicorp/terraform/internal/command/jsonformat/structured/attribute_path.(*PathMatcher).GetChildWithKey(0x40070f8780, {0x4006230c50, 0x9})
    /home/runner/work/terraform/terraform/internal/command/jsonformat/structured/attribute_path/matcher.go:154 +0x2dc
  github.com/hashicorp/terraform/internal/command/jsonformat/structured.ChangeMap.GetChild({0x4006e88060, 0x4006e88120, 0x0, 0x4006e88240, 0x4006e88300, {0x3385120, 0x40070f8760}, {0x3385120, 0x40070f8780}}, {0x4006230c50, ...})
    /home/runner/work/terraform/terraform/internal/command/jsonformat/structured/map.go:71 +0x330
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.processObject[...]({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/object.go:48 +0x1fc
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.computeAttributeDiffAsNestedObject({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/object.go:25 +0x98
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.computeDiffForNestedAttribute({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/attribute.go:34 +0x314
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.ComputeDiffForAttribute({0x0, 0x0, {0x26686c0, 0x4006e88060}, {0x26686c0, 0x4006e88120}, {0x0, 0x0}, {0x26686c0, 0x4006e88240}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/attribute.go:18 +0xb0
  github.com/hashicorp/terraform/internal/command/jsonformat/differ.ComputeDiffForBlock({0x0, 0x0, {0x26686c0, 0x4006e88030}, {0x26686c0, 0x4006e880f0}, {0x26686c0, 0x4006e881b0}, {0x26686c0, 0x4006e88210}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/differ/block.go:50 +0x4e4
  github.com/hashicorp/terraform/internal/command/jsonformat.precomputeDiffs({{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, 0x1, 0x1}, {0x4000290000, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/diff.go:52 +0x354
  github.com/hashicorp/terraform/internal/command/jsonformat.Plan.renderHuman({{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, 0x1, 0x1}, {0x4000290000, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/plan.go:59 +0xa0
  github.com/hashicorp/terraform/internal/command/jsonformat.Renderer.RenderHumanPlan({0x40007fc990?, 0x40009ef460?, 0x1?}, {{0x2bab4cc, 0x3}, 0x400263d0b0, {0x4002629c00, 0x7, 0x8}, {0x4007716780, ...}, ...}, ...)
    /home/runner/work/terraform/terraform/internal/command/jsonformat/renderer.go:118 +0x18c
  github.com/hashicorp/terraform/internal/command/views.(*OperationHuman).Plan(0x40006b3fd0, 0x40058ee6c0, 0x0?)
    /home/runner/work/terraform/terraform/internal/command/views/operation.go:126 +0x220
  github.com/hashicorp/terraform/internal/backend/local.(*Local).opPlan(0x40008c7ae0, {0x3383d90, 0x4000843e50}, {0x3383d90, 0x4000843ea0}, 0x40006f1320, 0x4000802ac0)
    /home/runner/work/terraform/terraform/internal/backend/local/backend_plan.go:202 +0xd1c
  github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
    /home/runner/work/terraform/terraform/internal/backend/local/backend.go:330 +0xd8
  created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation in goroutine 1
    /home/runner/work/terraform/terraform/internal/backend/local/backend.go:323 +0x3ec
  
  exit status 11

Steps to Reproduce

terraform init
terragrunt run-all plan --terragrunt-non-interactive

Additional Context

We are running the Terraform code to create the resources in AWS using Terragrunt.

References

No response

Generative AI / LLM assisted development?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugduplicateissue closed because another issue already tracks this problemnewnew issue not yet triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions