diff --git a/modules/cloudwatch_metrics/README.md b/modules/cloudwatch_metrics/README.md index c30a89c..90fb0e0 100644 --- a/modules/cloudwatch_metrics/README.md +++ b/modules/cloudwatch_metrics/README.md @@ -65,6 +65,7 @@ No modules. | [include\_filters](#input\_include\_filters) | Namespaces to include. Mutually exclusive with exclude\_filters. | `set(string)` | `[]` | no | | [kinesis\_firehose](#input\_kinesis\_firehose) | Observe Kinesis Firehose module |
object({
firehose_delivery_stream = object({ arn = string })
firehose_iam_policy = object({ arn = string })
})
| n/a | yes | | [name](#input\_name) | Name of Cloudwatch Metrics Stream and CloudFormation stack | `string` | `"observe-cwmetricsstream"` | no | +| [output\_format](#input\_output\_format) | Output format for the stream | `string` | `"json"` | no | | [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no | ## Outputs diff --git a/modules/cloudwatch_metrics/main.tf b/modules/cloudwatch_metrics/main.tf index 83d506d..a69b266 100644 --- a/modules/cloudwatch_metrics/main.tf +++ b/modules/cloudwatch_metrics/main.tf @@ -33,7 +33,7 @@ resource "aws_cloudwatch_metric_stream" "main" { name = var.name role_arn = local.iam_role_arn firehose_arn = var.kinesis_firehose.firehose_delivery_stream.arn - output_format = "json" + output_format = var.output_format tags = var.tags dynamic "include_filter" { diff --git a/modules/cloudwatch_metrics/variables.tf b/modules/cloudwatch_metrics/variables.tf index 7673672..bd64076 100644 --- a/modules/cloudwatch_metrics/variables.tf +++ b/modules/cloudwatch_metrics/variables.tf @@ -47,3 +47,10 @@ variable "tags" { nullable = false default = {} } + +variable "output_format" { + description = "Output format for the stream" + type = string + nullable = false + default = "json" +}