Google Firestore would like me to set up an env variable to point to a json file containing credentials. AFAICT, during deployment (netlify cli or via github push), json files in function folders get dropped.
I may be able to get around this using Google’s REST authorization API, but the env variable + JSON option is much cleaner.
hi @JeffML ! Just making sure you were aware that the #opentalk category is a dedicated place for discussion and experiments - we don’t do support in this channel! If you need to move this, please go ahead and edit the category
Thanks. I tried support, no response. That’s why I went here, hoping someone with experience using firestore via lambda functions would know what I need to know.
Hi @JeffML, I’ve moved this over to the support category for you. We don’t drop files during deployment. You can zip your function along with a json file and use that. This is the same concept as zipping your function along with a node_modules and they are available to your function during runtime. There are also other methods people have used to get their google credentials into lambda functions, since it’s not just a Netlify issue. I don’t have a link handy but if you google search then you can find some answers.
My (mis?) understanding is if I use Netlify Dev deployment, I don’t need to bundle or zip anything. Here’s the original issue(s):
My next attempt is going to be to ditch netlify-lambda and webpack, shove the .json in my functions folder, change netlify.toml to point to the functions folder (instead of functions-build) and just deploy via Netlify Dev’s CLI. What could go wrong?
hey jeff, sorry to hear you are still struggling. We are going to take another look at that thread when we have a chance. I’m going to go ahead and close this one so we don’t lose track of things.