github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/anytrue.mdx (about)

     1  ---
     2  page_title: anytrue - Functions - Configuration Language
     3  description: |-
     4    The anytrue function determines whether any element of a collection
     5    is true or "true". If the collection is empty, it returns false.
     6  ---
     7  
     8  # `anytrue` Function
     9  
    10  -> **Note:** This function is available in Terraform 0.14 and later.
    11  
    12  `anytrue` returns `true` if any element in a given collection is `true`
    13  or `"true"`. It also returns `false` if the collection is empty.
    14  
    15  ```hcl
    16  anytrue(list)
    17  ```
    18  
    19  ## Examples
    20  
    21  ```command
    22  > anytrue(["true"])
    23  true
    24  > anytrue([true])
    25  true
    26  > anytrue([true, false])
    27  true
    28  > anytrue([])
    29  false
    30  ```