-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogstash.tf
46 lines (42 loc) · 1.22 KB
/
logstash.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
module "logstash" {
count = var.configure_monitoring ? 1 : 0
source = "git::https://github.com/bitrockteam/caravan-cart//modules/logstash?ref=refs/tags/v0.3.7"
dc_names = var.dc_names
services_domain = var.services_domain
elastic_service_name = "elastic-internal"
logstash_jobs_constraints = var.monitoring_jobs_constraint
}
resource "consul_config_entry" "logstash-tcp" {
count = var.configure_monitoring ? 1 : 0
name = "logstash-tcp"
kind = "service-intentions"
config_json = jsonencode({
Sources = [{
Action = "allow"
Name = "*"
Precedence = 8
Type = "consul"
}]
})
}
resource "consul_config_entry" "logstash-http" {
count = var.configure_monitoring ? 1 : 0
name = "logstash-http"
kind = "service-intentions"
config_json = jsonencode({
Sources = [{
Action = "allow"
Name = "*"
Precedence = 8
Type = "consul"
}]
})
}
resource "consul_config_entry" "logstash-tcp-service-defaults" {
count = var.configure_monitoring ? 1 : 0
name = "logstash-tcp"
kind = "service-defaults"
config_json = jsonencode({
Protocol = "tcp"
})
}