I think the .root symlink functionality can be replaced by using Direnv in a project to create an absolute symlink in the top directory. Jinjaform should copy it into the working directory and it will continue to point to wherever it was pointing to. Direnv should replace the symlink every time so that it works even if the project gets moved.
For this to work, Jinjaform will need to support symlinks. It currently ignores them when creating the workspace.
Making this change will make the projects neater (source = "modules/my-module" vs source = ".root/modules/my-module") and allow projects to name the symlink whatever they want. Fewer features in Jinjaform is good too, as one of the goals is to make it simple and as transparent as possible.
I think the
.root
symlink functionality can be replaced by using Direnv in a project to create an absolute symlink in the top directory. Jinjaform should copy it into the working directory and it will continue to point to wherever it was pointing to. Direnv should replace the symlink every time so that it works even if the project gets moved.Project structure:
Contents of
.envrc
:Contents of
.gitignore
:Contents of
main.tf
:For this to work, Jinjaform will need to support symlinks. It currently ignores them when creating the workspace.
Making this change will make the projects neater (
source = "modules/my-module"
vssource = ".root/modules/my-module"
) and allow projects to name the symlink whatever they want. Fewer features in Jinjaform is good too, as one of the goals is to make it simple and as transparent as possible.This pattern should be added to the example too.