Skip to content

Instantly share code, notes, and snippets.

@cruftyoldsysadmin
Created September 20, 2022 07:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
main.tf
# CloudWatch Log Group metric filters for driftctl-slack.
module "filter" {
for_each = var.cloudwatch_log_filters
source = "terraform-aws-modules/cloudwatch/aws//modules/log-metric-filter"
version = "3.3.0"
log_group_name = local.aws_cloudwatch_log_group
metric_transformation_name = each.key
metric_transformation_namespace = "drifctl.scan"
metric_transformation_value = var.cloudwatch_log_filters[each.key].metric_value
name = each.key
pattern = var.cloudwatch_log_filters[each.key].pattern
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment