Sha256: 0d90e4eb010e476acba529250593a001eb14731fc97a89dc7d370f22739f4f6c
Contents?: true
Size: 574 Bytes
Versions: 9
Compression:
Stored size: 574 Bytes
Contents
module OpsPreflight module OpsWorks class Base attr_accessor :stack_name def initialize(stack_name) require 'aws-sdk' @stack_name = stack_name end protected def opsworks @opsworks ||= AWS::OpsWorks.new end def stack_id @stack_id ||= begin resp = opsworks.client.describe_stacks stack = resp[:stacks].find {|stack| stack[:name] == stack_name } raise "OpsWorks stack not found!" if stack.nil? stack[:stack_id] end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems