lib/bora/cfn/stack.rb in bora-1.0.1 vs lib/bora/cfn/stack.rb in bora-1.1.0

- old
+ new

@@ -10,12 +10,13 @@ module Cfn class Stack NO_UPDATE_MESSAGE = "No updates are to be performed" - def initialize(stack_name) + def initialize(stack_name, region = nil) @stack_name = stack_name + @region = region @processed_events = Set.new end def create(options, &block) call_cfn_action(:create, options, &block) @@ -86,10 +87,12 @@ # ============================================================================================= private def cloudformation - @cfn ||= Aws::CloudFormation::Client.new + @cfn ||= begin + @region ? Aws::CloudFormation::Client.new(region: @region) : Aws::CloudFormation::Client.new + end end def method_missing(sym, *args, &block) underlying_stack ? underlying_stack.send(sym, *args, &block) : nil end