aanderse / teraflops

a terraform ops tool which is sure to be a flop
MIT License
44 stars 2 forks source link

support unwrapped TF #17

Open KiaraGrouwstra opened 1 month ago

KiaraGrouwstra commented 1 month ago

hi there,

currently one way teraflops sets itself apart from competitor terranix is it 'exposes terraform directly to you through nix', reducing maintenance burden while still exposing the full functionality of terraform.

at the same time, teraflops currently wraps various terraform commands, whereas terranix facilitates converting nix to terraform json once, then using the unwrapped TF cli.

whereas teraflops' tf subcommand now offers a partial escape hatch, it may be nice for users to not depend on that wrapper either, instead being able to use the TF cli directly. teraflops currently makes this harder by wiping generated json at the end of its cli commands.

one thing i tried to cope with this now is having it delay such removal to retain the main.tf.json, which i'd then combine with a no-op command such as teraflops -f $PWD tf version such as to get the json wanted by the TF cli without necessarily tagging on other commands.

it'd be nice however to see teraflops formally offer a sub-command that'd just do the TF nix-to-json conversion without removing the json after. i'd be curious to see your considerations on that.

aanderse commented 1 month ago

definitely a great idea! the file is already cashed under .terraform/teraflops.tf.json and sometimes i cp that and use it... an official subcommand is awesome

i will put that together shortly

thanks!