Segfault on scaleway_object_bucket import
samber opened this issue · comments
Samuel Berthe commented
Terraform Version
Terraform v1.4.6
on darwin_arm64
+ provider registry.terraform.io/scaleway/scaleway v2.37.0
Affected Resource(s)
Command:
terraform import module.my_module.scaleway_object_bucket.my_bucket fr-par/my-bucket
Output:
module.my_module.scaleway_object_bucket.my_bucket: Importing from ID "fr-par/my-bucket"...
module.my_module.scaleway_object_bucket.my_bucket: Import prepared!
Prepared scaleway_object_bucket for import
module.my_module.scaleway_object_bucket.my_bucket: Refreshing state... [id=fr-par/my-bucket]
╷
│ Error: Request cancelled
│
│ The plugin.(*GRPCProvider).ReadResource request was cancelled.
╵
Stack trace from the terraform-provider-scaleway_v2.37.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1011d28f8]
goroutine 29 [running]:
github.com/scaleway/terraform-provider-scaleway/v2/scaleway.resourceScalewayObjectBucketRead({0x10195d5c0, 0x140009f7030}, 0x1400086d700, {0x101739500, 0x14000b030c0})
github.com/scaleway/terraform-provider-scaleway/v2/scaleway/resource_object_bucket.go:466 +0x228
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x140005dcb60, {0x10195d518, 0x14000d0dbc0}, 0xd?, {0x101739500, 0x14000b030c0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/resource.go:795 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x140005dcb60, {0x10195d518, 0x14000d0dbc0}, 0x14000821520, {0x101739500, 0x14000b030c0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/resource.go:1089 +0x430
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1400049a018, {0x10195d518?, 0x14000d0dad0?}, 0x14000b00740)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/grpc_provider.go:666 +0x3e4
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x140004e4000, {0x10195d518?, 0x14000d0d110?}, 0x140009b84e0)
github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/tf5server/server.go:774 +0x3c4
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x101910820?, 0x140004e4000}, {0x10195d518, 0x14000d0d110}, 0x1400086d180, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x140001b7200, {0x10195d518, 0x14000d0d080}, {0x101962440, 0x140001df380}, 0x14000548360, 0x140009029f0, 0x1021c5ce8, 0x0)
google.golang.org/grpc@v1.61.0/server.go:1385 +0xb8c
google.golang.org/grpc.(*Server).handleStream(0x140001b7200, {0x101962440, 0x140001df380}, 0x14000548360)
google.golang.org/grpc@v1.61.0/server.go:1796 +0xc4c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.61.0/server.go:1029 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 49
google.golang.org/grpc@v1.61.0/server.go:1040 +0x150
Error: The terraform-provider-scaleway_v2.37.0 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.
Affected resource:
resource "scaleway_object_bucket" "my_bucket" {
name = "my-bucket"
project_id = var.scaleway_project_id
region = "fr-par"
tags = {
....
}
}
Jules Castéran commented
Samuel Berthe commented
Good news. Thanks for the quick update!