Adding recommendation to export AZURE_STATICWEBSITE_NAME every time. leaving empty creates a default with a unique hash (but ugly for prod)

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
This commit is contained in:
Paul Yuknewicz 2024-05-29 20:59:11 -07:00
parent a1dbe72410
commit 7eaf86a9ef
1 changed files with 12 additions and 0 deletions

View File

@ -20,21 +20,33 @@ Bash/sh/zsh:
```bash
export AZURE_RESOURCE_GROUP=rg-dapr-docs-test
export IDENTITY_RESOURCE_GROUP=rg-my-identities
export AZURE_STATICWEBSITE_NAME=daprdocs-latest
```
PowerShell
```PowerShell
setx AZURE_RESOURCE_GROUP "rg-dapr-docs-test"
setx IDENTITY_RESOURCE_GROUP "rg-my-identities"
setx AZURE_STATICWEBSITE_NAME "daprdocs-latest"
```
This assumes you have an existing [user-assigned managed identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp) (see L39 in `./infra/main.bicep` to use or modify name) in a resource group that you can reference as the runtime identity of this static web app. We recommend storing this in a different resource group from your application, to keep the permissions and lifecycles separate of your identity and your web app. We also recommend narrowly limiting who has access to view, contribute or own this identity, and also only apply it to single resource scopes, not to entire resource groups or subscriptions, to avoid elevation of priviledges.
2) Deploy using the Azure Dev CLI
The first time, and any updates to this environment
```bash
azd up
```
For subsequent environments/sites, create a side-by-side environment like this:
```bash
azd env new
azd up
```
You will be prompted for the subscription and location (region) to use. The Resource Group and Static Web App will now be created and usable. Typical deployment times are only 20-60 seconds.
## Configure the Static Web App in portal.azure.com