diff --git a/cloud/gcp/big-query/README.md b/cloud/gcp/big-query/README.md index b3f985c..06ef809 100644 --- a/cloud/gcp/big-query/README.md +++ b/cloud/gcp/big-query/README.md @@ -30,14 +30,12 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| available_slots_enabled | Whether or not to create the monitor | string | `true` | no | | available_slots_extra_tags | Extra tags for GCP Big Query Available Slots monitor | list | `` | no | | available_slots_message | Custom message for the Available Slots monitor | string | `` | no | | available_slots_silenced | Groups to mute for GCP Big Query Available Slots monitor. | map | `` | no | | available_slots_threshold_critical | Available Slots (critical threshold) | string | `200` | no | | available_slots_threshold_warning | Available Slots (warning threshold) | string | `300` | no | | available_slots_timeframe | Timeframe for the Available Slots monitor | string | `last_5m` | no | -| concurrent_queries_enabled | Whether or not to create the monitor | string | `true` | no | | concurrent_queries_extra_tags | Extra tags for GCP Big Query Concurrent Queries monitor | list | `` | no | | concurrent_queries_message | Custom message for the Concurrent Queries monitor | string | `` | no | | concurrent_queries_silenced | Groups to mute for GCP Big Query Concurrent Queries monitor | map | `` | no | @@ -46,7 +44,6 @@ Creates DataDog monitors with the following checks: | concurrent_queries_timeframe | Timeframe for the Concurrent Queries monitor | string | `last_5m` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | -| execution_time_enabled | Whether or not to create the monitor | string | `true` | no | | execution_time_extra_tags | Extra tags for GCP Big Query Execution Time monitor | list | `` | no | | execution_time_message | Custom message for the Execution Time monitor | string | `` | no | | execution_time_silenced | Groups to mute for GCP Big Query Execution Time monitor. Muted by default. | map | `` | no | @@ -57,42 +54,36 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when a monitor is triggered | string | - | yes | | project_id | ID of the GCP Project | string | - | yes | -| scanned_bytes_billed_enabled | Whether or not to create the monitor | string | `true` | no | | scanned_bytes_billed_extra_tags | Extra tags for GCP Big Query Scanned Bytes Billed monitor | list | `` | no | | scanned_bytes_billed_message | Custom message for the Scanned Bytes Billed monitor | string | `` | no | | scanned_bytes_billed_silenced | Groups to mute for GCP Big Query Scanned Bytes Billed monitor. Muted by default. | map | `` | no | | scanned_bytes_billed_threshold_critical | Scanned Bytes Billed Bytes (critical threshold) | string | `1` | no | | scanned_bytes_billed_threshold_warning | Scanned Bytes Billed Bytes (warning threshold) | string | `0` | no | | scanned_bytes_billed_timeframe | Timeframe for the Scanned Bytes Billed monitor | string | `last_4h` | no | -| scanned_bytes_enabled | Whether or not to create the monitor | string | `true` | no | | scanned_bytes_extra_tags | Extra tags for GCP Big Query Scanned Bytes monitor | list | `` | no | | scanned_bytes_message | Custom message for the Scanned Bytes monitor | string | `` | no | | scanned_bytes_silenced | Groups to mute for GCP Big Query Scanned Bytes monitor. Muted by default. | map | `` | no | | scanned_bytes_threshold_critical | Scanned Bytes Bytes (critical threshold) | string | `1` | no | | scanned_bytes_threshold_warning | Scanned Bytes Bytes (warning threshold) | string | `0` | no | | scanned_bytes_timeframe | Timeframe for the Scanned Bytes monitor | string | `last_4h` | no | -| stored_bytes_enabled | Whether or not to create the monitor | string | `true` | no | | stored_bytes_extra_tags | Extra tags for GCP Big Query Stored Bytes monitor | list | `` | no | | stored_bytes_message | Custom message for the Stored Bytes monitor | string | `` | no | | stored_bytes_silenced | Groups to mute for GCP Big Query Stored Bytes monitor. Muted by default. | map | `` | no | | stored_bytes_threshold_critical | Stored Bytes in fraction (critical threshold) | string | `1` | no | | stored_bytes_threshold_warning | Stored Bytes in fraction (warning threshold) | string | `0` | no | | stored_bytes_timeframe | Timeframe for the Stored Bytes monitor | string | `last_5m` | no | -| table_count_enabled | Whether or not to create the monitor | string | `true` | no | | table_count_extra_tags | Extra tags for GCP Big Query Table Count monitor | list | `` | no | | table_count_message | Custom message for the Table Count monitor | string | `` | no | | table_count_silenced | Groups to mute for GCP Big Query Table Count monitor. Muted by default. | map | `` | no | | table_count_threshold_critical | Table Count (critical threshold) | string | `1` | no | | table_count_threshold_warning | Table Count (warning threshold) | string | `0` | no | | table_count_timeframe | Timeframe for the Table Count monitor | string | `last_4h` | no | -| uploaded_bytes_billed_enabled | Whether or not to create the monitor | string | `true` | no | | uploaded_bytes_billed_extra_tags | Extra tags for GCP Big Query Scanned Bytes monitor | list | `` | no | | uploaded_bytes_billed_message | Custom message for the Uploaded Bytes Billed monitor | string | `` | no | | uploaded_bytes_billed_silenced | Groups to mute for GCP Big Query Uploaded Bytes Billed monitor. Muted by default. | map | `` | no | | uploaded_bytes_billed_threshold_critical | Uploaded Bytes Billed in Bytes (critical threshold) | string | `1` | no | | uploaded_bytes_billed_threshold_warning | Uploaded Bytes Billed in Bytes (warning threshold) | string | `0` | no | | uploaded_bytes_billed_timeframe | Timeframe for the Uploaded Bytes Billed monitor | string | `last_4h` | no | -| uploaded_bytes_enabled | Whether or not to create the monitor | string | `true` | no | | uploaded_bytes_extra_tags | Extra tags for GCP Big Query Uploaded Bytes monitor | list | `` | no | | uploaded_bytes_message | Custom message for the Uploaded Bytes monitor | string | `` | no | | uploaded_bytes_silenced | Groups to mute for GCP Big Query Uploaded Bytes monitor. Muted by default. | map | `` | no | diff --git a/cloud/gcp/big-query/inputs.tf b/cloud/gcp/big-query/inputs.tf index c1ab176..70ec912 100644 --- a/cloud/gcp/big-query/inputs.tf +++ b/cloud/gcp/big-query/inputs.tf @@ -1,6 +1,7 @@ # # Datadog global variables # + variable "environment" { description = "Architecture environment" type = "string" @@ -28,6 +29,7 @@ variable "delay" { # # Filter variables # + variable "project_id" { type = "string" description = "ID of the GCP Project" @@ -36,11 +38,6 @@ variable "project_id" { # # Concurrent queries # -variable "concurrent_queries_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "concurrent_queries_message" { description = "Custom message for the Concurrent Queries monitor" @@ -81,11 +78,6 @@ variable "concurrent_queries_extra_tags" { # # Execution Time # -variable "execution_time_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "execution_time_message" { description = "Custom message for the Execution Time monitor" @@ -127,11 +119,6 @@ variable "execution_time_extra_tags" { # # Scanned Bytes # -variable "scanned_bytes_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "scanned_bytes_message" { description = "Custom message for the Scanned Bytes monitor" @@ -173,11 +160,6 @@ variable "scanned_bytes_extra_tags" { # # Scanned Bytes Billed # -variable "scanned_bytes_billed_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "scanned_bytes_billed_message" { description = "Custom message for the Scanned Bytes Billed monitor" @@ -219,11 +201,6 @@ variable "scanned_bytes_billed_extra_tags" { # # Available Slots # -variable "available_slots_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "available_slots_message" { description = "Custom message for the Available Slots monitor" @@ -264,11 +241,6 @@ variable "available_slots_extra_tags" { # # Stored Bytes # -variable "stored_bytes_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "stored_bytes_message" { description = "Custom message for the Stored Bytes monitor" @@ -310,11 +282,6 @@ variable "stored_bytes_extra_tags" { # # Table Count # -variable "table_count_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "table_count_message" { description = "Custom message for the Table Count monitor" @@ -356,11 +323,6 @@ variable "table_count_extra_tags" { # # Uploaded Bytes # -variable "uploaded_bytes_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "uploaded_bytes_message" { description = "Custom message for the Uploaded Bytes monitor" @@ -402,11 +364,6 @@ variable "uploaded_bytes_extra_tags" { # # Uploaded Bytes Billed # -variable "uploaded_bytes_billed_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "uploaded_bytes_billed_message" { description = "Custom message for the Uploaded Bytes Billed monitor" diff --git a/cloud/gcp/big-query/monitors-big-query.tf b/cloud/gcp/big-query/monitors-big-query.tf index 4e16a84..a851151 100644 --- a/cloud/gcp/big-query/monitors-big-query.tf +++ b/cloud/gcp/big-query/monitors-big-query.tf @@ -15,8 +15,6 @@ data "template_file" "filter" { # Concurrent queries # resource "datadog_monitor" "concurrent_queries" { - count = "${var.concurrent_queries_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Concurrent Queries {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.concurrent_queries_message, var.message)}" @@ -59,8 +57,6 @@ EOF # Execution Time # resource "datadog_monitor" "execution_time" { - count = "${var.execution_time_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Execution Time {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" message = "${coalesce(var.execution_time_message, var.message)}" @@ -103,8 +99,6 @@ EOF # Scanned Bytes # resource "datadog_monitor" "scanned_bytes" { - count = "${var.scanned_bytes_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Scanned Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}" message = "${coalesce(var.scanned_bytes_message, var.message)}" @@ -147,8 +141,6 @@ EOF # Scanned Bytes Billed # resource "datadog_monitor" "scanned_bytes_billed" { - count = "${var.scanned_bytes_billed_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Scanned Bytes Billed {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}" message = "${coalesce(var.scanned_bytes_billed_message, var.message)}" @@ -191,8 +183,6 @@ EOF # Available Slots # resource "datadog_monitor" "available_slots" { - count = "${var.available_slots_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Available Slots {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.available_slots_message, var.message)}" @@ -235,8 +225,6 @@ EOF # Stored Bytes # resource "datadog_monitor" "stored_bytes" { - count = "${var.stored_bytes_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Stored Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B ({{value}}B){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B ({{value}}B){{/is_warning}}" message = "${coalesce(var.stored_bytes_message, var.message)}" @@ -280,8 +268,6 @@ EOF # Table Count # resource "datadog_monitor" "table_count" { - count = "${var.table_count_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Table Count {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.table_count_message, var.message)}" @@ -325,8 +311,6 @@ EOF # Uploaded Bytes # resource "datadog_monitor" "uploaded_bytes" { - count = "${var.uploaded_bytes_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Uploaded Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}" message = "${coalesce(var.uploaded_bytes_message, var.message)}" @@ -370,8 +354,6 @@ EOF # Uploaded Bytes Billed # resource "datadog_monitor" "uploaded_bytes_billed" { - count = "${var.uploaded_bytes_billed_enabled == "true" ? 1 : 0}" - name = "[${var.environment}] GCP Big Query Uploaded Bytes Billed {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}" message = "${coalesce(var.uploaded_bytes_billed_message, var.message)}"