Class: CloudFormationTool::CloudFormation::NestedStack
- Inherits:
-
Object
- Object
- CloudFormationTool::CloudFormation::NestedStack
- Includes:
- Storable
- Defined in:
- lib/cloud_formation_tool/cloud_formation/nested_stack.rb
Constant Summary
Constants included from CloudFormationTool
Instance Method Summary collapse
-
#initialize(props, tpl) ⇒ NestedStack
constructor
A new instance of NestedStack.
- #to_cloudformation ⇒ Object
Methods included from Storable
#cached_object, #make_filename, #prefix, #upload
Methods included from CloudFormationTool
#aws_config, #awsas, #awscdn, #awscf, #awscreds, #awsec2, #awsecs, #awss3, #cf_bucket_name, #find_profile, #profile, #region, #s3_bucket_name
Constructor Details
#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 |
Instance Method Details
#to_cloudformation ⇒ Object
19 20 21 |
# File 'lib/cloud_formation_tool/cloud_formation/nested_stack.rb', line 19 def to_cloudformation @data end |