lib/bora/cfn/stack.rb in bora-1.2.0 vs lib/bora/cfn/stack.rb in bora-1.3.0

- old
+ new

@@ -1,12 +1,12 @@ require 'set' require 'open-uri' require 'aws-sdk' -require 'diffy' require 'bora/cfn/stack_status' require 'bora/cfn/event' require 'bora/cfn/output' +require 'bora/cfn/parameter' class Bora module Cfn class Stack @@ -48,10 +48,15 @@ def outputs return if !exists? underlying_stack.outputs.map { |output| Output.new(output) } end + def parameters + return if !exists? + underlying_stack.parameters.map { |parameter| Parameter.new(parameter) } + end + def template(pretty = true) return if !exists? template = cloudformation.get_template({stack_name: @stack_name}).template_body template = JSON.pretty_generate(JSON.parse(template)) if pretty template @@ -64,13 +69,9 @@ template = JSON.pretty_generate(JSON.parse(template)) if pretty template else raise "new_template not yet implemented for URL #{options[:template_url]}" end - end - - def diff(options) - Diffy::Diff.new(template, new_template(options)) end def validate(options) cloudformation.validate_template(resolve_options(options).select { |k| [:template_body, :template_url].include?(k) }) end