boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
678 stars 46 forks source link

Add support for multiple directory levels within stacks #214

Open fsuste opened 2 years ago

fsuste commented 2 years ago

Summary

Add support for multiple directory levels within stacks

Motivation

At some point, having a lot of stacks becomes cumbersome. And some of the stacks are describing similar problems. Just by grouping them in a directory would solve a lot of headaches. Is this possible by tweaking the load paths?

Reference-level explanation

|--app
    |--modules
    |--stacks
        |--dirA
            |--stackA1
            |--stackA2
        |--dirB
            |--stackB1

etc.

Unresolved Questions

It may already be possible to tweak the load path, but I haven't been able to find the documentation on this.

mgzenitech commented 2 years ago

Is multiple levels of directories supported for modules now? Because if not then same thing should be done for modules too.

vtzan commented 2 years ago

Totally agree it will help alot organising stack folders with many files. Thanks lot

pocockn commented 2 years ago

+1 for this.

arielr-lt commented 2 years ago

+1 for this please @tongueroo

alisson276 commented 1 year ago

+1 for this. We divide our repo per team and some teams have access to their subfolders only. It would turn a lot easier to configure the permissions on that folders for us.

I can run something like terraspace new stack infrastructure/backup/databases and it creates all the folders. But if I use terraspace fmt it doesn't do in cascade, it does only in the top-level folder.