From b6b2054e777df6c360b30728904a043f18c68060 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Fri, 20 Dec 2024 15:07:47 +0100 Subject: [PATCH] fixremove deprecated metric feature flag --- modules/multi-runner/variables.deprecated.tf | 23 -------------------- modules/termination-watcher/variables.tf | 6 ----- variables.tf | 7 +----- 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 modules/multi-runner/variables.deprecated.tf diff --git a/modules/multi-runner/variables.deprecated.tf b/modules/multi-runner/variables.deprecated.tf deleted file mode 100644 index 006af01810..0000000000 --- a/modules/multi-runner/variables.deprecated.tf +++ /dev/null @@ -1,23 +0,0 @@ -# tflint-ignore: terraform_unused_declarations -variable "enable_metrics_control_plane" { - description = "(Experimental) Enable or disable the metrics for the module. Feature can change or renamed without a major release." - type = bool - default = false - - validation { - condition = var.enable_metrics_control_plane == false - error_message = "The feature `enable_metrics_control_plane` is deprecated and will be removed in a future release. Please use the `metrics` variable instead." - } -} - -# tflint-ignore: terraform_unused_declarations -variable "metrics_namespace" { - description = "The namespace for the metrics created by the module. Merics will only be created if explicit enabled." - type = string - default = null - - validation { - condition = var.metrics_namespace == null - error_message = "The variable `metrics_namespace` is deprecated, use `metrics.namespace` instead." - } -} diff --git a/modules/termination-watcher/variables.tf b/modules/termination-watcher/variables.tf index 5c5bddddc1..0a3d6537fa 100644 --- a/modules/termination-watcher/variables.tf +++ b/modules/termination-watcher/variables.tf @@ -30,7 +30,6 @@ variable "config" { type = object({ aws_partition = optional(string, null) architecture = optional(string, null) - enable_metric = optional(string, null) environment_variables = optional(map(string), {}) features = optional(object({ enable_spot_termination_handler = optional(bool, true) @@ -72,9 +71,4 @@ variable "config" { }), {}) zip = optional(string, null) }) - - validation { - condition = var.config.enable_metric == null - error_message = "enable_metric is deprecated, use metrics.enable instead." - } } diff --git a/variables.tf b/variables.tf index f6bf95f5a3..2683788ddb 100644 --- a/variables.tf +++ b/variables.tf @@ -888,8 +888,7 @@ variable "instance_termination_watcher" { EOF type = object({ - enable = optional(bool, false) - enable_metric = optional(string, null) # deprectaed + enable = optional(bool, false) features = optional(object({ enable_spot_termination_handler = optional(bool, true) enable_spot_termination_notification_watcher = optional(bool, true) @@ -902,10 +901,6 @@ variable "instance_termination_watcher" { }) default = {} - validation { - condition = var.instance_termination_watcher.enable_metric == null - error_message = "The variable `instance_termination_watcher.enable_metric` is deprecated, use `metrics` instead." - } } variable "runners_ebs_optimized" {