torus-cli icon indicating copy to clipboard operation
torus-cli copied to clipboard

Tying directories directly to an environment or service

Open ianlivingstone opened this issue 6 years ago • 1 comments

Today, with torus link you can tie a directory and it's children to a specific organization and project. However, you cannot a directory directly to a service or environment.

In some cases (such as with terraform controlled infrastructure), it'd be nice to be able to tie a directory directly to a specific environment and/or service.

Off the top of my head I can think of a few different ways we could approach this problem:

  • Enabling recursive .torusrc files, where we'd look up/find the .torusrc closest and then layer the settings from subsequent .torusrc files in subsequent directories until we reach $HOME/.torusrc.
  • Enabling a user to specify a service or environment via .torus.json either as an option to torus link or as a secondary field.

ianlivingstone avatar Nov 07 '17 13:11 ianlivingstone

Another thought is to rename torus link to torus init, as you are really initializing a torus project and tying that project to a specific directory and set of sub directories.

At the same time, we could switch .torus.json to be a .torusrc file, removing a concept (difference between .torusrc and .torus.json) while supporting recursive .torusrc files with proper inheritance.

ianlivingstone avatar Nov 09 '17 22:11 ianlivingstone