Skip to content

Instantly share code, notes, and snippets.

@btoueg
Last active March 22, 2019 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btoueg/260d55cbeec350478e5bf168c4c7b121 to your computer and use it in GitHub Desktop.
Save btoueg/260d55cbeec350478e5bf168c4c7b121 to your computer and use it in GitHub Desktop.
Terraform draft
resource "datadog_synthetics" "foo" {
# Every attributes required to create a new Datadog synthetics test
name = "Name for synthetics foo"
type = "api"
message = "Synthetics test failed. Notify: @slack-channel"
options {
tick_every = 60
}
config {
request {
method = "POST"
url = "https://example.org"
timeout = 30
body = "very long body"
headers = {
content-type = "application/json"
}
}
assertions = [
{
"type" = "statusCode"
"operator" = "is"
"target" = 200
},
{
"type" = "responseTime"
"operator" = "lessThan"
"target" = 2000
}
]
}
tags = ["foo:bar", "baz"]
# additional attribute to manage play/pause mechanism
isPaused = false # false by default
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment