class Lono::Sets::Preview::Codediff
Public Instance Methods
download_existing_cfn_template()
click to toggle source
# File lib/lono/sets/preview/codediff.rb, line 21 def download_existing_cfn_template resp = cfn.describe_stack_set(stack_set_name: @stack) IO.write(existing_template_path, resp.stack_set.template_body) end
existing_template_path()
click to toggle source
# File lib/lono/sets/preview/codediff.rb, line 31 def existing_template_path "/tmp/existing_stack_set.yml" end
new_cfn_template()
click to toggle source
for clarity
# File lib/lono/sets/preview/codediff.rb, line 27 def new_cfn_template template_path end
run()
click to toggle source
# File lib/lono/sets/preview/codediff.rb, line 5 def run unless stack_set_exists?(@stack) puts "WARN: Cannot create a diff for the stack set because the #{@stack} does not exists.".color(:yellow) return end if @options[:noop] puts "NOOP Generating CloudFormation source code diff..." else generate_all # from Base superclass. Generates the output lono teplates puts "Generating CloudFormation source code diff..." download_existing_cfn_template show_diff(existing_template_path, new_cfn_template) end end