-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster-logs.tf
31 lines (28 loc) · 921 Bytes
/
cluster-logs.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
##################################################################################
# S3 for Options App ALB logs
##################################################################################
resource "aws_s3_bucket" "log_bucket" {
bucket = "${var.cluster_name}-logs"
policy = "${data.aws_iam_policy_document.cluster_alb_log_bucket_policy.json}"
force_destroy = true
tags = "${map(
"Environment", "${terraform.workspace}",
"Workspace", "${terraform.workspace}",
"Application", "${var.product}",
"Product", "${var.product}",
"Product Family", "${var.product_family}",
"Costcode", "${var.cost_code}",
"Owner", "${var.owner}",
"Role" , "ALB Logs",
"Persistence", "true",
"Terraform", "True",
"load_balancer_is_internal", "True"
)}"
lifecycle_rule {
id = "log-expiration"
enabled = "true"
expiration {
days = "7"
}
}
}