Comments (5)
👍 to this idea -- it would be nice to have UserData content extracted to a separate file.
For this to be most useful, the content of the would still need to be parsed by CloudFormation, in order to resolve intrinsic functions (Fn::Ref
, Fn::GetAtt
, etc.). Use of those functions may introduce some strange requirements when it comes to quoting the content.
from stack_master.
I saw an interesting solution to this in a sparkleformation issue: sparkleformation/sparkle_formation#54 (comment)
It enables separate user data files while being able to use ERB to call sparkle functions inside that file like <%= region! %>
.
from stack_master.
@stevehodgkiss that's an interesting approach, although it's a shame that it only works with Sparkle. I'd love to see a more generic approach if possible (though I don't currently see how).
cloud-init
has quite a bit more functionality than just user-data shell scripts, see here:
https://help.ubuntu.com/community/CloudInit
About the only idea I have is to create a grammar of some kind to allow embedding CF references/functions inline in the script, then replacing them with closequote-var-openquote:
...", { "Ref" : "Foo" }, "...
from stack_master.
@mhussain: 0.6.0 has been released, which contains user_data_file!
. See #117 for details.
from stack_master.
I think the approach/code used in #117 could be used in JSON/YAML templates quite easily too, we'd just need to run it through the same Erubis context. It could look like this:
"UserData": <%= user_data_file!('app.erb') %>
from stack_master.
Related Issues (20)
- 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
- Current OnePassword integration does not support one password `op` cli v2
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.