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

Missing import resource documentation #59

Open
Invincibear opened this issue Jun 28, 2024 · 0 comments
Open

Missing import resource documentation #59

Invincibear opened this issue Jun 28, 2024 · 0 comments

Comments

@Invincibear
Copy link
Contributor

The codebase appears to support importing existing Sematext resources into Terraform state, but there are no examples in the documentation. I tried importing just my infra app's id and the provider crashed:

tf import sematext_app_infra.aks_cluster my_five_digit_infra_app_id_number

╷
│ 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-sematext_v0.6.1 plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 15 [running]:
github.com/sematext/terraform-provider-sematext/sematext.extractAppTokenNames({0xce0940?, 0xc0004c8520?})
	github.com/sematext/terraform-provider-sematext/sematext/functions.go:101 +0x1ba
github.com/sematext/terraform-provider-sematext/sematext.ResourceOperationReadApp({0xe37948, 0xc0002348a0}, 0xc00019d680, {0xc5c6e0?, 0xc00024e1c0}, {0xd0e653, 0x5})
	github.com/sematext/terraform-provider-sematext/sematext/resource_operation_app.go:180 +0x565
github.com/sematext/terraform-provider-sematext/sematext/generated.resourceOperationReadAppInfra({0xe37948?, 0xc0002348a0?}, 0x0?, {0xc5c6e0?, 0xc00024e1c0?})
	github.com/sematext/terraform-provider-sematext/sematext/generated/resource_app_infra.go:40 +0x3a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc00021bce0, {0xe37980, 0xc000234030}, 0xd?, {0xc5c6e0, 0xc00024e1c0})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:724 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00021bce0, {0xe37980, 0xc000234030}, 0xc0001c1ad0, {0xc5c6e0, 0xc00024e1c0})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0003c4408, {0xe37980?, 0xc00018fef0?}, 0xc00018ca00)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000199ae0, {0xe37980?, 0xc00018f530?}, 0xc000115c20)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xce07e0?, 0xc000199ae0}, {0xe37980, 0xc00018f530}, 0xc0000d62a0, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:383 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001b01e0, {0xe3b858, 0xc000402340}, 0xc0004c0c60, 0xc0003da4b0, 0x133f7f0, 0x0)
	google.golang.org/[email protected]/server.go:1337 +0xdf3
google.golang.org/grpc.(*Server).handleStream(0xc0001b01e0, {0xe3b858, 0xc000402340}, 0xc0004c0c60, 0x0)
	google.golang.org/[email protected]/server.go:1714 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/[email protected]/server.go:959 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:957 +0x18c

Error: The terraform-provider-sematext_v0.6.1 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant