intuit / simple_deploy

Maintenance Mode - Simple Deploy is an opinionated CLI tool for managing AWS Cloud Formation Stacks.
MIT License
64 stars 22 forks source link

Stack is now a managed resource. #180

Closed ghost closed 11 years ago

ghost commented 11 years ago

If you like the single method for stack, I think we should add another card to do additional refactoring of config to make that one method. Then they will be consistent.

thbishop commented 11 years ago

I'm wondering if it makes sense to use stack like this. I think logger/config are great uses as there should only be one "instance" of it in the running context.

I don't think the same applies everywhere for a stack. It doesn't seem to fit to me for operations that interact with multiple stacks (cloning, creating a new stack which is referencing attributes from an existing stack).

I think just using a traditional Simple::Stack class might make more sense.

Thoughts?

ghost commented 11 years ago

You are right. There are commands that need multiple stacks. I still like the idea of only having one place where Stack instances are created so we don't duplicate the code everywhere. How about changing the SimpleDeploy module method so it caches instances by name and then only returns an existing instance if it has one with that name?