Open MichaelReubenDevSlalom opened 1 year ago
MichaelReubenDevSlalom can you try latest provider version?
Im also hitting this error with latest provider version.
$ terraform import bitbucket_repository.example example/example
bitbucket_repository.infra: Importing from ID "example/example"...
bitbucket_repository.infra: Import prepared!
Prepared bitbucket_repository for import
bitbucket_repository.infra: Refreshing state... [id=example/example]
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-bitbucket_v2.42.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xca4313]
goroutine 27 [running]:
github.com/terraform-providers/terraform-provider-bitbucket/bitbucket.resourceRepositoryRead({0x0?, 0x0?}, 0xc0003bad80, {0xdae000?, 0xc00038cdc0?})
github.com/terraform-providers/terraform-provider-bitbucket/bitbucket/resource_repository.go:348 +0x833
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xfd1c58?, {0xfd1c58?, 0xc0003ccff0?}, 0xd?, {0xdae000?, 0xc00038cdc0?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/resource.go:790 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0002fe700, {0xfd1c58, 0xc0003ccff0}, 0xc0003b0dd0, {0xdae000, 0xc00038cdc0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/resource.go:1089 +0x552
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0002e84c8, {0xfd1c58?, 0xc0003ccf00?}, 0xc0002effc0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.32.0/helper/schema/grpc_provider.go:666 +0x48a
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00024a280, {0xfd1c58?, 0xc0003cc540?}, 0xc0003908a0)
github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/tf5server/server.go:774 +0x4c3
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xe4d340?, 0xc00024a280}, {0xfd1c58, 0xc0003cc540}, 0xc0003ba800, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000111000, {0xfd1c58, 0xc0003cc4b0}, {0xfd6038, 0xc000318820}, 0xc0003bdd40, 0xc0002edbc0, 0x156f808, 0x0)
google.golang.org/grpc@v1.61.0/server.go:1385 +0xe03
google.golang.org/grpc.(*Server).handleStream(0xc000111000, {0xfd6038, 0xc000318820}, 0xc0003bdd40)
google.golang.org/grpc@v1.61.0/server.go:1796 +0xfec
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.61.0/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 16
google.golang.org/grpc@v1.61.0/server.go:1040 +0x135
Error: The terraform-provider-bitbucket_v2.42.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.
Hi there,
Terraform Version
Terraform is running on the latest version, I'm creating a docker image weekly that will download the latest terraform version, the command here ran on a bitbucket pipeline, I created a custom pipeline to import resources.
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Panic Output
Expected Behavior
The Repository should have been imported and added into state
Actual Behavior
Logs from import command:
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
with the repositoryterraform state rm bitbucket_repository.x
terraform import bitbucket_repository.x owner/repo_name
Important Factoids
Using Google Cloud for Remote state, same Bucket different prefix for the old and new states
References
None that I can see.
I'm probably going to delete the repository and just re-create it in the new state, as I haven't committed to it yet but I think this is important to fix.