4 ms·
> There's nothing in Terraform that couldn't just be YAML with some semantics (like Ansible which I find much more approachable) One secret of Terraform is tha
by thraxil 6y ago
> There's nothing in Terraform that couldn't just be YAML with some semantics (like Ansible which I find much more approachable)
One secret of Terraform is that you can define resources with JSON instead of HCL (https://www.terraform.io/docs/configuration/syntax-json.html https://www.terraform.io/docs/configuration/syntax-json.html). The catch is that all the interpolation and iteration stuff is implemented in HCL, so if you use JSON, you probably want something else to do that. But, eg, Jsonnet works beautifully for that kind of thing: https://github.com/google/jsonnet/blob/master/examples/terraform/aws-two-tier.jsonnet https://github.com/google/jsonnet/blob/master/examples/terra...