Comments (6)
Short answer:
Not currently
Long answer:
You cannot dereference parameters before the template is compiled by CloudFormation. DSLs like cfndsl provide a wrapper, but ultimately just compile a JSON template that's submitted to the CloudFormation API. Since StackMaster uses CloudFormation parameters, the value of that parameter is not looked up at any level until it's submitted to the API. So your DSL (whether it be Sparkleformation or cfndsl) has no capability to know the parameter value at (it's) compile time.
It might be possible to submit the parameters to cfndsl or SparkleFormation as a variable or method for dereferencing, so that it can know about them, but this functionality does not exist today.
from stack_master.
Thanks Patrick,
I'm not sure I was clear in what I was trying to do, Is there a way to use a parameter defined in yaml as a variable in ruby/cfndsl rather than bringing it in as a cloudformation parameter.
from stack_master.
The parameters are available to stack master and Cloudformation but not the DSL (and hence no code written in the DSL) without calling out to StackMaster, and exposing a lot of implementation details to the DSL. This would be extremely fragile and likely to break with updates to StackMaster.
The only way I can see to do this would to change StackMaster to pass the parameters to the DSL library when we compile the template. This seems possible with Cfndsl.
from stack_master.
I started on addressing this in #120 but it still needs a little more work.
from stack_master.
@redterror see #144 its complete in there
from stack_master.
Implemented in #120 and released in 1.10
from stack_master.
Related Issues (20)
- Proposal: Templates from gems HOT 4
- Parameters are named with underscores, but stacks are named with dashes HOT 1
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Proposal: erb templating for parameter files HOT 2
- stack_master apply with no changes exits with non-zero HOT 2
- stack_master validate exits with non-zero on valid stack HOT 2
- Empty change list when only stack tags are changing HOT 1
- Add IAM capability 'CAPABILITY_AUTO_EXPAND' to apply.rb HOT 5
- General Inquiry on Directory Structure HOT 6
- Proposal: Add template_dir option to Stacks config HOT 1
- colorize gem is GPL-2 HOT 7
- --enable-termination-protection inquiry HOT 1
- Underscore in region alias causes apply to timeout (slowly)
- Logging-style output doesn't go to stderr
- Unclear error when missing permissions to validate allowed account
- Stack_master not getting installed on windows with Error as Failed to build gem native extension HOT 2
- Status command fails if parameters can't be resolved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stack_master.