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

pagerduty_slack_connection Unable to create a Slack connection. Failed to fetch Slack channel data #954

Open
abdul90082 opened this issue Nov 19, 2024 · 0 comments

Comments

@abdul90082
Copy link

Terraform Version

terraform: 3.17.2

Affected Resource(s)

  • pagerduty_slack_connection

Terraform Configuration Files

resource "pagerduty_slack_connection" "slack" {
  for_each = local.services_all

  source_id         = pagerduty_service.services[each.key].id
  source_type       = "service_reference"
  workspace_id      = "ABCDEF"
  channel_id        = local.channel_ids[each.value.alert_severity]
  notification_type = "responder"
  config {
    events = [
      "incident.triggered",
      "incident.acknowledged",
      "incident.escalated",
      "incident.resolved",
      "incident.reassigned",
      "incident.annotated",
      "incident.unacknowledged",
      "incident.delegated",
      "incident.priority_updated",
      "incident.responder.added",
      "incident.responder.replied",
      "incident.status_update_published",
      "incident.reopened"
    ]
    priorities = ["*"]

  }
}

 # module.livechecks.pagerduty_slack_connection.slack["nlu"] will be created
  + resource "pagerduty_slack_connection" "slack" {
      + channel_id        = "CDFFDEE"
      + channel_name      = (known after apply)
      + id                = (known after apply)
      + notification_type = "responder"
      + source_id         = "AAAAAA"
      + source_name       = (known after apply)
      + source_type       = "service_reference"
      + workspace_id      = "ABCDEF"

      + config {
          + events     = [
              + "incident.triggered",
              + "incident.acknowledged",
              + "incident.escalated",
              + "incident.resolved",
              + "incident.reassigned",
              + "incident.annotated",
              + "incident.unacknowledged",
              + "incident.delegated",
              + "incident.priority_updated",
              + "incident.responder.added",
              + "incident.responder.replied",
              + "incident.status_update_published",
              + "incident.reopened",
            ]
          + priorities = ["*"]
        }
    }

Debug Output

024-11-19T14:09:45.774+0100 [ERROR] vertex "module.livechecks.pagerduty_slack_connection.slack[\"nlu\"]" error: POST API call to https://app.pagerduty.com/integration-slack/workspaces/ABCDEF/connections failed 400 Bad Request. Code: 0, Errors: <nil>, Message: Unable to create a Slack connection. Failed to fetch Slack channel data.

Actual Behavior

Error: POST API call to https://app.pagerduty.com/integration-slack/workspaces/ABCDEF/connections failed 400 Bad Request. Code: 0, Errors: <nil>, Message: Unable to create a Slack connection. Failed to fetch Slack channel data. 

with module.livechecks.pagerduty_slack_connection.slack["nlu"],
on livechecks/pagerduty.tf line 42, in resource "pagerduty_slack_connection" "slack":
 42: resource "pagerduty_slack_connection" "slack" {

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