-
Notifications
You must be signed in to change notification settings - Fork 1
/
service-discovery.tf
56 lines (47 loc) · 1.27 KB
/
service-discovery.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
resource "aws_service_discovery_private_dns_namespace" "local_dns" {
name = "${var.LOCAL_DNS}"
description = "local DNS"
vpc = "${aws_vpc.main.id}"
}
resource "aws_service_discovery_service" "smtp_dns" {
name = "smtp"
dns_config {
namespace_id = "${aws_service_discovery_private_dns_namespace.local_dns.id}"
dns_records {
ttl = 10
type = "A"
}
}
health_check_custom_config {
failure_threshold = 1
}
# depends_on = ["aws_service_discovery_private_dns_namespace.local_dns"]
}
resource "aws_service_discovery_service" "memcached_dns" {
name = "memcached"
dns_config {
namespace_id = "${aws_service_discovery_private_dns_namespace.local_dns.id}"
dns_records {
ttl = 10
type = "A"
}
}
health_check_custom_config {
failure_threshold = 1
}
# depends_on = ["aws_service_discovery_private_dns_namespace.local_dns"]
}
resource "aws_service_discovery_service" "sentry_web_dns" {
name = "sentry-web"
dns_config {
namespace_id = "${aws_service_discovery_private_dns_namespace.local_dns.id}"
dns_records {
ttl = 10
type = "A"
}
}
health_check_custom_config {
failure_threshold = 1
}
# depends_on = ["aws_service_discovery_private_dns_namespace.local_dns"]
}