Skip to content

Commit

Permalink
feat(cloudwatch): Add CloudWatch subscription filter in cul-cudl account
Browse files Browse the repository at this point in the history
- Add aws_cloudwatch_log_subscription_filter.logging_destination
  resource in cul-cudl-staging/cloudwatch.tf
- Add variable cloudwatch_log_destination_arn in cul-cudl-staging/
  variables.tf and terraform.tfvars
  • Loading branch information
rorymchugh committed Nov 26, 2024
1 parent 7efe06b commit 2011bed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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"
}
1 change: 1 addition & 0 deletions cul-cudl-staging/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ 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_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 2011bed

Please sign in to comment.