static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Support deploying to additional regions using SWA CLI

Open drmcclelland opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Our preferred deployment region is South Central US, but the swa deploy command does not allow us to use that region.

Currently there is not a documented way to specify the region at the command line or in swa-cli.config.json, so I tried specifying South Central US in the environment variable AZURE_REGION_LOCATION (which the documentation states defaults to West US 2). It turns out that the syntax for region is very specific and limited, as described by this error message:

Checking project "poc-azure-swa" settings...
√ Would you like to create a new Azure Static Web Apps project? ... yes
√ Choose a project name: ... poc-azure-swa
× Project creation failed.
✖ The provided location 'southcentralus' is not available for resource type 'Microsoft.Web/staticSites'. List of available regions for the resource type is 'westus2,centralus,eastus2,westeurope,eastasia'.

I was able to set the environment variable AZURE_REGION_LOCATION to 'centralus' and successfully use swa deploy. However, that's still not our preferred region - I did try 'southcentralus' but the same error message occurred.

Describe the solution you'd like Please document the syntax for regions, and also support the rest of them 😄 (beyond just the list of regions in the error message). Also, please support and document how the region can be specified as part of the swa deploy command line and inside swa-cli.config.json.

drmcclelland avatar Jul 13 '22 14:07 drmcclelland

Hey @drmcclelland , deploying StaticWebapps in the southcentral us is not supported. This is not just specific to SWA_CLI.

sgollapudi77 avatar Jul 21 '22 06:07 sgollapudi77

Any ETA on when Static Web Apps will be available in additional regions? Like southcentral US, northcentral US...

drmcclelland avatar Sep 21 '22 16:09 drmcclelland

Assigning the issue to @Reshmi-Sriram to take it forward.

sulabh-msft avatar Dec 05 '22 16:12 sulabh-msft

Hey @drmcclelland, we do not have any nearby plans of having more regions than the one listed. Also, this region variable is what is being set for your API backend, the static frontend is deployed across all regions for global availability. Apologies for the inconvenience if any!

Reshmi-Sriram avatar Dec 05 '22 17:12 Reshmi-Sriram