Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to create a new stack with change sets #663

Closed
kirkhansen opened this issue Mar 22, 2019 · 8 comments
Closed

Add ability to create a new stack with change sets #663

kirkhansen opened this issue Mar 22, 2019 · 8 comments

Comments

@kirkhansen
Copy link

I would like to be able to use change sets on new stacks as well as existing stacks.

AWS/boto supports creating a new stack with change sets using the ChangeSetType keyword see here for details. To the untrained eye, it appears that updating the cli create and update to pass an argument of change_set_type to the create_change_set function, and updating that function to accept the new argument may get me the functionality I'm after. I'm up for a PR if this makes sense to implement.

Outputs may be a bit tricky to deal with, but I haven't gotten that far down the path yet.

It looks like there was an attempt to address this with #198 , but that appears to have been closed, and inactive for awhile (thus the new issue).

@m1keil
Copy link
Contributor

m1keil commented Apr 22, 2019

That's a good catch. I just started using change-sets myself and haven't realized that my workflow will break anytime I add a new environment to my configs in CI/CD.

Here's the error:

$ sceptre create -y dummy test
/Users/msverdlik/.virtualenvs/sceptre/lib/python3.7/site-packages/yaml/constructor.py:126: 
An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack [test-dummy] does not exist

@ngfgrant
Copy link
Contributor

Yep I think we should support this. Also partly related to #520

@ryderjgillen
Copy link

I have implemented a change locally to get basic change sets working when creating a new stack. I would like to inquire if you would accept a limited scope pull request for this... if so I think it would be good to clarify the exact scope of the changes before submitting a pull request.

plan/actions.py(create_change_set)

  • Add 2nd argument change_set_type to def
  • Add parameter change_set_type to create_change_set_kwargs as ChangeSetName

cli/create.py(create_command)

  • Add argument change_set_type=CREATE to plan.create_change_set call

cli/update.py(update_command)

  • Add argument change_set_type=UPDATE to plan.create_change_set call

Corresponding Tests & Documentation to be added as appropriate

@kirkhansen
Copy link
Author

@ngfgrant any thoughts on @sacvalleytech's comment?

@hill-labs-developers
Copy link

Is there any chance of moving this along? At the moment we can't create changesets for new stacks, which breaks any ability to use changesets for a group when new stacks are involved, which means we can't preview our changes, which is dangerous for production deploys.

acaire added a commit to acaire/sceptre that referenced this issue Feb 8, 2021
…acks

This commit modifies the behaviour of changeset creation
so that when a non-existent stack error occurs, instead
of failing, the call will be reattempted with an amended
ChangeSetType param of CREATE instead of UPDATE
@roneystein
Copy link

This could be added at least for treating cases were there are no dependent stacks. Would solve my use case at least as I don't use sceptre for beyond single stacks creation/updates. A CLI option could be used to alter the default behavior.

@alex-harvey-z3q
Copy link
Contributor

This was fixed in #1469

@alex-harvey-z3q
Copy link
Contributor

Duplicated by #915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants