dubiety / terraform-aws-elasticsearch-cloudwatch-sns-alarms

terraform module that configures important alarms for AWS elasticsearch and send them to SNS topic
Apache License 2.0
30 stars 45 forks source link

Bugfix: Fixing variable formatting issue, flooring all variables #20

Closed AndrewFarley closed 2 years ago

AndrewFarley commented 2 years ago

Issue Overview

In the last PR, I added more variables into the alarm description, which will help someone identify quicker what the properties/conditions of that alarm. However, some variables in Terraform can decimalize and looks insane (see below). To fix I just floor()-ed every variable.

# module.elasticsearch-alarms.aws_cloudwatch_metric_alarm.free_storage_space_too_low[0] will be updated in-place
~ resource "aws_cloudwatch_metric_alarm" "free_storage_space_too_low" {
    ~ alarm_description         = "Minimum elasticsearch free storage space on a single node over last 10 minute(s) is too low" -> "Minimum free disk space on a single node under 7680.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006MB for the last 10 minute(s)"
      id                        = "master-es-search-indexes-ElasticSearch-FreeStorageSpaceTooLow"
      tags                      = {
          "Client"       = "cli"
          "Id"           = "cli-master-es-search-indexes"
          "StackVersion" = "1.0.0"
          "Stage"        = "master"
          "Terraform"    = "true"
      }
      # (17 unchanged attributes hidden)
  }