Update spacelift
component. Add settings.spacelift.space_name_pattern
attribute
#980
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
spacelift
componentsettings.spacelift.space_name_pattern
attributewhy
We had
settings.spacelift.space_name
attribute to specify a Spacelift stack for a component. It works for the cases where it can be placed into some default Atmos manifest for the Org, tenant, region or stage. But if we have multiple Organizations with many tenants, and we deploy the same components into them, and we want to add a specific component into a dedicated Spacelift space, the entire configuration becomes not DRY (we need to addsettings.spacelift.space_name
into each top-level stack in each Org/tenant/account for ALL components, which would be hundreds or thousands of lines of non-DRY code for some infras).Using
settings.spacelift.space_name_pattern
attribute will allow adding thespace_name_pattern
attribute in the components' catalogs using the context tokens. For exampleThe above configuration will allow placing the
vpc
component into different Spacelift spaces depending on the context tokens.Another example: