mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
6ed47c7241
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." } } ``` |
||
---|---|---|
.. | ||
testdata | ||
cidr_test.go | ||
cidr.go | ||
collection_test.go | ||
collection.go | ||
conversion_test.go | ||
conversion.go | ||
crypto_test.go | ||
crypto.go | ||
datetime_test.go | ||
datetime.go | ||
encoding_test.go | ||
encoding.go | ||
filesystem_test.go | ||
filesystem.go | ||
number_test.go | ||
number.go | ||
string_test.go | ||
string.go |