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

Error: error getting synthetics test: is not a valid SyntheticsDeviceID #538

Closed
mjhuber opened this issue Jun 12, 2020 · 3 comments
Closed
Assignees
Labels

Comments

@mjhuber
Copy link

mjhuber commented Jun 12, 2020

This is only affecting us with provider version 2.8.0. It works fine with v2.7.0.

Terraform Version

Terraform v0.12.25

Affected Resource(s)

  • datadog_synthetics_test

Terraform Configuration Files

resource "datadog_synthetics_test" "homepage_browser" {
  for_each = { for monitor in local.monitors : "${monitor.id}" => monitor }

  type    = "browser"
  status  = each.value.status
  name    = "homepage [${each.value.env}-${each.value.subset}]"
  tags    = ["app:homepage", "env:${each.value.env}", "subset:${each.value.subset}"]
  message = <<-EOT
    runbook: <redacted>
    ${each.value.notify}
    EOT

  options = {
    tick_every           = 3600
    min_failure_duration = 0
    min_location_failed  = 2
    # TODO add retry # of times when this resource supports it
  }
  device_ids = ["chrome.laptop_large", "chrome.mobile_small"]
  locations  = each.value.locations

  request = {
    method = "GET"
    url    = "https://${each.value.subdomain}.<redacted>.com"
  }
  request_headers = {
    accept-encoding = "gzip"
    cookie          = "homepage_subset=${each.value.subset};"
  }

  assertions = [
    # TODO not (yet) supported. must be done in web UI
  ]
}

Expected Behavior

The plan works successfully.

Actual Behavior

For each browser test, we receive an error:

Error: error getting synthetics test:  is not a valid SyntheticsDeviceID: {"status":"live","public_id":"<redacted>","tags":["app:homepage","env:prod","subset:candidate"],"locations":["aws:ap-southeast-2","aws:eu-west-2","aws:us-east-2","aws:us-west-1"],"message":"runbook: <redacted>","name":"homepage [prod-candidate]","monitor_id":<redacted>,"type":"browser","config":{"request":{"url":"<redacted>","headers":{"cookie":"homepage_subset=candidate;","accept-encoding":"gzip"},"method":"GET"}},"options":{"min_failure_duration":0,"device_ids":["chrome.laptop_large","chrome.mobile_small"],"tick_every":3600,"min_location_failed":2}}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Important Factoids

Only occurs with provider version 2.8.0.

@zippolyte
Copy link
Contributor

Hi,

The version 2.8.0 of the provider ships a different library for communicating with Datadog's API. This library has a stricter validation on which values are allowed, but unfortunately, the list wasn't up to date with what's allowed by the API.
We are working on a fix. We'll update this issue accordingly.

Sorry for the inconvenience.

@gzussa
Copy link
Contributor

gzussa commented Jun 19, 2020

This issue should be fixed with the upcoming 2.8.1 release. See https://github.com/terraform-providers/terraform-provider-datadog/pull/546

@gzussa gzussa self-assigned this Jun 20, 2020
@gzussa gzussa added the bug label Jun 20, 2020
@gzussa
Copy link
Contributor

gzussa commented Jun 22, 2020

The release is actually 2.9.0. See https://github.com/terraform-providers/terraform-provider-datadog/releases/tag/v2.9.0. Closing this issue.

@gzussa gzussa closed this as completed Jun 22, 2020
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

3 participants