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: interface conversion: interface {} is nil, not map[string]interface {} #40738

Closed
bedardpl opened this issue Dec 31, 2024 · 4 comments · Fixed by #40761
Closed
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/glue Issues and PRs that pertain to the glue service.
Milestone

Comments

@bedardpl
Copy link

Terraform Core Version

1.10.1

AWS Provider Version

5.82.2

Affected Resource(s)

can't run terraform on terraform-cloud

Expected Behavior

plan either apply or failed

Actual Behavior

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

panic: interface conversion: interface {} is nil, not map[string]interface {}

[..]

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

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Relevant Error/Panic Output Snippet

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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 177 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandDatabasePrincipalPermission(0xc004129a70)
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:458 +0x245
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandDatabasePrincipalPermissions({0xc00413e250?, 0x19fcb2f6?, 0xc?})
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:442 +0x8e
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceCatalogDatabaseCreate({0x1c3b5448, 0xc0041294d0}, 0xc003979d80, {0x19e23060, 0xc0003bbb00})
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:186 +0x645
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func9(0xc003979d80?, {0x19e23060?, 0xc0003bbb00})
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1c3b5448?, {0x1c3b5448?, 0xc004116b10?}, 0xd?, {0x19e23060?, 0xc0003bbb00?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00125ea80, {0x1c3b5448, 0xc004116b10}, 0xc003cc7a00, 0xc003979c00, {0x19e23060, 0xc0003bbb00})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:937 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002fe6858, {0x1c3b5448?, 0xc004116a50?}, 0xc003cc3540)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:1155 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000e2da80, {0x1c3b5448?, 0xc004116780?}, 0xc003cc3540)
github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0021921e0, {0x1c3b5448?, 0xc003c06330?}, 0xc000ace070)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x19cab7e0, 0xc0021921e0}, {0x1c3b5448, 0xc003c06330}, 0xc003c38000, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003c7400, {0x1c3b5448, 0xc003c062a0}, {0x1c4392e0, 0xc0031e2000}, 0xc003c08900, 0xc0030dc3f0, 0x276afa38, 0x0)
google.golang.org/grpc@v1.68.1/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc0003c7400, {0x1c4392e0, 0xc0031e2000}, 0xc003c08900)
google.golang.org/grpc@v1.68.1/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.68.1/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/grpc@v1.68.1/server.go:1040 +0x125

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

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Terraform Configuration Files

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.82.2"
}
}
cloud {
organization = "XXXXXXX"
workspaces {
project = "XXXXXXX"
name = "XXXXXXX"
}
}
}
provider "aws" {
region = "us-west-2"
}
terraform {
required_version = ">= 1.9"
}

Steps to Reproduce

terraform apply.
terraform plan seems to work

Debug Output

No response

Panic Output

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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 177 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandDatabasePrincipalPermission(0xc004129a70)
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:458 +0x245
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandDatabasePrincipalPermissions({0xc00413e250?, 0x19fcb2f6?, 0xc?})
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:442 +0x8e
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceCatalogDatabaseCreate({0x1c3b5448, 0xc0041294d0}, 0xc003979d80, {0x19e23060, 0xc0003bbb00})
github.com/hashicorp/terraform-provider-aws/internal/service/glue/catalog_database.go:186 +0x645
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func9(0xc003979d80?, {0x19e23060?, 0xc0003bbb00})
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1c3b5448?, {0x1c3b5448?, 0xc004116b10?}, 0xd?, {0x19e23060?, 0xc0003bbb00?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00125ea80, {0x1c3b5448, 0xc004116b10}, 0xc003cc7a00, 0xc003979c00, {0x19e23060, 0xc0003bbb00})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:937 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002fe6858, {0x1c3b5448?, 0xc004116a50?}, 0xc003cc3540)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:1155 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000e2da80, {0x1c3b5448?, 0xc004116780?}, 0xc003cc3540)
github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0021921e0, {0x1c3b5448?, 0xc003c06330?}, 0xc000ace070)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x19cab7e0, 0xc0021921e0}, {0x1c3b5448, 0xc003c06330}, 0xc003c38000, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003c7400, {0x1c3b5448, 0xc003c062a0}, {0x1c4392e0, 0xc0031e2000}, 0xc003c08900, 0xc0030dc3f0, 0x276afa38, 0x0)
google.golang.org/grpc@v1.68.1/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc0003c7400, {0x1c4392e0, 0xc0031e2000}, 0xc003c08900)
google.golang.org/grpc@v1.68.1/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.68.1/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/grpc@v1.68.1/server.go:1040 +0x125

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

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@bedardpl bedardpl added the bug Addresses a defect in current functionality. label Dec 31, 2024
@github-actions github-actions bot added the crash Results from or addresses a Terraform crash or kernel panic. label Dec 31, 2024
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.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 31, 2024
@jar-b jar-b added service/glue Issues and PRs that pertain to the glue service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 3, 2025
@jar-b jar-b self-assigned this Jan 3, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.83.0 milestone Jan 3, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.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 Feb 10, 2025
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. service/glue Issues and PRs that pertain to the glue service.
Projects
None yet
2 participants