Skip to content

Commit

Permalink
Merge pull request #1522 from ministryofjustice/lpal573_move_cloudwatch
Browse files Browse the repository at this point in the history
LPAL-573 Move Cloudwatch Log Group to region
  • Loading branch information
Sam Ainsworth committed May 3, 2023
2 parents 6361453 + edf22a1 commit d1762fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
16 changes: 1 addition & 15 deletions terraform/account/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
#tfsec:ignore:aws-cloudwatch-log-group-customer-key
resource "aws_cloudwatch_log_group" "online-lpa" {
name = "online-lpa"
retention_in_days = local.account.retention_in_days

tags = merge(
local.shared_component_tag,
{
"Name" = "online-lpa"
},
)
}

data "aws_cloudwatch_log_group" "cloudtrail" {
name = "online_lpa_cloudtrail_${local.account_name}"
provider = aws.eu-west-1
name = "online_lpa_cloudtrail_${local.account_name}"
}

resource "aws_cloudwatch_log_metric_filter" "breakglass_metric" {
Expand Down
13 changes: 13 additions & 0 deletions terraform/region/modules/region/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,16 @@ data "aws_iam_policy_document" "task_stopped_topic_policy" {
resources = [aws_sns_topic.cloudwatch_to_account_ops_alerts.arn]
}
}

#tfsec:ignore:aws-cloudwatch-log-group-customer-key
resource "aws_cloudwatch_log_group" "online-lpa" {
name = "online-lpa"
retention_in_days = local.account.retention_in_days

tags = merge(
local.shared_component_tag,
{
"Name" = "online-lpa"
},
)
}

0 comments on commit d1762fa

Please sign in to comment.