Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 15, 2021
1 parent 66fef81 commit ee78dd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cloudtrail/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
locals {
cloudwatch_prefix = replace(aws_cloudwatch_log_group.this.arn, "/:\\*$/", "")
cloudwatch_suffix = format("%v_CloudTrail_%v", local.account_id, local.region)
cloudwatch_resources = join(":", list(local.cloudwatch_prefix, "log-stream", local.cloudwatch_suffix))
}

data "aws_iam_policy_document" "cloudwatch_policy" {
statement {
sid = "AWSCloudTrailCreateLogStream"
Expand All @@ -23,7 +29,8 @@ resource "aws_cloudwatch_log_group" "this" {
retention_in_days = 7

tags = merge(
local.common_tags,
local.base_tags,
var.tags,
map("Name", local.name),
)
}

0 comments on commit ee78dd6

Please sign in to comment.