-
Notifications
You must be signed in to change notification settings - Fork 167
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
Support CloudFormation Parameters within Blueprint Variables #206
Support CloudFormation Parameters within Blueprint Variables #206
Conversation
|
||
:class`CFNType`` can be used as the `type` for a Blueprint variable. | ||
Unlike other variables, a variable with `type` :class:`CFNType`, will | ||
not be available to the Blueprint while rendering via `get_variables` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't true anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, yeah, I like your thoughts around this.
I ran it through a quick test and it looks good to me. More than functional enough as is (would be kinda cool to have the automatic transform to Thanks again! |
|
||
This allows us to filter out non-CloudFormation Parameters from | ||
Blueprint variables when we submit the CloudFormation parameters. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a Args
docstring for value, it's a specific type, right?
Minor nits, but this looks awesome and is going to provide a lot of flexibility. THanks for jumping on it so quickly. @troyready @acmcelwee might want to take a look at this. Also, needs docs, but I figure you were waiting to get folks to look at it before documenting. |
AWS only accepts strings or lists
Looks like the right direction to me |
We're down to only 2 PRs, this and #185. As soon as both are complete, I'm going to release a new stacker - I'm thinking we're getting pretty close to what I'd consider 1.0, but I'll probably go with .8 for this one, .9 for the release where we deprecate the old style Parameters entirely, and then 1.0 once that has stabilized for a bit. Sound good? |
I feel like 1.0.0 should drop parameters since it's a massively backwards incompatible change. I think a 1.0.0 of stacker and stacker_blueprints that moves parameters to variables. Then like 1.1.0 once its stable? |
That seems fair, sounds good to me. |
Initial pass at fixing: #205.
It isn't as easy to understand as I'd like when reading through the code, but that's because we have so many different references to parameters all over the place from the old parameters. When we remove those this should be much simpler to follow.
This PR introduces a new concept of Blueprint variable "types". These can be used as the
type
value when defining a Variable the Blueprint accepts.Right now all of the types are instances of
CFNType
which will cause the variable to be submitted as a CloudFormation Parameter when launching the stack.I was going to exclude these from
get_variables
but I didn't see a downside to including it. I was thinking we might even be able to do something cool like within a blueprint be able to do something like:Where calling
variables["CFNParameter"]
will resolve to a troposphereRef
value automatically? The implicit dependency of doingRef("CFNParameter")
always bothered me.