Skip to content

Commit

Permalink
Adding recommendation to export AZURE_STATICWEBSITE_NAME every time. …
Browse files Browse the repository at this point in the history
…leaving empty creates a default with a unique hash (but ugly for prod)

Signed-off-by: Paul Yuknewicz <[email protected]>
  • Loading branch information
paulyuk committed May 30, 2024
1 parent a1dbe72 commit 7eaf86a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/iac/swa/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7eaf86a

Please sign in to comment.