Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: panic: value is null #33995

Closed
tmccombs opened this issue Oct 18, 2023 · 3 comments · Fixed by #34073
Closed

[Bug]: panic: value is null #33995

tmccombs opened this issue Oct 18, 2023 · 3 comments · Fixed by #34073
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. provider Pertains to the provider itself, rather than any interaction with AWS. tags Pertains to resource tagging.
Milestone

Comments

@tmccombs
Copy link
Contributor

Terraform Core Version

1.5.0

AWS Provider Version

5.21.0

Affected Resource(s)

I'm not sure

Expected Behavior

Don't crash

Actual Behavior

a panic during terraform apply

Relevant Error/Panic Output Snippet

Stack trace from the terraform-provider-aws_v5.21.0_x5 plugin:

panic: value is null

goroutine 1584 [running]:
github.com/hashicorp/go-cty/cty.Value.LengthInt({{{0xf0cf538?, 0xc002b25160?}}, {0x0?, 0x0?}})
	github.com/hashicorp/[email protected]/cty/value_ops.go:989 +0x27d
github.com/hashicorp/go-cty/cty.Value.AsValueMap({{{0xf0cf538?, 0xc002b25160?}}, {0x0?, 0x0?}})
	github.com/hashicorp/[email protected]/cty/value_ops.go:1237 +0x71
github.com/hashicorp/terraform-provider-aws/internal/provider.tagsUpdateFunc({0xf0ce1c0, 0xc00336b080}, {0xf0d9ee8, 0xc0034cb800}, {0xf0d0a40, 0x155daf10}, 0xc00069b580, {0xc00017a215, 0x18}, {0xdd4c0ab, ...}, ...)
	github.com/hashicorp/terraform-provider-aws/internal/provider/tags_interceptor.go:59 +0x5ea
github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc00069b580?, 0xdff3b58?, 0xdff3b50?}, {0xf0ce1c0, 0xc00336b080}, {0xf0d9ee8, 0xc0034cb800}, {0xdce7f00?, 0xc00350efc0?}, 0x8, ...)
	github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:366 +0xbd7
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x0?, {0xdce7f00?, 0xc00350efc0?})
	github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:127 +0x4e8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xf0ce1c0?, {0xf0ce1c0?, 0xc002cf75f0?}, 0xd?, {0xdce7f00?, 0xc00350efc0?})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:807 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000bc8fc0, {0xf0ce1c0, 0xc002cf75f0}, 0xc003505520, 0xc0034cb680, {0xdce7f00, 0xc00350efc0})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:919 +0x845
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc001bb9a28, {0xf0ce1c0?, 0xc002cf74d0?}, 0xc002de3450)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xf0ce118?, {0xf0ce1c0?, 0xc002cf7110?}, 0xc002de3450)
	github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1b5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001bf12c0, {0xf0ce1c0?, 0xc002cf65d0?}, 0xc001c79ab0)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:859 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xda6dfe0?, 0xc001bf12c0}, {0xf0ce1c0, 0xc002cf65d0}, 0xc001c79a40, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000052f00, {0xf0db9e0, 0xc0005221a0}, 0xc001fad7a0, 0xc003531d70, 0x15581a58, 0x0)
	google.golang.org/[email protected]/server.go:1360 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000052f00, {0xf0db9e0, 0xc0005221a0}, 0xc001fad7a0, 0x0)
	google.golang.org/[email protected]/server.go:1737 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/[email protected]/server.go:982 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:980 +0x18c

Error: The terraform-provider-aws_v5.21.0_x5 plugin crashed!

Terraform Configuration Files

a lot. I don't know what is relevant.

Steps to Reproduce

I don't know. it happened during terraform apply once.

Debug Output

No response

Panic Output

panic: value is null

goroutine 1584 [running]:
github.com/hashicorp/go-cty/cty.Value.LengthInt({{{0xf0cf538?, 0xc002b25160?}}, {0x0?, 0x0?}})
github.com/hashicorp/[email protected]/cty/value_ops.go:989 +0x27d
github.com/hashicorp/go-cty/cty.Value.AsValueMap({{{0xf0cf538?, 0xc002b25160?}}, {0x0?, 0x0?}})
github.com/hashicorp/[email protected]/cty/value_ops.go:1237 +0x71
github.com/hashicorp/terraform-provider-aws/internal/provider.tagsUpdateFunc({0xf0ce1c0, 0xc00336b080}, {0xf0d9ee8, 0xc0034cb800}, {0xf0d0a40, 0x155daf10}, 0xc00069b580, {0xc00017a215, 0x18}, {0xdd4c0ab, ...}, ...)
github.com/hashicorp/terraform-provider-aws/internal/provider/tags_interceptor.go:59 +0x5ea
github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc00069b580?, 0xdff3b58?, 0xdff3b50?}, {0xf0ce1c0, 0xc00336b080}, {0xf0d9ee8, 0xc0034cb800}, {0xdce7f00?, 0xc00350efc0?}, 0x8, ...)
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:366 +0xbd7
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x0?, {0xdce7f00?, 0xc00350efc0?})
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:127 +0x4e8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xf0ce1c0?, {0xf0ce1c0?, 0xc002cf75f0?}, 0xd?, {0xdce7f00?, 0xc00350efc0?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:807 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000bc8fc0, {0xf0ce1c0, 0xc002cf75f0}, 0xc003505520, 0xc0034cb680, {0xdce7f00, 0xc00350efc0})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:919 +0x845
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc001bb9a28, {0xf0ce1c0?, 0xc002cf74d0?}, 0xc002de3450)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xf0ce118?, {0xf0ce1c0?, 0xc002cf7110?}, 0xc002de3450)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1b5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001bf12c0, {0xf0ce1c0?, 0xc002cf65d0?}, 0xc001c79ab0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:859 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xda6dfe0?, 0xc001bf12c0}, {0xf0ce1c0, 0xc002cf65d0}, 0xc001c79a40, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000052f00, {0xf0db9e0, 0xc0005221a0}, 0xc001fad7a0, 0xc003531d70, 0x15581a58, 0x0)
google.golang.org/[email protected]/server.go:1360 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000052f00, {0xf0db9e0, 0xc0005221a0}, 0xc001fad7a0, 0x0)
google.golang.org/[email protected]/server.go:1737 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:982 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:980 +0x18c

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@tmccombs tmccombs added the bug Addresses a defect in current functionality. label Oct 18, 2023
@github-actions github-actions bot added the crash Results from or addresses a Terraform crash or kernel panic. label Oct 18, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 18, 2023
@ewbankkit ewbankkit added provider Pertains to the provider itself, rather than any interaction with AWS. tags Pertains to resource tagging. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 19, 2023
@ewbankkit ewbankkit self-assigned this Oct 19, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 19, 2023
@ewbankkit ewbankkit removed their assignment Oct 19, 2023
@johnsonaj johnsonaj self-assigned this Oct 19, 2023
@github-actions github-actions bot added this to the v5.23.0 milestone Oct 23, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Oct 26, 2023
@github-actions
Copy link

This functionality has been released in v5.23.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. provider Pertains to the provider itself, rather than any interaction with AWS. tags Pertains to resource tagging.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants