If you create a cookbook with a hyphen in the name such as my-cookbook, you’ll have a challenge using lightweight resource providers (LWRP’s) in the cookbook. It turns out that hyphen is not allowed as a variable in ruby and under the covers, LWRP’s are managed with a variable name combination of the cookbookName_LWRPname.
To address this issue, chef converts the hyphen in the cookbook name to underscore. You can use the LWRP if you know the secret. You’ll use it by converting the hyphen in the name to underscore such as: