How can I deploy a scheduled function to Google Firebase Functions?
I have created a Service Account named
cron-notifications
My code for the function
exports.notification_email = functions
.region('europe-west1')
.pubsub
.schedule('0 * * * *')
.timeZone('Europe/Stockholm')
.onRun(async (event) => { ... }
When I try to deploy using
$ firebase deploy --only functions:notification_email
I get the error below.
Error: HTTP Error: 400, Location must equal europe-west1 because the App Engine app that is associated with this project is located in europe-west1
I can deploy other functions that are not scheduled to "europe-west1" . I think my project is in europe-west1 (how can I verify?)
I have also tried creating a function named notification_email, located in europe-west1, directly from the GCP Cloud Functions Web UI and then deploying my function - overwriting it - with the same result.
I also tried setting the region using
gcloud config set functions/region europe-west1
as stated in the documentation, with the same result.
My $ gclod config list
[core]
account = myAccount
disable_usage_reporting = True
project = myProject
[functions]
region = europe-west1
Please help me out here! :)