-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Affected Resource(s)
- coralogix_hosted_dashboard
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "coralogix_grafana_folder" "this" {
title = "Test"
}
resource "coralogix_hosted_dashboard" "this" {
grafana {
config_json = local.coralogix_dashboards["this"]
folder = coralogix_grafana_folder.alex_test.id
}
}
# then
import {
to = coralogix_hosted_dashboard.this
id = "grafana:ac5756f4-a319-4019-ab8f-dac2e03a9999"
}local.coralogix_dahsboards["this"] here is the reference to grafana json file.
import id here is
Debug Output
Panic Output
Stack trace from the terraform-provider-coralogix_2.2.3 plugin:
panic: interface conversion: interface {} is nil, not string
goroutine 97 [running]:
terraform-provider-coralogix/coralogix.resourceHostedDashboardRead({0x105619f70, 0x140002ca700}, 0x140006e6980, {0x1055d5600, 0x1400016a4e0})
terraform-provider-coralogix/coralogix/resource_hosted_dashboard.go:83 +0x200
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x140002beb60, {0x105619ec8, 0x14000c10060}, 0x140006e6980, {0x1055d5600, 0x1400016a4e0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:823 +0xe4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x140002beb60, {0x105619ec8, 0x14000c10060}, 0x14000a00750, {0x1055d5600, 0x1400016a4e0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:1117 +0x40c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1400047ec18, {0x105619ec8?, 0x14000adbec0?}, 0x1400098c480)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:710 +0x5b0
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ReadResource({{0x105628838?, 0x1400047ec18?}}, {0x105619ec8?, 0x14000adbec0?}, 0x1400098c380?)
github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5to6server/tf5to6server.go:211 +0x284
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ReadResource(0x1400011da00, {0x105619ec8?, 0x14000adbbf0?}, 0x1400098c380)
github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf6muxserver/mux_server_ReadResource.go:35 +0x17c
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0x14000396dc0, {0x105619ec8?, 0x14000adb110?}, 0x140002ca0e0)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov6/tf6server/server.go:784 +0x210
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x1055d26e0, 0x14000396dc0}, {0x105619ec8, 0x14000adb110}, 0x140006e6280, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:575 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000201600, {0x105619ec8, 0x14000adb080}, 0x1400051e360, 0x14000549290, 0x1060e6ac8, 0x0)
google.golang.org/grpc@v1.73.0/server.go:1405 +0xc9c
google.golang.org/grpc.(*Server).handleStream(0x14000201600, {0x10561bf70, 0x140002964e0}, 0x1400051e360)
google.golang.org/grpc@v1.73.0/server.go:1815 +0x900
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.73.0/server.go:1035 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 14
google.golang.org/grpc@v1.73.0/server.go:1046 +0x138
Expected Behavior
We should be able to import the resource.
Actual Behavior
Error is thrown and resource is not imported
Steps to Reproduce
terraform apply
Important Factoids
I understand that there is no documentation for imports for this resource (as well as majority of the resources) in the provider but import seems to be working for ~10 other resources I needed to migrate so raising this anyway.
References
- #0000
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Metadata
Metadata
Assignees
Labels
No labels