From 607c5553de3c13ca28eccf455f68118422002295 Mon Sep 17 00:00:00 2001 From: "Pelingan, Theodoro" Date: Thu, 7 Mar 2024 06:25:17 +0800 Subject: [PATCH] Fix issue on failing create action This fixes the issue when sometimes the server returns `'Message: Failed to complete #create action: [undefined method include? for nil:NilClass in the specified region us-east-1. Please check this AMI is available in this region.]` This issue was introduced from [here](https://github.com/test-kitchen/kitchen-ec2/compare/v3.17.0...v3.17.1#diff-5f36235c5a4a35dba130d480e2175640f7762d7ae859ad98efa704c4db646b4fR567) --- lib/kitchen/driver/ec2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kitchen/driver/ec2.rb b/lib/kitchen/driver/ec2.rb index a20b2860..3808dede 100644 --- a/lib/kitchen/driver/ec2.rb +++ b/lib/kitchen/driver/ec2.rb @@ -559,7 +559,7 @@ def wait_until_ready(server, state) # supplied, try to fetch it from the AWS instance fetch_windows_admin_password(server, state) else - output = server.console_output.output + output = server.console_output.output || '' unless output.nil? output = Base64.decode64(output) debug "Console output: --- \n#{output}"