logicmonitor / terraform-provider-logicmonitor

Terraform LogicMonitor provider.
https://registry.terraform.io
Mozilla Public License 2.0
24 stars 16 forks source link

Terraform logicmonitor provider does not enable "Enable Monitoring via local Collector" #93

Open guyinhat opened 3 months ago

guyinhat commented 3 months ago

Using the following config block for setting up the e_c2 service, Im running into an issue where all the configs are correct, except nothing activates the slider to enable it. Meaning, If after I run terraform, all is setup under the Collector Assignments, but until I manually activate the slider, nothing happens. As soon as I activate the slider I see my collector config and regions and all is there. It just seems that the enabled line under normal_collector_config does nothing:

Here is an example of my e_c2 service block:

            e_c2 {
              use_default = false
              disable_terminated_host_alerting = true
              select_all = false
              monitoring_region_infos = ["US_EAST_1","US_EAST_2","US_WEST_1","US_WEST_2","EU_WEST_1"]
              monitoring_regions = ["US_EAST_1","US_EAST_2","US_WEST_1","US_WEST_2","EU_WEST_1"]
              dead_operation = "IMMEDIATELY"
              normal_collector_config {
                  enabled = true           // This doesnt seem to do anything
                  collectors = [
                    {
                        collector_description = "AWS ${var.profile} ${var.instance_name[1]}",
                        auto_balanced_collector_group_id = 0,
                        collector_id = logicmonitor_collector.aws_collector.id,
                        priority = 1,
                        applies_to = "system.aws.region==\"us-east-1\"\n||system.aws.region==\"us-east-2\"\n||system.aws.region==\"us-west-1\"\n||system.aws.region==\"us-west-2\"\n||system.aws.region==\"eu-west-1\"\n",
                        use_public_ip = false
                    }
                  ]
              }
            }
guyinhat commented 3 months ago

Terraform Version: v1.5.2 Logicmonitor Provider Version: v2.0.16

guyinhat commented 3 months ago

Also, after setting it to true and running terraform apply, all will appear to be applied and terraform will deploy successfully. However if I run terraform plan again I'll see this:

                  ~ normal_collector_config {
                      ~ enabled    = false -> true
                        # (1 unchanged attribute hidden)
                    }