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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s