-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcloudwatch.tf
49 lines (41 loc) · 2.06 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#########################################
# CodeBuild
#########################################
resource "aws_cloudwatch_log_group" "sce_codebuild_runner" {
name = "${local.cloudwatch.codebuild_log_group_prefix}/${local.codebuild.sce_runner.name}"
kms_key_id = aws_kms_alias.tfc.target_key_arn
retention_in_days = var.cloudwatch_log_group_retention
tags = var.tags
}
#########################################
# Lambda Functions
#########################################
resource "aws_cloudwatch_log_group" "sce_lambda_provisioning_handler" {
name = "${local.cloudwatch.lambda_log_group_prefix}/${local.lambda.sce_lambda_provisioning_handler.function_name}"
kms_key_id = aws_kms_alias.tfc.target_key_arn
retention_in_days = var.cloudwatch_log_group_retention
tags = var.tags
}
resource "aws_cloudwatch_log_group" "sce_lambda_get_state_file_outputs" {
name = "${local.cloudwatch.lambda_log_group_prefix}/${local.lambda.sce_get_state_file_outputs.function_name}"
kms_key_id = aws_kms_alias.tfc.target_key_arn
retention_in_days = var.cloudwatch_log_group_retention
tags = var.tags
}
resource "aws_cloudwatch_log_group" "sce_lambda_notify_provision_update_result" {
name = "${local.cloudwatch.lambda_log_group_prefix}/${local.lambda.sce_notify_provision_update_result.function_name}"
kms_key_id = aws_kms_alias.tfc.target_key_arn
retention_in_days = var.cloudwatch_log_group_retention
tags = var.tags
}
#########################################
# Step Functions
#########################################
resource "aws_cloudwatch_log_group" "sce_sfn_manage_provisioned_product" {
name = "${local.cloudwatch.sfn_log_group_prefix}/${local.sfn.sce_manage_provisioned_product.name}"
kms_key_id = aws_kms_alias.tfc.target_key_arn
retention_in_days = var.cloudwatch_log_group_retention
tags = var.tags
}