|
|
|
|
|
by Spivak
361 days ago
|
|
This is what you get if you want a declarative syntax. HCL doesn't have any concept of a for loop, and can't have any concept of a for loop— it's a data serialization format. Terraform can be transformed to and from JSON losslessly. The looping feature is implemented in Terraform. Ansible's with_items: and loop: do the exact same thing with YAML. |
|
HCL's looping and conditionals are a mess but they're wonderful in comparison to its facilities for defining and calling functions.