lib/ufo/stack.rb in ufo-4.5.4 vs lib/ufo/stack.rb in ufo-4.5.5
- old
+ new
@@ -183,11 +183,15 @@
# Assume only first container_definition to get the container info.
# Stack:arn:aws:cloudformation:... is in ROLLBACK_COMPLETE state and can not be updated.
def handle_stack_error(e)
case e.message
when /state and can not be updated/
- puts "The #{@stack_name} stack is in #{"ROLLBACK_COMPLETE".color(:red)} and cannot be updated. Deleted the stack and try again."
+ puts "The #{@stack_name} stack is in a state that cannot be updated. Deleted the stack and try again."
+ puts "ERROR: #{e.message}"
+ if message.include?('UPDATE_ROLLBACK_FAILED')
+ puts "You might be able to do a 'Continue Update Rollback' and skip some resources to get the stack back into a good state."
+ end
region = `aws configure get region`.strip rescue 'us-east-1'
url = "https://console.aws.amazon.com/cloudformation/home?region=#{region}"
puts "Here's the CloudFormation console url: #{url}"
exit 1
when /No updates are to be performed/
@@ -201,9 +205,9 @@
def rollback_complete?(stack)
stack.stack_status == 'ROLLBACK_COMPLETE'
end
def updatable?(stack)
- stack.stack_status =~ /_COMPLETE$/
+ stack.stack_status =~ /_COMPLETE$/ || stack.stack_status == 'UPDATE_ROLLBACK_FAILED'
end
end
end