Module: Terraformer::Templating
- Included in:
- Resource::CloudWatchAlarm, Resource::DatadogMonitor
- Defined in:
- lib/terraformer/templating.rb
Instance Method Summary collapse
Instance Method Details
#apply_template(erb) ⇒ Object
3 4 5 |
# File 'lib/terraformer/templating.rb', line 3 def apply_template(erb) ERB.new(open(template_path(erb)).read, nil, "-").result(binding) end |
#template_path(template_name) ⇒ Object
7 8 9 |
# File 'lib/terraformer/templating.rb', line 7 def template_path(template_name) File.join(File.(File.dirname(__FILE__)), "template", template_name) << ".erb" end |