Git Product home page Git Product logo

Comments (6)

patrobinson avatar patrobinson commented on June 15, 2024

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.

poidag-zz avatar poidag-zz commented on June 15, 2024

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.

patrobinson avatar patrobinson commented on June 15, 2024

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.

redterror avatar redterror commented on June 15, 2024

I started on addressing this in #120 but it still needs a little more work.

from stack_master.

elmobp avatar elmobp commented on June 15, 2024

@redterror see #144 its complete in there

from stack_master.

patrobinson avatar patrobinson commented on June 15, 2024

Implemented in #120 and released in 1.10

from stack_master.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.