Skip to content

bug: importing social providers #137

@bweston92

Description

@bweston92

We have an active social provider, we want to manage it with the rest of Ory through Terraform.

resource "ory_social_provider" "linkedin" {
  provider_id = "linkedin"
  provider_type = "linkedin_v2"
  client_id = "[redacted]"
  scope = [ "openid", "profile", "email" ]
}
terraform import ory_social_provider.linkedin "490206f4-8eea-40c1-ada5-a6070969c48f"
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

╷
│ Error: Request cancelled
│ 
│ The plugin6.(*GRPCProvider).ReadDataSource request was cancelled.
╵


Stack trace from the terraform-provider-ory_v26.0.4 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0xa0 pc=0x104cb6f7c]

goroutine 113 [running]:
github.com/ory/terraform-provider-ory/internal/client.(*OryClient).GetProject(0x7e959561e220?, {0x10593a2b8?, 0x7e95955a64b0?}, {0x7e9595250d20?, 0x105945118?})
        github.com/ory/terraform-provider-ory/internal/client/client.go:583 +0x2c
github.com/ory/terraform-provider-ory/internal/resources/socialprovider.(*SocialProviderResource).Read(0x7e9595812038, {0x10593a2b8, 0x7e95955a64b0}, {{{{0x105941cd0, 0x7e95956fce70}, {0x1057ab240, 0x7e95955a76b0}}, {0x105945118, 0x7e95958aa4b0}}, 0x0, ...}, ...)
        github.com/ory/terraform-provider-ory/internal/resources/socialprovider/resource.go:519 +0xbec
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadResource(0x7e9595441508, {0x10593a2b8, 0x7e95955a64b0}, 0x7e95955b45f0, 0x7e95957e7600)
        github.com/hashicorp/terraform-plugin-framework@v1.19.0/internal/fwserver/server_readresource.go:156 +0x888
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ReadResource(0x7e9595441508, {0x10593a2b8?, 0x7e95955a63c0?}, 0x7e95955b4550)
        github.com/hashicorp/terraform-plugin-framework@v1.19.0/internal/proto6server/server_readresource.go:71 +0x3fc
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0x7e95954c2500, {0x10593a2b8?, 0x7e95953e86f0?}, 0x7e95955ac3f0)
        github.com/hashicorp/terraform-plugin-go@v0.31.0/tfprotov6/tf6server/server.go:864 +0x1f8
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x10590f480, 0x7e95954c2500}, {0x10593a2b8, 0x7e95953e86f0}, 0x7e95958ae080, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.31.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:925 +0x1b8
google.golang.org/grpc.(*Server).processUnaryRPC(0x7e95954426c8, {0x10593a2b8, 0x7e95953e84e0}, 0x7e9595464820, 0x7e959554b7a0, 0x1059ffcf8, 0x0)
        google.golang.org/grpc@v1.79.2/server.go:1426 +0xc90
google.golang.org/grpc.(*Server).handleStream(0x7e95954426c8, {0x10593ac18, 0x7e95954649c0}, 0x7e9595464820)
        google.golang.org/grpc@v1.79.2/server.go:1830 +0x9e0
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.79.2/server.go:1061 +0x70
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 18
        google.golang.org/grpc@v1.79.2/server.go:1072 +0x120

Error: The terraform-provider-ory_v26.0.4 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions