Module: Jets::Cfn::Stack::Deployable

Included in:
Jets::Cfn::Stack
Defined in:
lib/jets/cfn/stack/deployable.rb

Instance Method Summary collapse

Instance Method Details

#check_deployable!Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/jets/cfn/stack/deployable.rb', line 4

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