-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexample.tf
More file actions
113 lines (100 loc) · 3.47 KB
/
example.tf
File metadata and controls
113 lines (100 loc) · 3.47 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
resource "akamai_gtm_domain" "property_test_domain" {
name = "test.akadns.net"
type = "basic"
}
resource "akamai_gtm_data_center" "property_test_dc1" {
name = "property_test_dc1"
domain = "${akamai_gtm_domain.property_test_domain.name}"
country = "GB"
continent = "EU"
city = "Downpatrick"
longitude = -5.582
latitude = 54.367
depends_on = [
"akamai_gtm_domain.property_test_domain",
]
}
resource "akamai_gtm_data_center" "property_test_dc2" {
name = "property_test_dc2"
domain = "${akamai_gtm_domain.property_test_domain.name}"
country = "IS"
continent = "EU"
city = "Snæfellsjökull"
longitude = -23.776
latitude = 64.808
depends_on = [
"akamai_gtm_data_center.property_test_dc1",
]
}
resource "akamai_gtm_data_center" "property_test_dc3" {
name = "property_test_dc3"
domain = "${akamai_gtm_domain.property_test_domain.name}"
country = "US"
continent = "NA"
city = "Philadelphia"
longitude = -75.167
latitude = 39.95
cloud_server_targeting = true
depends_on = [
"akamai_gtm_data_center.property_test_dc2",
]
}
resource "akamai_gtm_property" "test_property" {
domain = "${akamai_gtm_domain.property_test_domain.name}"
type = "weighted-round-robin"
name = "test_property"
balance_by_download_score = false
dynamic_ttl = 300
failover_delay = 0
failback_delay = 0
handout_mode = "normal"
health_threshold = 0
health_max = 0
health_multiplier = 0
load_imbalance_percentage = 10
ipv6 = false
score_aggregation_type = "mean"
static_ttl = 600
stickiness_bonus_percentage = 50
stickiness_bonus_constant = 0
use_computed_targets = false
liveness_test {
name = "health check"
test_object = "/status"
test_object_protocol = "HTTP"
test_interval = 60
disable_nonstandard_port_warning = false
http_error_4xx = true
http_error_3xx = true
http_error_5xx = true
test_object_port = 80
test_timeout = 25
}
traffic_target {
enabled = true
data_center_id = "${akamai_gtm_data_center.property_test_dc1.id}"
weight = 50.0
name = "${akamai_gtm_data_center.property_test_dc1.name}"
servers = [
"1.2.3.4",
"1.2.3.5",
]
}
traffic_target {
enabled = true
data_center_id = "${akamai_gtm_data_center.property_test_dc2.id}"
weight = 25.0
name = "${akamai_gtm_data_center.property_test_dc2.name}"
handout_cname = "www.google.com"
}
traffic_target {
enabled = true
data_center_id = "${akamai_gtm_data_center.property_test_dc3.id}"
weight = 25.0
name = "${akamai_gtm_data_center.property_test_dc3.name}"
handout_cname = "www.comcast.com"
# specifying `servers` enables liveness tests for `handout_cname` and is
# required in conjunction with `cloud_server_targeting` on data centers.
servers = ["www.comcast.com"]
}
}