seqeralabs / cx-field-tools-installer

Unofficial Terraform solution to help clients install Seqera Platform
Apache License 2.0
3 stars 1 forks source link

Assess whether Python solution should be introduced for file templating #45

Open gwright99 opened 6 months ago

gwright99 commented 6 months ago

As per documentation comments made in https://github.com/seqeralabs/cx-field-tools-installer/pull/44, the Terraform templatefile & Ansible solution is starting to show signs of strain as more business logic is showing up in this solution.

We can still work around the problems for the time being but it may be worth evaluating whether we should move the responsibility of template file generation to a proper Python script (a la .githooks configuration checker) to gain access to a real programming language which could simplify the implementation. TBD.

gwright99 commented 5 months ago

The Terraform external provider may fit the bill.

This was just used to externalize some nested if statements to a Python script which, IMO, was much more suitable to the task than the equivalent complicated multi-line nested set of ternary checks in a local variable instead.