rollbar / terraform-provider-rollbar

Terraform provider for Rollbar
https://rollbar.com
MIT License
28 stars 13 forks source link

Inconsistent Error: 1 Channel not found #333

Closed alinazabara closed 1 year ago

alinazabara commented 1 year ago

We are experiencing random Error: 1 Channel not found errors during terraform apply.

resource "rollbar_notification" "occurrence_rate_prod" {
  rule {
    filters {
      <...>
    }
    trigger = "occurrence_rate"
  }
  channel = "slack"
  config {
    show_message_buttons = true
    channel              = "rollbar-notifications-prod"
  }

  depends_on = [rollbar_integration.slack_integration]
}

After running terraform plan, we have 51 to change terraform resources - all of those are occurrence_rate Slack notifications (due to this issue). When running terraform apply, we receive 10 Error: 1 Channel not found errors (sometimes there are only 2 errors, sometimes >10).

Changing the channel name to #rollbar-notifications-prod (with #) gives us an additional Error: 1 The channel cannot be found error for rollbar_integration resource (Error: 1 Channel not found also occur).

Here are examples of errors:

│ Error: 1 Channel not found
│
│   with module.account_service_notifications.rollbar_notification.occurrence_rate_prod,
│   on modules/rollbar-notifications/notifications_prod.tf line 48, in resource "rollbar_notification" "occurrence_rate_prod":
│   48: resource "rollbar_notification" "occurrence_rate_prod" {
│ Error: 1 The channel cannot be found
│
│   with module.event_streaming_service_notifications.rollbar_integration.slack_integration,
│   on modules/rollbar-notifications/slack_integration.tf line 1, in resource "rollbar_integration" "slack_integration":
│    1: resource "rollbar_integration" "slack_integration" {
ghost commented 1 year ago

@alinazabara Thanks for reporting this issue. We'll investigate what goes wrong and will get back to you when finding something out.

@pawelsz-rb Can you look into this one too? This seems to be connected with https://github.com/rollbar/terraform-provider-rollbar/issues/285

ghost commented 1 year ago

@nieblara Pawel suspects that this is an API-side issue. Can you look into it, please?

BorisDr commented 1 year ago

Any progress on that? Still have same issue

ghost commented 1 year ago

Hey @BorisDr, This issue should have been fixed by a previous release. Can you confirm the provider version you use?

anmakove commented 1 year ago

Still present on provider version v1.12.0 if update many items in a row (more than 100). For example if I have 20 projects (1 project per service) and 11 rules for each project and want to change Slack channels for half of the rules - I need to apply configuration 3-5 times because of Error: 1 Channel not found error. Probably some kind of API throttling or requests limit

ghost commented 1 year ago

@anmakove I thought we fixed this issue already. Can you apply your configuration and generate some debug logs? This guide will help you to generate the logs. Let me know if the logs contain sensitive information, and I'll contact you privately to find a private channel.

ghost commented 1 year ago

@anmakove @BorisDr @alinazabara We released an API fix a few weeks ago that resolves this issue. Feel free to reopen it in case you still bump into it.