Method: Cfer::Cfn::Client#fetch_stack
- Defined in:
- lib/cfer/cfn/client.rb
#fetch_stack(stack_name = @name) ⇒ Object
213 214 215 216 217 218 219 220 |
# File 'lib/cfer/cfn/client.rb', line 213 def fetch_stack(stack_name = @name) raise Cfer::Util::StackDoesNotExistError, 'Stack name must be specified' if stack_name == nil begin stack_cache(stack_name)[:stack] ||= describe_stacks(stack_name: stack_name).stacks.first.to_h rescue Aws::CloudFormation::Errors::ValidationError => e raise Cfer::Util::StackDoesNotExistError, e. end end |