diff --git a/cloud/gcp/cloud-sql/instance/README.md b/cloud/gcp/cloud-sql/instance/README.md index d5829c1..7d3b0b7 100644 --- a/cloud/gcp/cloud-sql/instance/README.md +++ b/cloud/gcp/cloud-sql/instance/README.md @@ -27,7 +27,6 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| cpu_utilization_enabled | Whether or not to create the monitor | string | `true` | no | | cpu_utilization_extra_tags | Extra tags for GCP Cloud SQL CPU Utilization monitor | list | `` | no | | cpu_utilization_message | Custom message for the CPU Utilization monitor | string | `` | no | | cpu_utilization_silenced | Groups to mute for GCP Cloud SQL CPU Utilization monitor | map | `` | no | @@ -35,11 +34,9 @@ Creates DataDog monitors with the following checks: | cpu_utilization_threshold_warning | CPU Utilization in percentage (warning threshold) | string | `80` | no | | cpu_utilization_timeframe | Timeframe for the CPU Utilization monitor | string | `last_15m` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | -| disk_utilization_enabled | Whether or not to create the monitor | string | `true` | no | | disk_utilization_extra_tags | Extra tags for GCP Cloud SQL CPU Utilization monitor | list | `` | no | | disk_utilization_forecast_algorithm | Algorithm for the Disk Utilization Forecast monitor | string | `linear` | no | | disk_utilization_forecast_deviations | Deviations for the Disk Utilization Forecast monitor | string | `1` | no | -| disk_utilization_forecast_enabled | Whether or not to create the monitor | string | `true` | no | | disk_utilization_forecast_extra_tags | Extra tags for GCP Cloud SQL Disk Utilization Forecast monitor | list | `` | no | | disk_utilization_forecast_interval | Interval for the Disk Utilization Forecast monitor | string | `60m` | no | | disk_utilization_forecast_linear_history | History for the Disk Utilization Forecast monitor | string | `3d` | no | @@ -56,7 +53,6 @@ Creates DataDog monitors with the following checks: | disk_utilization_threshold_warning | Disk Utilization in percentage (warning threshold) | string | `80` | no | | disk_utilization_timeframe | Timeframe for the Disk Utilization monitor | string | `last_5m` | no | | environment | Architecture environment | string | - | yes | -| failover_unavailable_enabled | Whether or not to create the monitor | string | `true` | no | | failover_unavailable_extra_tags | Extra tags for GCP Cloud SQL Failover Unavailable monitor | list | `` | no | | failover_unavailable_message | Custom message for the Failover Unavailable monitor | string | `` | no | | failover_unavailable_silenced | Groups to mute for GCP Cloud SQL Failover Unavailable monitor | map | `` | no | @@ -64,11 +60,9 @@ Creates DataDog monitors with the following checks: | failover_unavailable_timeframe | Timeframe for the Failover Unavailable monitor | string | `last_5m` | no | | 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 | -| memory_utilization_enabled | Whether or not to create the monitor | string | `true` | no | | memory_utilization_extra_tags | Extra tags for GCP Cloud SQL Memory Utilization monitor | list | `` | no | | memory_utilization_forecast_algorithm | Algorithm for the Memory Utilization Forecast monitor | string | `linear` | no | | memory_utilization_forecast_deviations | Deviations for the Memory Utilization Forecast monitor | string | `1` | no | -| memory_utilization_forecast_enabled | Whether or not to create the monitor | string | `true` | no | | memory_utilization_forecast_extra_tags | Extra tags for GCP Cloud SQL Memory Utilization Forecast monitor | list | `` | no | | memory_utilization_forecast_interval | Interval for the Memory Utilization Forecast monitor | string | `30m` | no | | memory_utilization_forecast_linear_history | History for the Memory Utilization Forecast monitor | string | `12h` | no | diff --git a/cloud/gcp/cloud-sql/instance/inputs.tf b/cloud/gcp/cloud-sql/instance/inputs.tf index ca4761c..c83fcc9 100644 --- a/cloud/gcp/cloud-sql/instance/inputs.tf +++ b/cloud/gcp/cloud-sql/instance/inputs.tf @@ -36,11 +36,6 @@ variable "project_id" { # # CPU # -variable "cpu_utilization_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "cpu_utilization_message" { description = "Custom message for the CPU Utilization monitor" @@ -81,11 +76,6 @@ variable "cpu_utilization_extra_tags" { # # DISK Utilization # -variable "disk_utilization_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "disk_utilization_message" { description = "Custom message for the Disk Utilization monitor" @@ -126,11 +116,6 @@ variable "disk_utilization_extra_tags" { # # DISK Utilization Forecast # -variable "disk_utilization_forecast_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "disk_utilization_forecast_message" { description = "Custom message for the Disk Utilization Forecast monitor" @@ -207,11 +192,6 @@ variable "disk_utilization_forecast_extra_tags" { # # Memory Utilization # -variable "memory_utilization_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "memory_utilization_message" { description = "Custom message for the Memory Utilization monitor" @@ -248,11 +228,6 @@ variable "memory_utilization_extra_tags" { # # Memory Utilization Forecast # -variable "memory_utilization_forecast_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "memory_utilization_forecast_message" { description = "Custom message for the Memory Utilization Forecast monitor" @@ -325,11 +300,6 @@ variable "memory_utilization_forecast_extra_tags" { # # Failover Unavailable # -variable "failover_unavailable_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "failover_unavailable_message" { description = "Custom message for the Failover Unavailable monitor" diff --git a/cloud/gcp/cloud-sql/instance/monitors-cloud-sql-instance.tf b/cloud/gcp/cloud-sql/instance/monitors-cloud-sql-instance.tf index d43ec11..a961f89 100644 --- a/cloud/gcp/cloud-sql/instance/monitors-cloud-sql-instance.tf +++ b/cloud/gcp/cloud-sql/instance/monitors-cloud-sql-instance.tf @@ -15,8 +15,6 @@ data "template_file" "filter" { # CPU Utilization # resource "datadog_monitor" "cpu_utilization" { - count = "${var.cpu_utilization_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL CPU Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_utilization_message, var.message)}" @@ -62,8 +60,6 @@ EOF # Disk Utilization # resource "datadog_monitor" "disk_utilization" { - count = "${var.disk_utilization_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL Disk Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.disk_utilization_message, var.message)}" @@ -109,8 +105,6 @@ EOF # Disk Utilization Forecast # resource "datadog_monitor" "disk_utilization_forecast" { - count = "${var.disk_utilization_forecast_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL Disk Utilization could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future" message = "${coalesce(var.disk_utilization_forecast_message, var.message)}" @@ -161,8 +155,6 @@ EOF # Memory Utilization # resource "datadog_monitor" "memory_utilization" { - count = "${var.memory_utilization_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL Memory Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_utilization_message, var.message)}" @@ -208,8 +200,6 @@ EOF # Memory Utilization Forecast # resource "datadog_monitor" "memory_utilization_forecast" { - count = "${var.memory_utilization_forecast_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL Memory Utilization could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future" message = "${coalesce(var.memory_utilization_forecast_message, var.message)}" @@ -260,8 +250,6 @@ EOF # Failover Unavailable # resource "datadog_monitor" "failover_unavailable" { - count = "${var.failover_unavailable_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL Failover Unavailable" message = "${coalesce(var.failover_unavailable_message, var.message)}" diff --git a/cloud/gcp/cloud-sql/mysql/README.md b/cloud/gcp/cloud-sql/mysql/README.md index 1e3b7ce..7066482 100644 --- a/cloud/gcp/cloud-sql/mysql/README.md +++ b/cloud/gcp/cloud-sql/mysql/README.md @@ -35,7 +35,6 @@ Creates DataDog monitors with the following checks: | queries_changing_anomaly_detection_algorithm | Anomaly Detection Algorithm used | string | `agile` | no | | queries_changing_anomaly_deviations | Deviations to detect the anomaly | string | `4` | no | | queries_changing_anomaly_direction | Direction of the anomaly. It can be both, below or above. | string | `both` | no | -| queries_changing_anomaly_enabled | Whether or not to create the monitor | string | `true` | no | | queries_changing_anomaly_extra_tags | Extra tags for GCP Cloud SQL Queries Changing monitor | list | `` | no | | queries_changing_anomaly_interval | Interval. | string | `20` | no | | queries_changing_anomaly_message | Custom message for the Queries Changing monitor | string | `` | no | @@ -50,7 +49,6 @@ Creates DataDog monitors with the following checks: | questions_changing_anomaly_detection_algorithm | Anomaly Detection Algorithm used | string | `agile` | no | | questions_changing_anomaly_deviations | Deviations to detect the anomaly | string | `4` | no | | questions_changing_anomaly_direction | Direction of the anomaly. It can be both, below or above. | string | `both` | no | -| questions_changing_anomaly_enabled | Whether or not to create the monitor | string | `true` | no | | questions_changing_anomaly_extra_tags | Extra tags for GCP Cloud SQL Questions Changing monitor | list | `` | no | | questions_changing_anomaly_interval | Interval. | string | `20` | no | | questions_changing_anomaly_message | Custom message for the Questions Changing monitor | string | `` | no | @@ -60,7 +58,6 @@ Creates DataDog monitors with the following checks: | questions_changing_anomaly_threshold_critical_recovery | Questions Changing critical recovery threshold | string | `0.99` | no | | questions_changing_anomaly_threshold_warning | Questions Changing warning threshold | string | `0.5` | no | | questions_changing_anomaly_timeframe | Timeframe for the Questions Changing monitor | string | `last_1h` | no | -| replication_lag_enabled | Whether or not to create the monitor | string | `true` | no | | replication_lag_extra_tags | Extra tags for GCP Cloud SQL SQL Replication monitor | list | `` | no | | replication_lag_message | Custom message for the Replication Lag monitor | string | `` | no | | replication_lag_silenced | Groups to mute for GCP Cloud SQL Replication Lag monitor | map | `` | no | diff --git a/cloud/gcp/cloud-sql/mysql/inputs.tf b/cloud/gcp/cloud-sql/mysql/inputs.tf index 997f66f..6872b23 100644 --- a/cloud/gcp/cloud-sql/mysql/inputs.tf +++ b/cloud/gcp/cloud-sql/mysql/inputs.tf @@ -36,11 +36,6 @@ variable "project_id" { # # Replication Lag # -variable "replication_lag_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "replication_lag_message" { description = "Custom message for the Replication Lag monitor" @@ -81,11 +76,6 @@ variable "replication_lag_extra_tags" { # # Queries Changing Abnormally # -variable "queries_changing_anomaly_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "queries_changing_anomaly_message" { description = "Custom message for the Queries Changing monitor" @@ -174,11 +164,6 @@ variable "queries_changing_anomaly_extra_tags" { # # Questions Changing # -variable "questions_changing_anomaly_enabled" { - description = "Whether or not to create the monitor" - type = "string" - default = "true" -} variable "questions_changing_anomaly_message" { description = "Custom message for the Questions Changing monitor" diff --git a/cloud/gcp/cloud-sql/mysql/monitors-cloudsql-mysql.tf b/cloud/gcp/cloud-sql/mysql/monitors-cloudsql-mysql.tf index 1d90cad..2c360cf 100644 --- a/cloud/gcp/cloud-sql/mysql/monitors-cloudsql-mysql.tf +++ b/cloud/gcp/cloud-sql/mysql/monitors-cloudsql-mysql.tf @@ -15,8 +15,6 @@ data "template_file" "filter" { # Replication Lag # resource "datadog_monitor" "replication_lag" { - count = "${var.replication_lag_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL MySQL Replication Lag {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" message = "${coalesce(var.replication_lag_message, var.message)}" @@ -63,8 +61,6 @@ EOF # Queries Anomaly # resource "datadog_monitor" "queries_changing_anomaly" { - count = "${var.queries_changing_anomaly_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL MySQL Queries Count changed abnormally" message = "${coalesce(var.queries_changing_anomaly_message, var.message)}" @@ -119,8 +115,6 @@ EOF # Questions Anomaly # resource "datadog_monitor" "questions_changing_anomaly" { - count = "${var.questions_changing_anomaly_enabled == "true" ? 1 : 0 }" - name = "[${var.environment}] Cloud SQL MySQL Questions Count changed abnormally" message = "${coalesce(var.questions_changing_anomaly_message, var.message)}"