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

Cannot create Slack notification channels #444

Closed
mrennie opened this issue Nov 6, 2023 · 1 comment
Closed

Cannot create Slack notification channels #444

mrennie opened this issue Nov 6, 2023 · 1 comment

Comments

@mrennie
Copy link

mrennie commented Nov 6, 2023

Sysdig provider version 1.17.1

Terraform:

provider "sysdig" {
  alias                    = "platform_mad"
  ibm_monitor_api_key      = var.ibmcloud_api_key
  sysdig_monitor_api_token = var.sysdig_monitor_api_token
  sysdig_monitor_url       = "https://${var.region}.monitoring.cloud.ibm.com"
  ibm_monitor_iam_url      = "https://iam.cloud.ibm.com"
  ibm_monitor_instance_id  = var.sysdig_instance_guid
}

resource "sysdig_monitor_notification_channel_slack" "devops_core_mon_slack_channel" {
  provider               = sysdig.platform_mad
  name                   = "devops-core-mon"
  enabled                = true
  url                    = var.devops_core_mon_slack_webhook
  channel                = "devops-core-mon"
  notify_when_ok         = true
  notify_when_resolved   = true
  send_test_notification = true
}

Run init then plan, everything looks ok, try to apply the plan:

2023/11/06 17:19:48 Terraform apply | sysdig_monitor_notification_channel_slack.devops_gitlab_mon_mad_slack_channel: Creating...
 2023/11/06 17:19:48 Terraform apply | sysdig_monitor_notification_channel_slack.devops_core_mon_slack_channel: Creating...
 2023/11/06 17:19:48 Terraform apply | 
 2023/11/06 17:19:48 Terraform apply | Error: missing user's current team
 2023/11/06 17:19:48 Terraform apply | 
 2023/11/06 17:19:48 Terraform apply |   with sysdig_monitor_notification_channel_slack.devops_core_mon_slack_channel,
 2023/11/06 17:19:48 Terraform apply |   on main.tf line 114, in resource "sysdig_monitor_notification_channel_slack" "devops_core_mon_slack_channel":
 2023/11/06 17:19:48 Terraform apply |  114: resource "sysdig_monitor_notification_channel_slack" "devops_core_mon_slack_channel" {
 2023/11/06 17:19:48 Terraform apply | 
 2023/11/06 17:19:48 Terraform apply | 
 2023/11/06 17:19:48 Terraform apply | Error: missing user's current team
 2023/11/06 17:19:48 Terraform apply | 
 2023/11/06 17:19:48 Terraform apply |   with sysdig_monitor_notification_channel_slack.devops_gitlab_mon_mad_slack_channel,
 2023/11/06 17:19:48 Terraform apply |   on main.tf line 124, in resource "sysdig_monitor_notification_channel_slack" "devops_gitlab_mon_mad_slack_channel":
 2023/11/06 17:19:48 Terraform apply |  124: resource "sysdig_monitor_notification_channel_slack" "devops_gitlab_mon_mad_slack_channel" {
@mrennie
Copy link
Author

mrennie commented Nov 7, 2023

This came down to a configuration problem and user error.

Corrected the provider details to:

provider "sysdig" {
  alias                    = "platform_mad"
  ibm_monitor_api_key      = var.ibmcloud_api_key
  sysdig_monitor_team_name = "Monitor Operations"
  sysdig_monitor_url       = "https://${var.region}.monitoring.cloud.ibm.com"
  ibm_monitor_iam_url      = "https://iam.cloud.ibm.com"
  ibm_monitor_instance_id  = module.sysdig_cd_prod_platform_mad.cloud_monitoring_guid
}

Cleaned everything up, init -upgrade, plan, works as expected

@mrennie mrennie closed this as completed Nov 7, 2023
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