diff --git a/cloud/gcp/pubsub/README.md b/cloud/gcp/pubsub/README.md index 73e1076..2e49ece 100644 --- a/cloud/gcp/pubsub/README.md +++ b/cloud/gcp/pubsub/README.md @@ -23,12 +23,11 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | -| filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | -| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| filter_tags | Tags used for filtering | string | `*` | no | | message | Message sent when a monitor is triggered | string | - | yes | -| project_id | ID of the GCP Project | string | - | yes | +| new_host_delay | Delay in seconds for the new host evaluation | string | `300` | no | | sending_operations_count_extra_tags | Extra tags for GCP Pub/Sub Sending Operations Count monitor | list | `` | no | | sending_operations_count_message | Custom message for the GCP Pub/Sub Sending Operations Count monitor | string | `` | no | | sending_operations_count_silenced | Groups to mute for GCP Pub/Sub Sending Operations Count monitor | map | `` | no | diff --git a/cloud/gcp/pubsub/inputs.tf b/cloud/gcp/pubsub/inputs.tf index eeb6013..626a596 100644 --- a/cloud/gcp/pubsub/inputs.tf +++ b/cloud/gcp/pubsub/inputs.tf @@ -6,13 +6,8 @@ variable "environment" { type = "string" } -variable "filter_tags_use_defaults" { - description = "Use default filter tags convention" - default = "true" -} - -variable "filter_tags_custom" { - description = "Tags used for custom filtering when filter_tags_use_defaults is false" +variable "filter_tags" { + description = "Tags used for filtering" default = "*" } @@ -20,17 +15,14 @@ variable "message" { description = "Message sent when a monitor is triggered" } -variable "delay" { +variable "evaluation_delay" { description = "Delay in seconds for the metric evaluation" default = 900 } -# -# Filter variables -# -variable "project_id" { - type = "string" - description = "ID of the GCP Project" +variable "new_host_delay" { + description = "Delay in seconds for the new host evaluation" + default = 300 } # diff --git a/cloud/gcp/pubsub/monitors-pubsub.tf b/cloud/gcp/pubsub/monitors-pubsub.tf index b808452..7ef4d35 100644 --- a/cloud/gcp/pubsub/monitors-pubsub.tf +++ b/cloud/gcp/pubsub/monitors-pubsub.tf @@ -1,16 +1,3 @@ -# -# FILTER -# -data "template_file" "filter" { - template = "$${filter}" - - vars { - filter = "${var.filter_tags_use_defaults == "true" ? - format("project_id:%s", var.project_id) : - "${var.filter_tags_custom}"}" - } -} - # # Sending Operations Count # @@ -22,7 +9,7 @@ resource "datadog_monitor" "sending_operations_count" { query = <= ${var.unavailable_sending_operations_count_threshold_critical} EOF @@ -81,8 +68,8 @@ EOF notify_no_data = true renotify_interval = 0 - evaluation_delay = "${var.delay}" - new_host_delay = "${var.delay}" + evaluation_delay = "${var.evaluation_delay}" + new_host_delay = "${var.new_host_delay}" silenced = "${var.unavailable_sending_operations_count_silenced}"