Allow Module Sharing within the same Spacelift Account
Currently, we use spaces extensively to organize our stacks and modules. Unforuntaely, that means that if we want to use a module in our Space hierarchy, it needs to sit at the root. Given that you can share modules with other Spacelift accounts, I think there should be an option to share a module with the account that it lives in (or share to a higher-level space), to allow modules to live at a lower Space in the hierarchy.
- Workaround
- Problem
Log in to comment and vote
Comments5
Natalia Gazda
May 27, 2025
Indigo Stew
May 28, 2025
yes this would satisfy the use case.
Indigo Stew
Jun 16, 2025
@Natalia Gazda what is the ETA of this feature?
Natalia Gazda
Aug 1, 2025
We just started, and it should take us around a month :)
Silver Pretzel
Jun 23, 2025
I think that explicit sharing would only work if there is a reasonable way to to automate it in terraform - something like an attach resource (spacelift_attach_module_to_space) - the problem with that is that every module needs to know how to attach to every team space
I think that as long as there is a way to specify the attachment using module_id and space_id, I could make it work with depends_on between the team module module and the team space module, setting module_id on an ouput and them adding the spacelift_attach_module_to_space when I create the spaces.
This works because at least for now, the modules and spaces are created in the same tfstate (which may not be the case forever). If we wanted to move things into separate stacks, we would need a data resource that can retrieve the module id or every module
Why not just have a setting to mark modules as consumable by all spaces?