Method: Jets::Commands::Deploy#minimal_rollback_complete?

Defined in:
lib/jets/commands/deploy.rb

#minimal_rollback_complete?Boolean

Checks for a few things before deciding to delete the parent stack

* Parent stack status status is ROLLBACK_COMPLETE
* Parent resources are in the DELETE_COMPLETE state

Returns:

  • (Boolean)


88
89
90
91
92
93
94
95
96
97
98
# File 'lib/jets/commands/deploy.rb', line 88

def minimal_rollback_complete?
  stack = find_stack(stack_name)
  return false unless stack

  return false unless stack.stack_status == 'ROLLBACK_COMPLETE'

  # Finally check if all the minimal resources in the parent template have been deleted
  resp = cfn.describe_stack_resources(stack_name: stack_name)
  resource_statuses = resp.stack_resources.map(&:resource_status).uniq
  resource_statuses == ['DELETE_COMPLETE']
end