Hello all,
I can’t seem to find the correct way to do this in TF. But i’m trying to test if an input value is between 2 numbers. This is what I’ve tried (and failed), but can’t really figure out if there’s a test option for number ranges.
variable "kms_data_key_reuse_period_seconds" {
description = "The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes)."
type = number
default = 60
validation {
condition = can(regex(var.kms_data_key_reuse_period_seconds, range(60, 86400)))
error_message = "Invalid Range: 60 - 86400."
}
}