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

Drift when working with alert rules #92

Open
alejandro-gallardo-ntt opened this issue May 29, 2024 · 0 comments
Open

Drift when working with alert rules #92

alejandro-gallardo-ntt opened this issue May 29, 2024 · 0 comments

Comments

@alejandro-gallardo-ntt
Copy link

When using the logicmonitor_alert_rule resource, Terraform plan randomly detects changes in the escalating_chain field for some alert rules. This field is managed by the provider itself and not customizable:
https://registry.terraform.io/providers/logicmonitor/logicmonitor/latest/docs/resources/alert_rule

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.lminstance_rules["AR - Azure - Error"].logicmonitor_alert_rule.main will be updated in-place
  ~ resource "logicmonitor_alert_rule" "main" {
      + escalating_chain       = (known after apply)
        id                     = "19"
        name                   = "AR - Azure - Error"
        # (11 unchanged attributes hidden)
    }

  # module.lminstance_rules["AR - Website"].logicmonitor_alert_rule.main will be updated in-place
  ~ resource "logicmonitor_alert_rule" "main" {
      + escalating_chain       = (known after apply)
        id                     = "25"
        name                   = "AR - Website"
        # (11 unchanged attributes hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

The changes detection could happen for different rules in every execution.
I have noticed in the tfstate files that the affected alert rules have the field "escalating_chain": null.

If I apply the changes, Logic Monitor audit logs show an update action for that rule.

Also mention all alert rules are imported resources.

Thanks,

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