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

[Bug]: "Invalid probes used for check" when creating a scripted test with more than one probe #1832

Open
ipiqueras opened this issue Oct 7, 2024 · 0 comments
Assignees
Labels

Comments

@ipiqueras
Copy link

Terraform Version

1.9.2

Terraform Grafana Provider Version

3.9.0

Grafana Version

No response

Affected Resource(s)

  • Synthetic monitoring Checks (scripted)

Terraform Configuration Files

terraform {
  required_providers {
    grafana = {
      source = "grafana/grafana"
    }
  }
  required_version = ">= 1.4.2"
}

provider "grafana" {
  sm_access_token = "<secret_token>"
  sm_url          = "https://synthetic-monitoring-api.grafana.net"
}

resource "grafana_synthetic_monitoring_check" "scripted" {
  job       = "test job"
  target    = "https://grafana.com/"
  enabled   = true
  probes    = [
    data.grafana_synthetic_monitoring_probes.locations.probes["Amsterdam"],
    data.grafana_synthetic_monitoring_probes.locations.probes["Atlanta"]
  ]
  frequency         = 300 * 1000
  timeout           = 30 * 1000
  alert_sensitivity = "medium"

  settings {
    # also see https://github.com/grafana/terraform-provider-grafana/
    scripted {
      script = file("test.js")
    }
  }
}

Expected Behavior

I would expect the check created to use two probes.

I can create the check with just one probe. Trying to create it with more or adding any other probe with Terraform fails.

Actual Behavior

terraform apply fails with this error:

module.test_1.grafana_synthetic_monitoring_check.scripted: Modifying... [id=1655562]

│ Error: check update request: status="400 Bad Request", msg="Invalid probes used for check", err="bad request"

Steps to Reproduce

  1. terraform apply

Important Factoids

No response

References

No response

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

2 participants