Hi,
I am trying to create a dynamic block based on whether an integer is greater than another number. This is to control the creation of ebs ephemeral_storage in the aws_ecs_task_definition
resource.
dynamic "ephemeral_storage" {
for_each = var.volume_size > 20 ? [1] : []
content {
size_in_gib = var.volume_size
}
}
variable "volume_size"{
type = number
default = 25
}
However, when running the plan I see no changes to be made. But in my mind the variable is greater than 20 so should it not create the block?