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