This repository was archived by the owner on Jun 29, 2022. It is now read-only.
This repository was archived by the owner on Jun 29, 2022. It is now read-only.
Unit test formatting of generated Terraform templates #1331
Open
Description
Current situation
When editing Terraform templates, generated output might be malformed. We already have unit tests for testing that Go templates are evaluated properly.
Impact
Modifying templates takes more time.
Ideal future situation
Templates syntax is tested by unit tests to ensure proper syntax and formatting.
Implementation options
I've tried by importing Terraform Go packages like explained here: #1305 (comment), but it's not easy to import them into Lokomotive, so I suggest we add format function to pkg/terraform
, then do templates syntax testing with e2e
build tag, so we can use terraform
binary.