-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export CloudMetadata? #123
Comments
Interesting idea! We can look into it! |
Thank you! I was already using Do you know if there's a way to extract the project id from the client? I still need to know the id to construct, for instance, a |
@simolus3 We were just discussing / brainstorming approaches to making functions projects cloud project-aware last week, actually, and make it easy to wire up and consume other GC services from the function. Multiple ways to skin the cat, I think, but I've been looking at this from the perspective of having some kind of project config (potentially checking for a gcloud config) at build time to configure the deployment while the framework makes it dead simple to get what's needed for function app from the environment (whether accessed as library calls or supplied via a context argument). |
This is a bit more than I asked for here, but I had a rather simple idea on how to provide cloud services without much effort: Maybe this package can integrate with I think that this would be a pretty neat developer experience where everything "just works" and I don't have to manually pass some context variable around. I'm happy to work on a PR if you think this is a direction worth exploring. |
@simolus3 The service scope idea is pretty neat. You're always welcome to prototype ideas and contribute to the project, but I know that @kevmoo has been putting a lot of thought into this, so I'd want for him to weigh in on implementation first (this is a light week for us and he's enjoying some family time). But having your input on the desired developer experience as we all put our heads together on this really helps. Thanks! |
Also, since I think my comment wasn't quite so clear, let me clarify that regardless of the metadata that can be consumed from the environment at runtime for use by your function, you still have to specify what cloud project you want to deploy into -- this is where the function project configuration that I'm talking about comes in. Currently, we require that you install and configure |
@simolus3 I'm prototyping a mini-CLI to make working with a Dart Functions Framework project easy. Imagine a .function.yaml
|
I'm trying to access other Google Cloud Services in Cloud Run, so I need to know my project id at runtime. For now I'm just getting it via an environment variable, but since this package can already look it up from the metadata server I wonder if
CloudMetadata.projectId()
could be exported?The text was updated successfully, but these errors were encountered: