From a363eabf1b24d3c0afccfe269d81805f6854d98d Mon Sep 17 00:00:00 2001 From: Mike Terhar Date: Wed, 17 Sep 2025 16:58:23 +0000 Subject: [PATCH 1/2] add variable and pass into submodule --- main.tf | 3 +++ variables.tf | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/main.tf b/main.tf index b7141ae..05970ab 100644 --- a/main.tf +++ b/main.tf @@ -71,6 +71,9 @@ module "cloudwatch_metrics" { honeycomb_api_key = var.honeycomb_api_key honeycomb_dataset_name = "cloudwatch-metrics" + include_filters = var.cloudwatch_metrics_include_filters + exclude_filters = var.cloudwatch_metrics_exclude_filters + s3_failure_bucket_arn = module.failure_bucket.s3_bucket_arn tags = var.tags diff --git a/variables.tf b/variables.tf index ef5e754..de7d8e0 100644 --- a/variables.tf +++ b/variables.tf @@ -207,8 +207,35 @@ variable "cloudwatch_metrics_name" { default = "honeycomb-cloudwatch-metrics" } +variable "cloudwatch_metrics_include_filters" { + type = list(object({ + namespace = string + metric_names = list(string) + })) + default = [] + description = < Date: Wed, 17 Sep 2025 17:01:35 +0000 Subject: [PATCH 2/2] add to complete example --- examples/complete/README.md | 16 ++++++++++++++++ examples/complete/main.tf | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/examples/complete/README.md b/examples/complete/README.md index afd6a7c..7f4bf7b 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -37,6 +37,22 @@ module "honeycomb-aws-integrations" { # aws metrics integration # enable_cloudwatch_metrics = true + # Only stream specific EC2 metrics and all ELB metrics to Honeycomb + # cloudwatch_metrics_include_filters = [ + # { + # namespace = "AWS/EC2" + # metric_names = [ + # "CPUUtilization", + # "DiskWriteOps", + # "NetworkIn", + # "NetworkOut" + # ] + # }, + # { + # namespace = "AWS/ELB" + # metric_names = [] # include all metrics for this namespace + # } + # ] # s3 logfile - alb access logs s3_bucket_arn = var.s3_bucket_arn diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 7c268c1..b96e9bc 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -16,6 +16,22 @@ module "honeycomb-aws-integrations" { # aws metrics integration # enable_cloudwatch_metrics = true + # Only stream specific EC2 metrics and all ELB metrics to Honeycomb + # cloudwatch_metrics_include_filters = [ + # { + # namespace = "AWS/EC2" + # metric_names = [ + # "CPUUtilization", + # "DiskWriteOps", + # "NetworkIn", + # "NetworkOut" + # ] + # }, + # { + # namespace = "AWS/ELB" + # metric_names = [] # include all metrics for this namespace + # } + # ] # s3 logfile - alb access logs s3_bucket_arn = var.s3_bucket_arn