diff --git a/.shared-tools b/.shared-tools index 91feac6..eed735b 160000 --- a/.shared-tools +++ b/.shared-tools @@ -1 +1 @@ -Subproject commit 91feac6df7739145101516231453a865cf75ad39 +Subproject commit eed735be5d7a10f070c24a9bd1220a44c1971902 diff --git a/synthetics_get.tf b/synthetics_get.tf index e7f5c00..7b2d9c8 100644 --- a/synthetics_get.tf +++ b/synthetics_get.tf @@ -20,11 +20,35 @@ resource "datadog_synthetics_test" "get_jenkins_io" { "production" ] - device_ids = [ - "laptop_large", - "tablet", - "mobile_small" + status = "live" +} +resource "datadog_synthetics_test" "get_jenkins_io_enforced_https" { + type = "api" + request_definition { + method = "GET" + url = "http://get.jenkins.io" + } + assertion { + type = "statusCode" + operator = "is" + target = "308" + } + assertion { + type = "header" + property = "location" + operator = "is" + target = "https://get.jenkins.io" + } + locations = ["aws:eu-central-1"] + options_list { + tick_every = 900 + } + name = "get.jenkins.io-enforced-http" + message = "Notify @pagerduty" + tags = [ + "jenkins.io", + "production" ] status = "live" diff --git a/synthetics_mirrors.tf b/synthetics_mirrors.tf index f387477..0767185 100644 --- a/synthetics_mirrors.tf +++ b/synthetics_mirrors.tf @@ -2,7 +2,7 @@ resource "datadog_synthetics_test" "mirrors_jenkins_io" { type = "api" request_definition { method = "GET" - url = "https://mirrors.jenkins.io" + url = "https://mirrors.jenkins.io/debian/jenkins_2.251_all.deb?mirrorlist" } assertion { type = "statusCode" @@ -23,11 +23,42 @@ resource "datadog_synthetics_test" "mirrors_jenkins_io" { status = "live" } +resource "datadog_synthetics_test" "mirrors_jenkins_io_enforced_https" { + type = "api" + request_definition { + method = "GET" + url = "http://mirrors.jenkins.io" + } + assertion { + type = "statusCode" + operator = "is" + target = "308" + } + assertion { + type = "header" + property = "location" + operator = "is" + target = "https://mirrors.jenkins.io" + } + locations = ["aws:eu-central-1"] + options_list { + tick_every = 900 + } + name = "mirrors.jenkins.io-enforced-http" + message = "Notify @pagerduty" + tags = [ + "jenkins.io", + "production" + ] + + status = "live" +} + resource "datadog_synthetics_test" "mirrors_jenkinsci_org" { type = "api" request_definition { method = "GET" - url = "https://mirrors.jenkins-ci.org" + url = "https://mirrors.jenkins-ci.org/debian/jenkins_2.251_all.deb?mirrorlist" } assertion { type = "statusCode" @@ -47,3 +78,34 @@ resource "datadog_synthetics_test" "mirrors_jenkinsci_org" { status = "live" } + +resource "datadog_synthetics_test" "mirrors_jenkinsci_org_enforced_https" { + type = "api" + request_definition { + method = "GET" + url = "http://mirrors.jenkins-ci.org" + } + assertion { + type = "statusCode" + operator = "is" + target = "308" + } + assertion { + type = "header" + property = "location" + operator = "is" + target = "https://mirrors.jenkins-ci.org" + } + locations = ["aws:eu-central-1"] + options_list { + tick_every = 900 + } + name = "mirrors.jenkins-ci.org-enforced-http" + message = "Notify @pagerduty" + tags = [ + "jenkins-ci.org", + "production" + ] + + status = "live" +} diff --git a/synthetics_wiki.tf b/synthetics_wiki.tf index ff6db47..10081a9 100644 --- a/synthetics_wiki.tf +++ b/synthetics_wiki.tf @@ -32,7 +32,7 @@ resource "datadog_synthetics_test" "wikijenkins_ciorg" { operator = "is" target = "200" } - + locations = ["aws:eu-central-1"] # Can't work at the moment according datadog message # Synthetics is only available for the Datadog US site.