Terraform Version
Terraform v1.4.0
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.57.1
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.4.3
+ provider registry.terraform.io/pagerduty/pagerduty v1.11.0
Terraform Configuration Files
Debug Output
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x1c
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/Users/distiller/project/project/internal/logging/panic.go:55 +0x170
panic({0x10430c560, 0x105a46e00})
/usr/local/go/src/runtime/panic.go:890 +0x258
github.com/mitchellh/colorstring.(*Colorize).Color(0x0, {0x103ab694c, 0x16})
/Users/distiller/go/pkg/mod/github.com/mitchellh/colorstring@v0.0.0-20190213212951-d06e56a500db/colorstring.go:81 +0x144
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.renderPrimitiveValue({0x0?, 0x0?}, {{0x0?, 0x0?}}, {0x0, 0x1, 0x0, 0x1, 0x1})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:56 +0x1b8
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.RenderHuman({{}, {0x0, 0x0}, {0x0, 0x0}, {{0x0, 0x0}}}, {{0x1046d5bb8?, 0x140011d5770?}, 0x2a91b38?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:39 +0xc0
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d5710?, 0x70?}, {{0x1046d5b90?, 0x14001f883a0?}, 0x2a92098?, 0x40?}, 0x7, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d56b0?, 0xd0?}, {{0x1046d5b90?, 0x14001f883c0?}, 0x2a92618?, 0x40?}, 0x6, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.listRenderer.RenderHuman({{}, 0xb8?, {0x14000bff3c8?, 0x2?, 0x14002a92c70?}}, {{0x1046d5b40?, 0x14001bddc20?}, 0x2a92998?, 0x40?}, 0x5, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/list.go:109 +0x7f4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d5650?, 0x3a?}, {{0x1046d5b90?, 0x14001f883e0?}, 0x2a92f18?, 0x40?}, 0x4, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.listRenderer.RenderHuman({{}, 0xb8?, {0x14000759800?, 0x27c?, 0x6c?}}, {{0x1046d5b40?, 0x14001f34b00?}, 0x2a93298?, 0x40?}, 0x3, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/list.go:109 +0x7f4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d4ab0?, 0xb0?}, {{0x1046d5b90?, 0x14002029370?}, 0x46bdc40?, 0x1?}, 0x2, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.renderStringDiffAsJson({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2000?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:211 +0x22c
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.renderStringDiff({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2a94068?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:84 +0x15c
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.RenderHuman({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2a941e8?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:36 +0x4f0
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.blockRenderer.RenderHuman({{}, 0x140011b9bc0, {0x140011c32f0, 0x140011c3320, 0x140011c3350, 0x140011c3380, 0x140011c3230, 0x140011c3260, 0x140011c32c0}}, {{0x1046d5b18?, ...}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/block.go:93 +0x10a4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat.State.renderHumanStateModule({{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, {0x14001382800, 0xd, 0x10}}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/state.go:68 +0x5b8
github.com/hashicorp/terraform/internal/command/jsonformat.State.renderHumanStateModule({{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, {0x14001382800, 0xd, 0x10}}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/state.go:77 +0x190
github.com/hashicorp/terraform/internal/command/jsonformat.Renderer.RenderHumanState({0x140006be6d8?, 0x14000931650?, 0x60?}, {{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, ...}, ...})
/Users/distiller/project/project/internal/command/jsonformat/renderer.go:89 +0x240
github.com/hashicorp/terraform/internal/command/views.(*ShowHuman).Display(0x14000010448, 0x0?, 0x0?, 0x14002a959f8?, 0x1?)
/Users/distiller/project/project/internal/command/views/show.go:96 +0x178
github.com/hashicorp/terraform/internal/command.(*ShowCommand).Run(0x1400033fa40, {0x140001aa010?, 0x1?, 0xffffffffffffffff?})
/Users/distiller/project/project/internal/command/show.go:59 +0x23c
github.com/mitchellh/cli.(*CLI).Run(0x140001ecc80)
/Users/distiller/go/pkg/mod/github.com/mitchellh/cli@v1.1.5/cli.go:262 +0x4a8
main.realMain()
/Users/distiller/project/project/main.go:315 +0x12f0
main.main()
/Users/distiller/project/project/main.go:58 +0x1c
Expected Behavior
terraform show should successfully output the current state
Actual Behavior
running terraform show seems to output the resources in state, but not the output values associated with state before crashing and throwing the error below.
Steps to Reproduce
terraform show on a project that otherwise works fine with 1.3.7.
Additional Context
Hoping this is enough to share. I don't have a ton of time at the moment to comb through the full debug trace and make sure I'm not making public anything that shouldn't be public, but wanted to log the issue because I've never seen it before, it seems to effect 1.4.0 (I rolled back to 1.3.7 to get around the issue), and it said this was always indicative of a bug within Terraform.
Edit: The project was initially on 1.3.7; I haven't validated 1.3.8 or 1.3.9 I didn't notice they had been released until just now. 😂
I simply tried to do a terraform show and received the output provided. It seems to output most (all?) of the state resources, but fails before it can print the output values within the state and hard crashes. If there is more information I can provide, please let me know if the debug trace is known to output any secrets or org specific details that should not go into a public issue log without proper sanitization. Thanks.
References
No response
Terraform Version
Terraform Configuration Files
Debug Output
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x1c
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/Users/distiller/project/project/internal/logging/panic.go:55 +0x170
panic({0x10430c560, 0x105a46e00})
/usr/local/go/src/runtime/panic.go:890 +0x258
github.com/mitchellh/colorstring.(*Colorize).Color(0x0, {0x103ab694c, 0x16})
/Users/distiller/go/pkg/mod/github.com/mitchellh/colorstring@v0.0.0-20190213212951-d06e56a500db/colorstring.go:81 +0x144
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.renderPrimitiveValue({0x0?, 0x0?}, {{0x0?, 0x0?}}, {0x0, 0x1, 0x0, 0x1, 0x1})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:56 +0x1b8
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.RenderHuman({{}, {0x0, 0x0}, {0x0, 0x0}, {{0x0, 0x0}}}, {{0x1046d5bb8?, 0x140011d5770?}, 0x2a91b38?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:39 +0xc0
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d5710?, 0x70?}, {{0x1046d5b90?, 0x14001f883a0?}, 0x2a92098?, 0x40?}, 0x7, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d56b0?, 0xd0?}, {{0x1046d5b90?, 0x14001f883c0?}, 0x2a92618?, 0x40?}, 0x6, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.listRenderer.RenderHuman({{}, 0xb8?, {0x14000bff3c8?, 0x2?, 0x14002a92c70?}}, {{0x1046d5b40?, 0x14001bddc20?}, 0x2a92998?, 0x40?}, 0x5, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/list.go:109 +0x7f4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d5650?, 0x3a?}, {{0x1046d5b90?, 0x14001f883e0?}, 0x2a92f18?, 0x40?}, 0x4, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.listRenderer.RenderHuman({{}, 0xb8?, {0x14000759800?, 0x27c?, 0x6c?}}, {{0x1046d5b40?, 0x14001f34b00?}, 0x2a93298?, 0x40?}, 0x3, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/list.go:109 +0x7f4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.objectRenderer.RenderHuman({{}, 0x140011d4ab0?, 0xb0?}, {{0x1046d5b90?, 0x14002029370?}, 0x46bdc40?, 0x1?}, 0x2, {0x0, 0x1, ...})
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/object.go:86 +0xb70
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.renderStringDiffAsJson({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2000?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:211 +0x22c
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.renderStringDiff({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2a94068?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:84 +0x15c
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.primitiveRenderer.RenderHuman({{}, {0x104209380, 0x14001233a90}, {0x104209380, 0x14001233c80}, {{0x1046ee7a0, 0x140001a4299}}}, {{0x1046d5bb8?, 0x140011c2810?}, 0x2a941e8?, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/primitive.go:36 +0x4f0
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers.blockRenderer.RenderHuman({{}, 0x140011b9bc0, {0x140011c32f0, 0x140011c3320, 0x140011c3350, 0x140011c3380, 0x140011c3230, 0x140011c3260, 0x140011c32c0}}, {{0x1046d5b18?, ...}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/computed/renderers/block.go:93 +0x10a4
github.com/hashicorp/terraform/internal/command/jsonformat/computed.Diff.RenderHuman(...)
/Users/distiller/project/project/internal/command/jsonformat/computed/diff.go:51
github.com/hashicorp/terraform/internal/command/jsonformat.State.renderHumanStateModule({{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, {0x14001382800, 0xd, 0x10}}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/state.go:68 +0x5b8
github.com/hashicorp/terraform/internal/command/jsonformat.State.renderHumanStateModule({{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, {0x14001382800, 0xd, 0x10}}, ...}, ...)
/Users/distiller/project/project/internal/command/jsonformat/state.go:77 +0x190
github.com/hashicorp/terraform/internal/command/jsonformat.Renderer.RenderHumanState({0x140006be6d8?, 0x14000931650?, 0x60?}, {{0x103a880ff, 0x3}, {{0x14001bb6000, 0x1d, 0x20}, {0x0, 0x0}, ...}, ...})
/Users/distiller/project/project/internal/command/jsonformat/renderer.go:89 +0x240
github.com/hashicorp/terraform/internal/command/views.(*ShowHuman).Display(0x14000010448, 0x0?, 0x0?, 0x14002a959f8?, 0x1?)
/Users/distiller/project/project/internal/command/views/show.go:96 +0x178
github.com/hashicorp/terraform/internal/command.(*ShowCommand).Run(0x1400033fa40, {0x140001aa010?, 0x1?, 0xffffffffffffffff?})
/Users/distiller/project/project/internal/command/show.go:59 +0x23c
github.com/mitchellh/cli.(*CLI).Run(0x140001ecc80)
/Users/distiller/go/pkg/mod/github.com/mitchellh/cli@v1.1.5/cli.go:262 +0x4a8
main.realMain()
/Users/distiller/project/project/main.go:315 +0x12f0
main.main()
/Users/distiller/project/project/main.go:58 +0x1c
Expected Behavior
terraform showshould successfully output the current stateActual Behavior
running
terraform showseems to output the resources in state, but not the output values associated with state before crashing and throwing the error below.Steps to Reproduce
terraform showon a project that otherwise works fine with 1.3.7.Additional Context
Hoping this is enough to share. I don't have a ton of time at the moment to comb through the full debug trace and make sure I'm not making public anything that shouldn't be public, but wanted to log the issue because I've never seen it before, it seems to effect 1.4.0 (I rolled back to 1.3.7 to get around the issue), and it said this was always indicative of a bug within Terraform.
Edit: The project was initially on 1.3.7; I haven't validated 1.3.8 or 1.3.9 I didn't notice they had been released until just now. 😂
I simply tried to do a
terraform showand received the output provided. It seems to output most (all?) of the state resources, but fails before it can print the output values within the state and hard crashes. If there is more information I can provide, please let me know if the debug trace is known to output any secrets or org specific details that should not go into a public issue log without proper sanitization. Thanks.References
No response