Sha256: 7b43a6bec77647fa1ecf6ce788172be44ede0d95b2f3bfad979fa3be9bfbb5e9

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

class Jets::Cfn::Stack
  module Deployable
    # All CloudFormation states listed here: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html
    def check_deployable!
      return if !stack_exists?(stack_name)

      resp = cfn.describe_stacks(stack_name: stack_name)
      status = resp.stacks[0].stack_status
      if /_IN_PROGRESS$/.match?(status)
        log.error "ERROR: The '#{stack_name}' stack status is #{status}".color(:red)
        log.error "Please wait until the stack is ready and try again."
        exit 1
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/cfn/stack/deployable.rb
jets-6.0.4 lib/jets/cfn/stack/deployable.rb
jets-6.0.3 lib/jets/cfn/stack/deployable.rb
jets-6.0.2 lib/jets/cfn/stack/deployable.rb