Method: CloudFormationTool::CloudFormation::NestedStack#initialize
- Defined in:
- lib/cloud_formation_tool/cloud_formation/nested_stack.rb
#initialize(props, tpl) ⇒ NestedStack
Returns a new instance of NestedStack.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cloud_formation_tool/cloud_formation/nested_stack.rb', line 7 def initialize(props, tpl) @tpl = tpl @data = props if props.key?('Template') path = props['Template'] path = if path.start_with? "/" then path else "#{@tpl.basedir}/#{path}" end @content = CloudFormation.new(path).to_yaml @data['TemplateURL'] = upload(make_filename('yaml'), @content, mime_type: 'text/yaml', gzip: false) @data.delete('Template') end end |