Is there a way to get deployment name
Is there a way to get deployment name from a function? I'm currently creating a secret env vars for it, but that seems silly.
10 Replies
yeah we've thought about this too. Would be helpful from an action. There's currently not a way.
In what capacity would it be helpful for you?
(just for some context)
I need to pass callback url to an external service call
and I have http endpoint deployed
yeah makes a lot of sense. To confirm, this is from an action?
yeap
A kind of silly workaround to unblock would be setting an Environment Variable (https://docs.convex.dev/using/environment-variables) with the name of your deployment
Environment Variables | Convex Developer Hub
Store and access environment variables in Convex
But this also sounds like something we should support better
yeap that's what I'm currently doing
a special automatic environment variable might be a good API for this
Hey @vors - we just sorta speedran some feature development and launched
CONVEX_SITE_URL
and CONVEX_CLOUD_URL
- which are now available in actions. It's not yet documented, but give it a shot!amazing, thank you!