Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/wide-regions-hint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@vercel/sandbox": patch
"sandbox": patch
---

Update region hints to cover all 19 Vercel regions.
4 changes: 2 additions & 2 deletions packages/sandbox/src/args/region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const regionType = cmd.extendType(cmd.string, {
export const region = cmd.option({
long: "region",
type: cmd.optional(regionType),
description: `Region to create the sandbox in (defaults to ${DEFAULT_SANDBOX_REGION}; see the Vercel docs for available regions)`,
description: `Region to create the sandbox in (defaults to ${DEFAULT_SANDBOX_REGION}; any Vercel region is supported, e.g. sfo1, fra1, hnd1, syd1)`,
});

export const regionListType = cmd.extendType(cmd.string, {
Expand Down Expand Up @@ -50,5 +50,5 @@ export const failoverRegions = cmd.option({
long: "failover-regions",
type: cmd.optional(failoverRegionListType),
description:
'Comma-separated regions the sandbox can fail over to (e.g. --failover-regions sfo1,cle1). Must not include the sandbox region. Pass "none" for no failover regions, overriding the project default.',
'Comma-separated regions the sandbox can fail over to (e.g. --failover-regions sfo1,fra1). Must not include the sandbox region. Pass "none" for no failover regions, overriding the project default.',
});
2 changes: 1 addition & 1 deletion packages/sandbox/src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ const failoverRegionsCommand = cmd.command({
}),
failoverRegions: cmd.positional({
type: failoverRegionListType,
description: 'Comma-separated regions the sandbox can fail over to (e.g. sfo1,cle1). Must not include the sandbox region. Pass "none" to remove them.',
description: 'Comma-separated regions the sandbox can fail over to (e.g. sfo1,fra1). Must not include the sandbox region. Pass "none" to remove them.',
}),
scope,
},
Expand Down
22 changes: 21 additions & 1 deletion packages/vercel-sandbox/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@ export type ManagedImage =
* Regions a sandbox can run in. More regions may become available, so any
* other region string is accepted too.
*/
export type SandboxRegion = "iad1" | "sfo1" | "cle1" | "cdg1" | (string & {});
export type SandboxRegion =
| "iad1"
| "sfo1"
| "cle1"
| "cdg1"
| "fra1"
| "arn1"
| "sin1"
| "pdx1"
| "lhr1"
| "icn1"
| "bom1"
| "cpt1"
| "dub1"
| "gru1"
| "hkg1"
| "syd1"
| "yul1"
| "hnd1"
| "kix1"
| (string & {});

/**
* Region a sandbox runs in when none is requested.
Expand Down
9 changes: 5 additions & 4 deletions packages/vercel-sandbox/src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,14 @@ export interface BaseCreateSandboxParams {
*/
tags?: Record<string, string>;
/**
* The region to create the sandbox in. Defaults to `iad1`.
* See the Vercel documentation for the available regions.
* The region to create the sandbox in. Defaults to `iad1`. Any Vercel
* region is supported, e.g. `sfo1`, `fra1`, `hnd1`, `syd1`.
* See the Vercel documentation for the full list.
*/
region?: SandboxRegion;
/**
* Additional regions the sandbox can fail over to. Must not include
* `region`.
* Additional regions the sandbox can fail over to, e.g. `["sfo1", "fra1"]`.
* Must not include `region`.
*/
failoverRegions?: SandboxRegion[];

Expand Down
8 changes: 4 additions & 4 deletions skills/sandbox/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const sandbox = await Sandbox.create({
tags: { env: "staging", team: "infra" }, // Up to 5 key:value tags
persistent: true, // Default: true. Auto-snapshots on stop, restores on resume.
snapshotExpiration: ms("7d"), // Default TTL for snapshots. Use 0 for no expiration.
region: "<region>", // Optional, defaults to iad1. See the Vercel docs for available regions.
failoverRegions: ["<region>"], // Optional. Must not include `region`.
region: "<region>", // Optional, defaults to iad1. Any Vercel region, e.g. sfo1, fra1, hnd1, syd1.
failoverRegions: ["<region>"], // Optional, e.g. ["sfo1", "fra1"]. Must not include `region`.
});

console.log(sandbox.name);
Expand Down Expand Up @@ -940,7 +940,7 @@ const result = await sandbox.runCommand({
| Base system | Ubuntu 26.04 |
| User context | `ubuntu` user |
| Writable path | `/vercel/sandbox` |
| Regions | One primary region per sandbox, plus optional failover regions. Snapshots restore only in regions where they are available. See the Vercel docs for the region list. |
| Regions | One primary region per sandbox, plus optional failover regions. All 19 Vercel regions are supported (`iad1` default, `sfo1`, `cle1`, `cdg1`, `fra1`, `arn1`, `sin1`, `pdx1`, `lhr1`, `icn1`, `bom1`, `cpt1`, `dub1`, `gru1`, `hkg1`, `syd1`, `yul1`, `hnd1`, `kix1`). Snapshots restore only in regions where they are available. |

## System Packages

Expand Down Expand Up @@ -983,7 +983,7 @@ sandbox create --non-persistent # Disable filesystem persistence
sandbox create --snapshot-expiration 7d # Default snapshot TTL
sandbox create --keep-last-snapshots 1 # Retention policy
sandbox create --tag env=staging # Repeatable
sandbox create --region <region> # Defaults to iad1; see the Vercel docs for available regions
sandbox create --region <region> # Defaults to iad1; any Vercel region, e.g. sfo1, fra1, hnd1, syd1
sandbox create --failover-regions <region>,<region> # Comma-separated
sandbox create --failover-regions none # No failover, overrides the project default

Expand Down
Loading