I'm trying to structure my GCP gcloud functions (in python) as a separate file per function. It sounds like from the documentation it should be supported but when I try to use --source as a file name instead of a directory it fails. Is there something I'm doing wrong?
Here is the command I use:
gcloud functions deploy createAccount --runtime python38 --trigger-http --source=postgres/createAccount.py --region us-central1
and the error I get back is:
ERROR: (gcloud.functions.deploy) argument
--source: Provided path does not point to a directory
But if I put my "createAccount" python function in main.py inside the postgres directory and use this command the function deploys perfectly:
gcloud functions deploy createAccount --runtime python38 --trigger-http --source=postgres --region us-central1
Here it loojs as though it should accept file names in the --source option:
https://cloud.google.com/functions/docs/first-python
See this section:
Any ideas if there is a way to not make main.py one big monolith of all my cloud functions?
