spacectl icon indicating copy to clipboard operation
spacectl copied to clipboard

[Feature request] Add ability to configure stacks (tracking branch)

Open jandroav opened this issue 1 year ago • 0 comments

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:

  1. PR opened from a feature branch to main
  2. A GitHub action runs a spacectl stack local-preview. If everything is ok it deploys resources to a staging AWS account
  3. PR merged to main
  4. 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:

  1. A new subcommand like: spacectl stack configure --id STACK_ID --branch staging
  2. A new option like: spacectl stack deploy --id STACK_ID --branch

I hope it all makes sense.

jandroav avatar Jan 09 '24 11:01 jandroav