Last active
March 22, 2019 07:28
-
-
Save btoueg/260d55cbeec350478e5bf168c4c7b121 to your computer and use it in GitHub Desktop.
Terraform draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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