-
Notifications
You must be signed in to change notification settings - Fork 16
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
Plugin Crashes #44
Comments
we are currently having the same issue. This seems to happen due to the large number of devices / groups managed by Terraform. We are also hitting the API limits https://www.logicmonitor.com/support/rest-api-developers-guide/overview/rate-limiting |
Were you able to find a workaround? |
No yet no. We are still not 100% sure if this started to manifest itself due to hitting API limits. Just to confirm, can you check from the portal if you are being throttled? You can find this under Audit logs: Throttled API request: API token XXXXXXX attempted to access path '/santaba/rest/device/devices/859' with Method: GET |
TF code doesn't even start applying so I have nothing on Audit logs. |
@PatriQ1414 Can you provide .tf file that you are using for this? |
`terraform { provider "logicmonitor" { provider "aws" { data "logicmonitor_data_resource_aws_external_id" "my_external_id" { data "aws_iam_policy_document" "assume_role" { resource "aws_iam_role" "lm" { resource "aws_iam_role_policy_attachment" "read_only_access" { resource "aws_iam_role_policy_attachment" "aws_support_access" { resource "null_resource" "wait" { resource "logicmonitor_device_group" "parent_device_group" { variable "lm_environment" { for_each = toset(var.lm_environment) resource "logicmonitor_device_group" "management_device_group" { variable "mgmt_environment" { resource "logicmonitor_device_group" "mgmt_dymanic_group" { for_each = toset(var.mgmt_environment) resource "logicmonitor_device_group" "batch_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "client_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "database_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "grp1_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "grp2_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "grp3_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "grp4_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "grp5_dymanic_group" { for_each = logicmonitor_device_group.environment_device_group resource "logicmonitor_device_group" "my_aws_device_group" {
} group_type = "AWS/AwsRoot" |
Hi Guys, any luck with this? |
We had to split our workspace so state file contains less than 500 resources to avoid hitting the throttling limit which in our case was causing the provider errors |
Changed my version from required_providers { to required_providers { Terrafrom init -upgrade logic monitor plugin upgraded to version 2.0.2 That seems to have fixed the plugin issue |
provider "logicmonitor" { We have added this provider configuration to handle the rate limit. |
I ran this successfully when I was testing it with a few lines of code, but as soon as I started customizing the code, using "for_each" statements, the plugin would just crash
See error below
`│ 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.
╵
╷
│ 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.
╵
╷
│ Error: Plugin did not respond
│
│ with data.logicmonitor_data_resource_aws_external_id.my_external_id,
│ on LM_demo.tf line 28, in data "logicmonitor_data_resource_aws_external_id" "my_external_id":
│ 28: data "logicmonitor_data_resource_aws_external_id" "my_external_id" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-logicmonitor_v2.0.1.exe plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7110ec]
goroutine 47 [running]:
terraform-provider-logicmonitor/client/device_group.(*GetDeviceGroupByIDOK).GetPayload(...)
terraform-provider-logicmonitor/client/device_group/get_device_group_by_id_responses.go:61
terraform-provider-logicmonitor/logicmonitor/resources.getDeviceGroupById(0xaf40cc, 0x124044c0, 0x1246e780, 0x92ada0, 0x121fa6a0, 0x124044c0, 0x122836b8, 0x19bafc)
terraform-provider-logicmonitor/logicmonitor/resources/device_group_resource.go:128 +0x2ac
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x124b75e0, 0xaf408c, 0x1209c1a0, 0x1246e780, 0x92ada0, 0x121fa6a0, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:347 +0x11f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x124b75e0, 0xaf408c, 0x1209c1a0, 0x12404100, 0x92ada0, 0x121fa6a0, 0x122836a8, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:624 +0x158
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1226aa70, 0xaf408c, 0x1209c1a0, 0x1209c1e0, 0x1209c1a0, 0x199726, 0x9a2640)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:575 +0x352
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0x124020d8, 0xaf40ec, 0x1209c1a0, 0x1266e1b0, 0x124020d8, 0x12559401, 0x126701e0)
github.com/hashicorp/[email protected]/tfprotov5/server/server.go:298 +0xd4
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x9c0e80, 0x124020d8, 0xaf40ec, 0x126701e0, 0x1266e180, 0x0, 0xaf40ec, 0x126701e0, 0x12559400, 0x4b6)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x199
google.golang.org/grpc.(*Server).processUnaryRPC(0x1210c120, 0xaf8d34, 0x12134100, 0x125d8090, 0x124020f0, 0xf4bda8, 0x0, 0x0, 0x0)
google.golang.org/[email protected]/server.go:1194 +0x4ea
google.golang.org/grpc.(*Server).handleStream(0x1210c120, 0xaf8d34, 0x12134100, 0x125d8090, 0x0)
google.golang.org/[email protected]/server.go:1517 +0xa71
google.golang.org/grpc.(*Server).serveStreams.func1.2(0x12400110, 0x1210c120, 0xaf8d34, 0x12134100, 0x125d8090)
google.golang.org/[email protected]/server.go:859 +0x92
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:857 +0x1b0
Error: The terraform-provider-logicmonitor_v2.0.1.exe 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.`
The text was updated successfully, but these errors were encountered: