cloudflare / serverless-cloudflare-workers

Serverless provider plugin for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
175 stars 37 forks source link

Unable to bind variable to namespace in serverless.yml #28

Closed jbasdf closed 5 years ago

jbasdf commented 5 years ago

The documentation states that the plugin can create and bind a KV Storage namespace for a function by adding the following to the resource section of serverless.yml: ` kv:

jspies commented 5 years ago

I'll take a look. Can you provide your yml file?

jbasdf commented 5 years ago

Sure thing. Just rename to .yml: serverless.txt

jspies commented 5 years ago

Ok, I'm not having issues on an enterprise account, but I do have an issue with a non enterprise, "single script" account. Is yours the latter?

azizirac commented 5 years ago

I have a similar problem. When I am trying to deploy the function I have en error Cannot read property 'id' of undefined. If I created the namespace manually then it works.

jbasdf commented 5 years ago

I am using a single script account. I verified that it after I set the variable and namespace in the script editor and then do a deploy via als deploy it erases the binding values.

jspies commented 5 years ago

Ok, I think I have reproduced the issue. I have been traveling (and still am) but will get this resolved as soon as I can.

jspies commented 5 years ago

Fix for this. Version 1.1.1