what
- Update Terraform workspace calculation for legacy Spacelift stack processor
why
LegacyTransformStackConfigToSpaceliftStacks
function in the Spacelift stack processor was used to transform the infrastructure stacks to Spacelift stacks using legacy code (and old versions ofterraform-yaml-stack-config
module) that does not take into accountatmos.yaml
CLI config - this is very old code that does not know anything aboutatmos
CLI config and it was maintained to support the old versions ofterraform-yaml-stack-config
module (prior to0.21.0
)TransformStackConfigToSpaceliftStacks
function is used to transform the infrastructure stacks to Spacelift stacks and it has been maintained and improved (especially regarding Terraform workspace calculations)LegacyTransformStackConfigToSpaceliftStacks
function had very old algorithm to calculate Terraform workspace for Spacelift stacks, causing some issues with Terraform workspace being different fromatmos
workspace- This PR eliminates the old
LegacyTransformStackConfigToSpaceliftStacks
function and always uses theTransformStackConfigToSpaceliftStacks
function, so Terraform workspace (and other features) should be the same when using the old and new versions ofterraform-yaml-stack-config
module