forked from AlexsLemonade/refinebio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging.tf
56 lines (45 loc) · 1.8 KB
/
logging.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
# CloudWatch Log Groups and Streams
##
# Groups
##
# This is the group. All of the streams belong to this.
resource "aws_cloudwatch_log_group" "data_refinery_log_group" {
name = "data-refinery-log-group-${var.user}-${var.stage}"
tags {
Name = "data-refinery-log-group-${var.user}-${var.stage}"
}
}
##
# Streams
##
# Nomad / Docker
resource "aws_cloudwatch_log_stream" "log_stream_surveyor" {
name = "log-stream-surveyor-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
resource "aws_cloudwatch_log_stream" "log_stream_processor" {
name = "log-stream-processor-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
resource "aws_cloudwatch_log_stream" "log_stream_downloader" {
name = "log-stream-downloader-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
# Foreman
resource "aws_cloudwatch_log_stream" "log_stream_foreman" {
name = "log-stream-foreman-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
# API
resource "aws_cloudwatch_log_stream" "log_stream_api" {
name = "log-stream-api-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
resource "aws_cloudwatch_log_stream" "log_stream_api_nginx_access" {
name = "log-stream-api-nginx-access-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}
resource "aws_cloudwatch_log_stream" "log_stream_api_nginx_error" {
name = "log-stream-api-nginx-error-${var.user}-${var.stage}"
log_group_name = "${aws_cloudwatch_log_group.data_refinery_log_group.name}"
}