Skip to content

Commit

Permalink
add cw retention into defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 26, 2021
1 parent d98ef79 commit 7ef9fb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cloudtrail/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ locals {
}

resource "aws_cloudwatch_log_group" "this" {
name = local.name
# kms_key_id = var.kms_key_id
kms_key_id = var.kms_key_arn
# kms_key_id = data.aws_kms_key.incoming_key.id
retention_in_days = 7
name = local.name
kms_key_id = var.kms_key_arn
retention_in_days = lookup(local._defaults["cloudwatch"], "retention_in_days", 7)

tags = merge(
local.base_tags,
Expand Down
3 changes: 3 additions & 0 deletions common/defaults.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ locals {
"config" = {
"name" = "inf-config"
}
"cloudwatch" = {
"retention_in_days" = 14
}
"splunk_description" = {
"api_list" = [
"ec2_volumes", "ec2_instances", "ec2_reserved_instances", "ec2_key_pairs", "ec2_security_groups", "ec2_images", "ec2_addresses",
Expand Down

0 comments on commit 7ef9fb9

Please sign in to comment.