Skip to content

Commit

Permalink
Merge pull request #32 from cambridge-collection/feature/cloudwatch-l…
Browse files Browse the repository at this point in the history
…og-destination

feat(cloudwatch): Add CloudWatch subscription filter in cul-cudl account
  • Loading branch information
rorymchugh authored Nov 27, 2024
2 parents 7efe06b + c96a153 commit e39b5fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cul-cudl-staging/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "aws_cloudwatch_log_subscription_filter" "logging_destination" {
name = format("%s-logging-destination", local.base_name_prefix)
log_group_name = module.base_architecture.cloudwatch_log_group_name
filter_pattern = ""
destination_arn = var.cloudwatch_log_destination_arn
distribution = "ByLogStream"
}
3 changes: 2 additions & 1 deletion cul-cudl-staging/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ alb_enable_deletion_protection = false
alb_idle_timeout = "900"
vpc_cidr_block = "10.88.0.0/22" #1024 adresses
vpc_public_subnet_public_ip = false
cloudwatch_log_group = "/ecs/CUDL"
cloudwatch_log_group = "/ecs/CUDL-Staging"
cloudwatch_log_destination_arn = "arn:aws:logs:eu-west-1:874581676011:destination:cul-logs-cloudwatch-log-destination"
vpc_endpoint_services = ["ssmmessages", "ssm", "ec2messages", "ecr.api", "ecr.dkr", "ecs", "ecs-agent", "ecs-telemetry", "logs", "elasticfilesystem", "secretsmanager"]

# Content Loader Workload
Expand Down
5 changes: 5 additions & 0 deletions cul-cudl-staging/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ variable "cloudwatch_log_group" {
description = "Name of the cloudwatch log group"
}

variable "cloudwatch_log_destination_arn" {
type = string
description = "ARN of a CloudWatch Log Destination"
}

variable "content_loader_name_suffix" {
type = string
description = "Suffix to add to Content Loader resource names"
Expand Down

0 comments on commit e39b5fd

Please sign in to comment.