-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace Azure Storage with SWA (#1296)
- Loading branch information
Showing
67 changed files
with
465 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
param resourceBaseName string | ||
param storageSku string | ||
param staticWebAppSku string | ||
|
||
param storageName string = resourceBaseName | ||
param location string = resourceGroup().location | ||
param staticWebAppName string = resourceBaseName | ||
|
||
// Azure Storage that hosts your static web site | ||
resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = { | ||
kind: 'StorageV2' | ||
location: location | ||
name: storageName | ||
properties: { | ||
supportsHttpsTrafficOnly: true | ||
} | ||
// Azure Static Web Apps that hosts your static web site | ||
resource swa 'Microsoft.Web/staticSites@2022-09-01' = { | ||
name: staticWebAppName | ||
// SWA do not need location setting | ||
location: 'centralus' | ||
sku: { | ||
name: storageSku | ||
name: staticWebAppSku | ||
tier: staticWebAppSku | ||
} | ||
properties: {} | ||
} | ||
|
||
var siteDomain = replace(replace(storage.properties.primaryEndpoints.web, 'https://', ''), '/', '') | ||
var siteDomain = swa.properties.defaultHostname | ||
|
||
// The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details. | ||
output TAB_AZURE_STORAGE_RESOURCE_ID string = storage.id // used in deploy stage | ||
output AZURE_STATIC_WEB_APPS_RESOURCE_ID string = swa.id | ||
output TAB_DOMAIN string = siteDomain | ||
output TAB_ENDPOINT string = 'https://${siteDomain}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.