spacectl
spacectl copied to clipboard
[Feature request] Add ability to configure stacks (tracking branch)
I would like to have a spacectl stack configure --id STACK_ID --branch staging
command.
There can be ci/cd workflows where it is needed to deploy resources from a branch different than the stack configured one.
spacectl stack deploy
always deploys what is pushed to the tracking branch. I can not deploy resources from another branch without manually changing the stack tracking branch. Imagine the following workflow:
- PR opened from a
feature
branch tomain
- A GitHub action runs a
spacectl stack local-preview
. If everything is ok it deploys resources to a staging AWS account - PR merged to
main
- A GitHub action runs
spacectl stack deploy
so resources are deployed to a prod AWS account
Step 2 is not currently possible because spacectl stack deploy
can not deploy stuff from the current feature branch.
I see 2 options:
- A new subcommand like:
spacectl stack configure --id STACK_ID --branch staging
- A new option like:
spacectl stack deploy --id STACK_ID --branch
I hope it all makes sense.