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

[Bug]: Removing an integration from an alert does not work #166

Open
stevedes77 opened this issue Apr 8, 2024 · 0 comments
Open

[Bug]: Removing an integration from an alert does not work #166

stevedes77 opened this issue Apr 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@stevedes77
Copy link

What versions are you using?

Terraform 1.5.1, provider registry.terraform.io/thousandeyes/thousandeyes v2.0.8

What did you expect to happen?

Plan should have shown the removal of the pagerduty integration from the alert rule

What actually happened?

Plan shows "no changes"

Terraform code to reproduce the bug

data "thousandeyes_integration" "test_pd_service_integration" {
  integration_name = "test-pd-service"
}

resource "thousandeyes_alert_rule" "test_rule" {
  rule_name  = "TEST ALERT RULE"
  alert_type = "HTTP Server"

  expression = "((errorType != \"None\"))" # Error Type is ANY

  minimum_sources = 1

  rounds_violating_required = 1
  rounds_violating_out_of   = 1

  notifications {
    dynamic "third_party" {
      for_each = [data.thousandeyes_integration.test_pd_service_integration]
      content {
        integration_id = third_party.value.integration_id
        integration_type = third_party.value.integration_type
      }
    }
  }
}

Any additional comments or code?

No response

Steps to reproduce the bug

After running apply on the above code, change the foreach block to

for_each = []

to simulate the removal of the integration (e.g. if it is inside a module and the integration list is a var on the module)

the terraform plan will show No changes. Your infrastructure matches the configuration. instead of showing the desired removal.

@stevedes77 stevedes77 added the bug Something isn't working label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant