-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the solution
Currently, wrangler deploy only allows deploying a single target at a time. In projects with multiple environments defined in wrangler.toml, users must run separate commands for each environment. This is especially cumbersome when environments target different Cloudflare accounts or regional setups.
Use Case: I have a configuration where I need to deploy the same code to multiple accounts/environments simultaneously to keep them in sync.
name = "next-logger"
main = "index.ts"
compatibility_date = "2025-12-26"
account_id = "account1"
[vars]
SERVICE_ACCOUNT_EMAIL = "acc1@mail.com"
[env.account2]
name = "next-logger"
account_id = "account2"
[env.account2.vars]
SERVICE_ACCOUNT_EMAIL = "accoun2@mail.com"Currently, I have to run:
wrangler deploy (for account1)
wrangler deploy --env account2 (for account2)
Proposed Solution: Add a flag to support deploying all defined environments or a list of specific environments in one command.
Examples:
wrangler deploy --all (Deploys top-level + all [env.x] blocks)
wrangler deploy --env account1,account2 (Deploys a specific comma-separated list)
This would improve developer experience and reduce the complexity of CI/CD scripts.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status