-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudwatch.tf
32 lines (26 loc) · 1.13 KB
/
cloudwatch.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
resource "aws_cloudwatch_log_group" "sentry_integration_lambda_log_group" {
name = "/aws/lambda/${local.lambda_function_name}"
retention_in_days = var.log_retention_days
tags = {
name = "${local.sentry_integration_prefix}"
}
}
resource "aws_cloudwatch_log_group" "sentry_integration_api_gateway_log_group" {
# We can't change this log group name, as it is fixed by AWS.
# https://github.com/hashicorp/terraform-provider-aws/issues/8413
name = "API-Gateway-Execution-Logs_${aws_api_gateway_rest_api.ef_to_lambda.id}/${var.env}"
retention_in_days = var.log_retention_days
tags = {
name = "${local.sentry_integration_prefix}-api-gateway"
}
}
resource "aws_cloudwatch_log_group" "sentry_backtraffic_proxy_lambda_log_group" {
name = "/aws/lambda/${local.lambda_backtraffic_function_name}"
retention_in_days = var.log_retention_days
tags = {
name = "${local.sentry_integration_prefix}-backtraffic-lambda"
}
}
resource "aws_cloudwatch_log_group" "api_gw_sentry_backtraffic_log_group" {
name = "/aws/api-gateway-${var.env}/${local.sentry_integration_prefix}-backtraffic-api-gw"
}