chesshacker / terraform-provider-confluence

Terraform Provider for Confluence
https://chesshacker.github.io/terraform-provider-confluence/
Mozilla Public License 2.0
10 stars 30 forks source link

Error: Plugin did not respond #10

Open justinTM opened 2 years ago

justinTM commented 2 years ago
Error: Plugin did not respond
103│ 
104│   with confluence_content.pages["prod master Dashboards Library"],
105│   on confluence.tf line 122, in resource "confluence_content" "pages":
106│  122: resource confluence_content "pages" {
107│ 
108│ The plugin encountered an error, and failed to respond to the
109│ plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
110│ details.
111╵
1122021/10/08 20:06:53 [DEBUG] DELETE https://gitlab.com/api/v4/projects/asdlkjasdlkjasd/terraform/state/prod/lock
113Stack trace from the terraform-provider-confluence_v0.0.3 plugin:
114panic: runtime error: index out of range [-1]
115goroutine 34 [running]:
116github.com/chesshacker/terraform-provider-confluence/confluence.updateResourceDataFromContent(0xc0001405b0, 0xc000140620, 0xc00024db00, 0xc000140620, 0x0)
117 github.com/chesshacker/terraform-provider-confluence/confluence/resource_content.go:140 +0x5ed
118github.com/chesshacker/terraform-provider-confluence/confluence.resourceContentRead(0xc0001405b0, 0xf806a0, 0xc00024db00, 0xc0001405b0, 0x0)
119 github.com/chesshacker/terraform-provider-confluence/confluence/resource_content.go:76 +0xf8
120github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000134a00, 0xc00009d400, 0xf806a0, 0xc00024db00, 0xc00000e198, 0x0, 0x0)
121 github.com/hashicorp/terraform-plugin-sdk@v1.5.0/helper/schema/resource.go:455 +0x119
122github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0000c2c48, 0x122d800, 0xc000136c60, 0xc00009caa0, 0xc0000c2c48, 0xc000136c60, 0xc0001c6b78)
123 github.com/hashicorp/terraform-plugin-sdk@v1.5.0/internal/helper/plugin/grpc_provider.go:525 +0x3d8
124github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0xf7d0a0, 0xc0000c2c48, 0x122d800, 0xc000136c60, 0xc0000c44e0, 0x0, 0x122d800, 0xc000136c60, 0xc00026c000, 0xca17)
125 github.com/hashicorp/terraform-plugin-sdk@v1.5.0/internal/tfplugin5/tfplugin5.pb.go:3153 +0x217
126google.golang.org/grpc.(*Server).processUnaryRPC(0xc000001380, 0x1237b20, 0xc00008b200, 0xc000126c00, 0xc0000a3470, 0x1910db0, 0x0, 0x0, 0x0)
127 google.golang.org/grpc@v1.26.0/server.go:1024 +0x501
128google.golang.org/grpc.(*Server).handleStream(0xc000001380, 0x1237b20, 0xc00008b200, 0xc000126c00, 0x0)
129 google.golang.org/grpc@v1.26.0/server.go:1313 +0xd3d
130google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00003e1e0, 0xc000001380, 0x1237b20, 0xc00008b200, 0xc000126c00)
131 google.golang.org/grpc@v1.26.0/server.go:722 +0xa1
132created by google.golang.org/grpc.(*Server).serveStreams.func1
133 google.golang.org/grpc@v1.26.0/server.go:720 +0xa1
134Error: The terraform-provider-confluence_v0.0.3 plugin crashed!
135This is always indicative of a bug within the plugin. It would be immensely
136helpful if you could report the crash with the plugin's maintainers so that it
137can be fixed. The output above should help diagnose the issue.
justinTM commented 2 years ago

prod environment applied a page, got an error because i don't have permission to trash so I renamed the page and archived, then re-applied and got this error. the fix is usually just to manually destroy all of my other infrastructure by hand, delete the terraform state file in gitlab, and then re-apply. which is tedious but at least fixes the error. thanks