Open Cameronsplaze opened 3 days ago
If I decided to keep it the way it is, think about adding the opposite of guard-*
to the two *-base
commands. (Maybe throw-*
?). If that var is passed in, let the user know this command doesn't do anything with it. Fail fast to avoid confusion.
Also while testing this, make sure that if you deploy a leaf without the base existing, it fails. I don't want it to create the base because the user might think "I only deployed once, so I only destroy once" and not realize they need to delete the base stack that was auto-created too.
TODO: Double check that's what happens now too actually
Is your feature request related to a problem? Please describe. Much how
cdk-synth
will only operate on the base stack if you don't supply a config file, and will do the leaf stack if you do: see if this logic makes sense fordeploy
anddestroy
too. If you accidentally leave off the config-file, it won't let you delete the base stack anyways if there's already a leaf tied to it. And deploying it is harmless.The main advantage is it could clean up the README a bit. But then again, maybe breaking up "base" and "leaf" into two commands helps new people wrap their head around the architecture a little better.
I want to think on this a little more. If anyone has any thoughts, I'm definitely open.