Runtime config should support appending hooks
Currently, the runtime config file ~/.spacelift/config.yml overrides specified hooks
instead of appending, like contexts.
We use hooks baked into stacks for the following:
azure SP provider credential env vars
Vault provider credential env vars
github token for read (for module source access)
These are implement via before_init hooks, this means that if any of our consumers specify before_init in runtime config, it breaks the integration with github , vault and azure.
- Workaround
- Problem
Log in to comment and vote
Comments3
Natalia Gazda
Jul 30, 2025
Hey @Dan Bode , thanks for submitting that!
I had two quick questions first:
What is the end goal:
To be able to append hooks?
To NOT be able to override hooks?
Silver Pretzel
Jul 30, 2025
I want runtime config to NOT remove existing hooks, but instead append hooks to stacks based on some well defined precedence.
I would like it instead to be included in this:
https://docs.spacelift.io/concepts/configuration/context#a-note-on-priority
It would be useful to call out in that section that runtime hooks do not follow any priority and instead remove existing hooks.
Natalia Gazda
Aug 1, 2025
Alright thanks for the answer. I checked with our engineering team, and that would be a substantial effort from our side, and there’s also an issue of the backwards compatibility. I’ll leave it in Gathering votes for now, to see how much traction it gets from other customers, and will revisit it later. :)