Open indicava opened 1 year ago
Hi @indicava. Thanks for raising the issue.
We don't support parametrizing storage buckets using params yet. Params only work on configuration options like timeouts and memory for now. Sorry for the confusion!
Hi @indicava. Thanks for raising the issue.
We don't support parametrizing storage buckets using params yet. Params only work on configuration options like timeouts and memory for now. Sorry for the confusion!
Thanks for the update.
So do you have any suggestion on how to approach this issue when I am managing several environments with different bucket names using the same codebase?
Came across the same problem. I do not see a solution here. How could I subscribe to different buckets for dev and prd environments? There seem to be no way to provide deployment time params?
Hi I encountered the same problem. I found a solution using the environment variable process.env.GCLOUD_PROJECT.
Hi
I encountered the same problem. I found a solution using the environment variable process.env.GCLOUD_PROJECT.
Hi,
Could you elaborate a little more on how you use that environment variable to parameterize bucket names?
Maybe post/link some sample code?
Thanks!
@taeold any update on this feature?
I am also looking for this feature. It seems very important for managing buckets in multiple environment. currently I have to change names manually while deploying to different environments, which is very inconvenient. I hope this is picked up soon . issue also mentioned here -> https://github.com/firebase/firebase-functions/issues/1369
This is a bug IMO. We cannot use firebase function params as the documentation instructs us to if these basic top-level methods don't work with Param
s, and there is no published workaround. Will the Firebase team please prioritize this?
Still biting developers in the butt. Good grief. Please update your documentation.
Related issues
[REQUIRED] Version info
node: v16.19.1
firebase-functions: 4.4.0
firebase-tools: 12.3.0
firebase-admin: 11.9.0
[REQUIRED] Test case
create an .env file with these contents:
DEFAULT_STORAGEBUCKET=img.mydomain.com
Then create an index.js file with this function definition:
[REQUIRED] Steps to reproduce
run "firebase emulators:start" or "firebase deploy"
[REQUIRED] Expected behavior
Expected behavior is Storage triggered cloud function for the bucket named "img.mydomain.com"
[REQUIRED] Actual behavior
Actual behavior is I am getting this error message:
functions: Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: Error: Invalid bucket name params.DEFAULT_STORAGEBUCKET
Were you able to successfully deploy your functions?
No I was unable to deploy