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

mongodbatlas_alert_configuration notification microsoft_teams_webhook_url is always updated #1275

Closed
smokedlinq opened this issue Jun 27, 2023 · 3 comments
Labels

Comments

@smokedlinq
Copy link

Terraform CLI and Terraform MongoDB Atlas Provider Version

Terraform v1.5.1
on windows_amd64

Terraform Configuration File

terraform {
  required_version = ">=1.5"

  required_providers {
    mongodbatlas = {
      source  = "mongodb/mongodbatlas"
      version = "1.10.0"
    }
  }
}

variable "project_id" {
  type = string
}

variable "microsoft_teams_webhook_url" {
  type      = string
  sensitive = true
}

resource "mongodbatlas_alert_configuration" "high_memory" {
  project_id = var.project_id
  enabled    = true
  event_type = "OUTSIDE_METRIC_THRESHOLD"

  metric_threshold_config {
    metric_name = "SYSTEM_MEMORY_PERCENT_USED"
    operator    = "GREATER_THAN"
    threshold   = 85
    mode        = "AVERAGE"
    units       = "RAW"
  }

  notification {
    type_name                   = "MICROSOFT_TEAMS"
    interval_min                = "60"
    delay_min                   = "15"
    sms_enabled                 = false
    email_enabled               = false
    microsoft_teams_webhook_url = var.microsoft_teams_webhook_url
  }
}

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. terraform apply

Expected Behavior

No change should be detected.

Actual Behavior

# mongodbatlas_alert_configuration.high_memory will be updated in-place
  ~ resource "mongodbatlas_alert_configuration" "high_memory" {
        id                     = "ommitted"
        # (6 unchanged attributes hidden)

      ~ notification {
          ~ microsoft_teams_webhook_url = (sensitive value)
            # (6 unchanged attributes hidden)
        }

        # (2 unchanged blocks hidden)
    }
@github-actions
Copy link
Contributor

Thanks for opening this issue. The ticket INTMDB-896 was created for internal tracking.

@martinstibbe
Copy link
Contributor

martinstibbe commented Jun 28, 2023

@smokedlinq Able to replicate issue will fix in INTMDB-896

@andreaangiolillo
Copy link
Collaborator

Hello 👋
We released v1.10.2 with the fix to this bug.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants