Failed to complete #create action: [undefined method `[]’ for nil:NilClass] on …

When we launch a test instance with Chef Test Kitchen, we may get the error message:

—–> Starting Test Kitchen (…)
—–> Creating …
——Exception——-
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete #create action: [undefined method `[]’ for nil:NilClass] on …
>>>>>> ———————-
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running kitchen diagnose --all for configuration

Missing AMI

This can be the result of a missing AWS AMI referenced in the kitchen.yml file. Check if the AMI is still available in the AWS account you are working in.

Leave a comment

Your email address will not be published. Required fields are marked *