terraform/lang
Arthur Burkart 6ed47c7241
lang/funcs: Add "alltrue" function (#25656)
This commit adds an `alltrue` function to Terraform configuration. A
reason we might want this function is because it will enable more
powerful custom variable validations. For example:

```hcl
variable "amis" {
  type = list(object({
    id = string
  }))

  validation {
    condition = (alltrue([
      for a in var.amis : length(a.id) > 4 && substr(a.id, 0, 4) == "ami-"
    ]))
    error_message = "The ID of at least one AMI was invalid."
  }
}
```
2020-09-22 09:06:42 -04:00
..
blocktoattr vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
funcs lang/funcs: Add "alltrue" function (#25656) 2020-09-22 09:06:42 -04:00
testdata/functions-test lang/funcs: Update fileset() function to include path as separate first argument, automatically trim the path argument from results, and ensure results are always canonical with forward slash path separators 2019-08-30 20:19:44 -04:00
data.go remove GetModuleInstanceOutput 2020-04-14 14:49:10 -04:00
data_test.go eval Data needs to operate on whole modules 2020-04-12 10:50:31 -04:00
doc.go
eval.go remove GetModuleInstanceOutput 2020-04-14 14:49:10 -04:00
eval_test.go eval Data needs to operate on whole modules 2020-04-12 10:50:31 -04:00
functions.go lang/funcs: Add "alltrue" function (#25656) 2020-09-22 09:06:42 -04:00
functions_test.go lang/funcs: Add "alltrue" function (#25656) 2020-09-22 09:06:42 -04:00
references.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
scope.go terraform: ugly huge change to weave in new HCL2-oriented types 2018-10-16 18:46:46 -07:00