Knife Data Bag from file error

I created a data bag and saved it to disk in json format.  I made some changes in the files and then tried to upload data bag from file: knife data bag from file c:\dev\…\data_bag_folder\* When I received this unhelpful error message: ERROR: Chef::Exceptions::ValidationFailed: Option data_bag’s value C:/Dev/…/data_bag_folder/bagItem.json does not match regular expression /^[\-[:alnum:]_]+$/ It has nothing to do with regular expressions.  If you look closely at the command, I failed to specify the name of the data bag.  It should have been: knife data bag from file dataBagName c:\dev\…\data_bag_folder\* Once I specified the data bag name, it worked just fine.

Advertisements