Closed olekukonko closed 5 years ago
Hi @olekukonko! Thanks for opening this issue.
HCL intentionally does not have complicated repetition features itself because its information model needs to be relatively simple in order to support the static analysis operations that applications like Terraform need to perform. There won't be any features like this at the HCL level, because that is too general a layer to solve this problem while maintaining the interface that applications depend on.
Instead, please start a discussion about this in the Terraform repository about repetitive provider configurations in particular. If there will be any changes made to the language to reduce this repetition then they will be at the Terraform layer, not at the HCL layer.
This is a duplicate of the issue created https://github.com/hashicorp/hcl/issues/274
I have a configuration file that is over
900
lines and realised its all duplication.Instead of writing
It would be nice to be able to write it as follows
Another possibility would be the ability to set variables using
$
Rational
Configuration sometimes contain duplicate values, Been able to concatenate values or set variables makes
HCL
a much more powerful configuration language.