generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
main.tf
85 lines (79 loc) · 1.8 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module "zone" {
source = "../.."
account_id = var.account_id
zone = var.zone
zone_enabled = false
argo_enabled = false
records = [
{
name = "@"
value = "FOO"
type = "TXT"
ttl = 300
proxied = false
},
{
name = "@"
value = "BAR"
type = "TXT"
ttl = 300
proxied = false
},
{
name = format("bastion-%s", join("", var.attributes))
value = "1.1.1.1"
type = "A"
ttl = 1
},
{
name = format("api-%s", join("", var.attributes))
value = "1.1.1.1"
type = "A"
ttl = 1
}
]
healthchecks = [
{
address = format("bastion-%s.%s", join("", var.attributes), var.zone)
check_regions = [
"WEU",
"EEU"
]
type = "TCP"
port = "22"
timeout = 10
retries = 2
interval = 60
consecutive_fails = 3
consecutive_successes = 2
suspended = true
},
{
address = format("api-%s.%s", join("", var.attributes), var.zone)
check_regions = [
"WEU",
"EEU"
]
type = "HTTPS"
port = "443"
timeout = 10
retries = 2
interval = 60
consecutive_fails = 3
consecutive_successes = 2
suspended = true
}
]
page_rules = [
{
target = format("api-%s.%s/v1/*", join("", var.attributes), var.zone)
actions = {
forwarding_url = {
url = format("https://www.api-%s.%s/$1", join("", var.attributes), var.zone)
status_code = "301"
}
}
}
]
context = module.this.context
}