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

Enhancement - Collectors disappearing if not registered #105

Open
natilik-mikeguy opened this issue Sep 6, 2024 · 0 comments
Open

Enhancement - Collectors disappearing if not registered #105

natilik-mikeguy opened this issue Sep 6, 2024 · 0 comments

Comments

@natilik-mikeguy
Copy link

Morning!

I appreciate this appears to be a Logic Monitor issue rather than Terraform specifically, but it has an impact on the way I'm trying to automate my company's provisioning of Logic Monitoring.

I have Terraform code to create collector groups and collectors based on inputs. These work ok (except for the issues with the URL outputs as per #104), however if not registered within a particular amount of time, the collector seems to be purged automatically. This then results in issues planning, as the resource in state can no longer be found:

╷
│ Error: unexpected: [GET /setting/collector/collectors/{id}][404] getCollectorById default  &{ErrorCode:1404 ErrorDetail:<nil> ErrorMessage:No such Agent19}
│ 
│   with module.logicmonitor.logicmonitor_collector.this["collectorclient2"],
│   on ../../../modules/logicmonitor_client/collectors.tf line 8, in resource "logicmonitor_collector" "this":
│    8: resource "logicmonitor_collector" "this" {
│ 
╵

This results in having to remove it from state manually, then re-run terraform apply, which causes issues with automation pipelines. Ideally, these would not disappear. A typical workflow we would like to use is:

  • Build a standardised setup in terms of device groups, devices (which has a reliance on collectors - I'll open a separate enhancement request), dashboards etc.
  • Take the URL output for each installer and go and deploy these in the relevant client environments (currently, we are time limited based on the behaviour and the window may not be long enough).
  • Operate the environment as normal.

The current behaviour prevents us from doing this cleanly and means we have to coincide the Terraform apply with install of agents. Not necessarily the hugest issue, but a pain nonetheless.

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