-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
logging.tf
48 lines (39 loc) · 1.16 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
###################################################
# Access Logs for Service
###################################################
resource "aws_vpclattice_access_log_subscription" "cloudwatch" {
count = var.logging_to_cloudwatch.enabled ? 1 : 0
resource_identifier = aws_vpclattice_service.this.id
destination_arn = var.logging_to_cloudwatch.log_group
tags = merge(
{
"Name" = "${var.name}/cloudwatch"
},
local.module_tags,
var.tags,
)
}
resource "aws_vpclattice_access_log_subscription" "kinesis_data_firehose" {
count = var.logging_to_kinesis_data_firehose.enabled ? 1 : 0
resource_identifier = aws_vpclattice_service.this.id
destination_arn = var.logging_to_kinesis_data_firehose.delivery_stream
tags = merge(
{
"Name" = "${var.name}/kinesis-data-firehose"
},
local.module_tags,
var.tags,
)
}
resource "aws_vpclattice_access_log_subscription" "s3" {
count = var.logging_to_s3.enabled ? 1 : 0
resource_identifier = aws_vpclattice_service.this.id
destination_arn = var.logging_to_s3.bucket
tags = merge(
{
"Name" = "${var.name}/s3"
},
local.module_tags,
var.tags,
)
}