-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
44 lines (35 loc) · 957 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
terraform {
required_providers {
bowtie = {
source = "bowtieworks/bowtie"
version = "0.6.0"
}
checkmate = {
source = "tetratelabs/checkmate"
version = "1.5.0"
}
aws = {
source = "hashicorp/aws"
}
}
}
resource "checkmate_http_health" "baseline_up" {
# This is the url of the endpoint we want to check
url = "${var.api_hostname}/-net/api/v0/ok"
# Will perform an HTTP GET request
method = "GET"
# The overall test should not take longer than 15 minutes
timeout = 1000 * 60 * 15 # ms, seconds, minutes
# Wait 0.5 seconds between attempts
interval = 500
# Expect a status 200 OK
status_code = 200
# We want 2 successes in a row
consecutive_successes = 2
}
module "bowtie-org" {
depends_on = [checkmate_http_health.baseline_up]
source = "./modules/bowtie"
org_name = var.org_name
domain = replace(replace(var.api_hostname, "https://", ""), "http://", "")
}