Closed rclark closed 6 years ago
@k-mahoney this is ready for you to take it for a spin! As indicated above,
var cf = require('cloudfriend');
var dereferenced = cf.dereference(template, parameters, options);
Awesome, will get this integrated with our tests this week and give it a try!
@rclark is improved test coverage something you'd still like to see before this can be merged?
As it stands this functionality will only work with IAM ref/att values - but I imagine we can get this expanded in a subsequent PR? Scripting that has been on my backlog for a while.
This is more scope creep than I thought it would be when I first set down this road. Its a huge pain in the ass to write all the information needed dereferencing into the codebase, and in the long run this would be a maintenance nightmare -- it needs to stay in sync with CloudFormation. There are also a bunch of unsolvable edge cases.
Can we circle back and huddle on your use-case to see if we can come up with a better solution?
It might make sense, given that we're only using it for tests at this juncture, to retain the parse/dereference logic and provide a template of the desired ref/att values - rather than maintaining the monolith of all possible values.
Closing. This experiment didn't end up being as effective as we'd hoped.
Adds functionality to resolve conditions, intrinsic functions, and pseudo parameters into flat strings.
TODO
@k-mahoney on that 3rd point, what would the ideal API for this be from your perspective? To dereference a template you'll need to provide
Should it be something like
... or is there some other way to format it that might be more useful for what you need?
Fixes #13