Postcondition for catching items already present in a list

hello @apparentlymart ,

could you please help with this,
I need to update a resource with a list of but I must to confirme, each value of this list doesn’t already existe in the ressource.

I found a way to test, each element of the liste, but can’t find how to loop thu a list a test all elements

#for one element
postcondition {

      condition =   !contains(each.value.list, "element_into_list")
      error_message = " ${self.name} contains already this domain"


}
# for list
postcondition {

      condition =   !contains(each.value.list, var.my_list)
      error_message = " ${self.name} contains already this domain"


}