28 lines
558 B
HCL
Executable File

resource "datadog_synthetics_test" "beacon" {
type = "api"
subtype = "http"
request_definition {
method = "GET"
url = "http://${var.url}"
}
assertion {
type = "statusCode"
operator = "is"
target = "200"
}
locations = ["aws:${var.region}"]
options_list {
tick_every = 900
min_location_failed = 1
}
name = "${var.app_name} API Check"
message = "Oh no! Something is going wrong, please investigate!"
tags = ["app:${var.app_name}", "env:${var.environment}"]
status = "live"
}