From 1edc643623da043520f122013a2db52a71992050 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Sat, 13 Sep 2025 07:55:39 +1000 Subject: [PATCH 1/3] docs: add default environment variables available in hosted enviroment --- apps/docs/content/guides/functions/secrets.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/docs/content/guides/functions/secrets.mdx b/apps/docs/content/guides/functions/secrets.mdx index d7b556e4047f9..34da0dd056321 100644 --- a/apps/docs/content/guides/functions/secrets.mdx +++ b/apps/docs/content/guides/functions/secrets.mdx @@ -14,6 +14,12 @@ Edge Functions have access to these secrets by default: - `SUPABASE_SERVICE_ROLE_KEY`: The `service_role` key for your Supabase API. This is safe to use in Edge Functions, but it should NEVER be used in a browser. This key will bypass Row Level Security - `SUPABASE_DB_URL`: The URL for your Postgres database. You can use this to connect directly to your database +In hosted environment, functions have access to following environment variables: + +- `SB_REGION`: The region function was invoked +- `SB_EXECUTION_ID`: A UUID of function instance (isolate) +- `DENO_DEPLOYMENT_ID`: Version of the function code (`{project_ref}_{function_id}_{version}`) + --- ## Accessing environment variables From 36f0e5a78e869199750f285529971ee427075dc0 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Tue, 16 Sep 2025 19:38:13 +1000 Subject: [PATCH 2/3] Update apps/docs/content/guides/functions/secrets.mdx Co-authored-by: Chris Chinchilla --- apps/docs/content/guides/functions/secrets.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/content/guides/functions/secrets.mdx b/apps/docs/content/guides/functions/secrets.mdx index 34da0dd056321..59fb4d0283f86 100644 --- a/apps/docs/content/guides/functions/secrets.mdx +++ b/apps/docs/content/guides/functions/secrets.mdx @@ -14,7 +14,7 @@ Edge Functions have access to these secrets by default: - `SUPABASE_SERVICE_ROLE_KEY`: The `service_role` key for your Supabase API. This is safe to use in Edge Functions, but it should NEVER be used in a browser. This key will bypass Row Level Security - `SUPABASE_DB_URL`: The URL for your Postgres database. You can use this to connect directly to your database -In hosted environment, functions have access to following environment variables: +In a hosted environment, functions have access to the following environment variables: - `SB_REGION`: The region function was invoked - `SB_EXECUTION_ID`: A UUID of function instance (isolate) From f9f75a0c12bfd343ce357372e015d29e7f466b91 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Wed, 17 Sep 2025 01:34:09 +1000 Subject: [PATCH 3/3] Update apps/docs/content/guides/functions/secrets.mdx Co-authored-by: Chris Chinchilla --- apps/docs/content/guides/functions/secrets.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/content/guides/functions/secrets.mdx b/apps/docs/content/guides/functions/secrets.mdx index 59fb4d0283f86..9fd3aadc30657 100644 --- a/apps/docs/content/guides/functions/secrets.mdx +++ b/apps/docs/content/guides/functions/secrets.mdx @@ -17,7 +17,7 @@ Edge Functions have access to these secrets by default: In a hosted environment, functions have access to the following environment variables: - `SB_REGION`: The region function was invoked -- `SB_EXECUTION_ID`: A UUID of function instance (isolate) +- `SB_EXECUTION_ID`: A UUID of function instance ([isolate](/docs/guides/functions/architecture#4-execution-mechanics-fast-and-isolated)) - `DENO_DEPLOYMENT_ID`: Version of the function code (`{project_ref}_{function_id}_{version}`) ---