Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

updated the error messages on bogus ami_id #547

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ def create(state)
instance.transport.connection(state).wait_until_ready
create_ec2_json(state) if /chef/i.match?(instance.provisioner.name)
debug("ec2:create '#{state[:hostname]}'")
rescue Exception
rescue Exception => e
# Clean up any auto-created security groups or keys on the way out.
delete_security_group(state)
delete_key(state)
raise
raise "#{e.message} in the specified region #{config[:region]}. Please check this AMI is available in this region."
end

def destroy(state)
Expand Down