validation block iteratively This validation block works for a single input variable.

variable "mytestname" {

     validation {
        condition = length(regexall("test$", var.mytestname)) &gt; 0
        error_message = "Should end in test"
     }
}


I need it to work inside a for_each - or have some workaround to accomplish this. 
The issue is that there is a restriction on the condition statement - the condition HAS to take in the input variable itself (i.e. - it cannot accept an each.value)

variable "mytestnames" {

listnames = split(",",var.mytestnames)     

for_each = var.listnames

     validation {
        condition = length(regexall("test$", each.value)) &gt; 0
        error_message = "Should end in test"
      }
}


The above snippet does not work. I need a way I can iterate over a list of values and validate each of them using the validation block. There must be a way to do this without a validation block...??
It sounds like your goal is to have a variable that takes a list and to validate each of the elements of that list. If that's true, then the approach would be to write an expression that returns true only if all of the elements are valid. For example:

variable "names" {
  type = list(string)

  validation {
    condition     = can([for v in var.names : regex("test$", v)])
    error_message = "All names must end with \"test\"."
  }
}


The above relies on the fact that regex will fail if the given string doesn't match the given pattern, and that the for expression will fail if the given expression fails for any v. can then captures the failure and returns false, making the validation fail.