terraform-provider-mongodbatlas icon indicating copy to clipboard operation
terraform-provider-mongodbatlas copied to clipboard

MILLION_RPU unit isn't supported by provider

Open tcarrondo opened this issue 1 year ago • 3 comments

Terraform CLI and Terraform MongoDB Atlas Provider Version

$ terraform version
Terraform v1.3.0
on linux_amd64
+ provider registry.terraform.io/mongodb/mongodbatlas v1.4.6

Terraform Configuration File

resource "mongodbatlas_alert_configuration" "with_thresholds" {

  project_id = data.mongodbatlas_project.main.id
  event_type = "OUTSIDE_SERVERLESS_METRIC_THRESHOLD"
  enabled    = true

  notification {
    type_name    = "TEAM"
    interval_min = 5
    delay_min    = 120
    team_id      = data.mongodbatlas_teams.main.team_id
  }

  metric_threshold_config {
    metric_name = "SERVERLESS_TOTAL_READ_UNITS"
    operator    = "GREATER_THAN"
    threshold   = 1
    units       = "MILLION_RPU"
    mode        = "AVERAGE"
  }
}

Steps to Reproduce

  1. terraform init
  2. terraform apply

Expected Behavior

Resource should be created

Actual Behavior

Error: expected metric_threshold_config.0.units to be one of [RAW BITS BYTES KILOBITS KILOBYTES MEGABITS MEGABYTES GIGABITS GIGABYTES TERABYTES PETABYTES MILLISECONDS SECONDS MINUTES HOURS DAYS], got MILLION_RPU

tcarrondo avatar Sep 22 '22 17:09 tcarrondo

@tcarrondo Current API Docs and codebase reflect this list as supported values Atlas portal does show this setting as an available value will verify with engineering in case we are missing other available values

  • threshold - Threshold value outside of which an alert will be triggered.
  • units - The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

martinstibbe avatar Sep 23 '22 23:09 martinstibbe

Internal Engineering tracking ticket INTMDB-406

martinstibbe avatar Sep 23 '22 23:09 martinstibbe

+1

akierstein-insider avatar Oct 10 '22 21:10 akierstein-insider

@tcarrondo @akierstein-insider we have just released v1.5.0, can you let us know if this resolves issue?

Zuhairahmed avatar Nov 08 '22 16:11 Zuhairahmed