@microsoft/teamsfx-core 1.2.2-alpha.eb4575da.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/deps-checker/constant/message.d.ts +0 -1
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +0 -4
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/local/index.d.ts +1 -0
- package/build/common/local/index.d.ts.map +1 -1
- package/build/common/local/index.js +1 -0
- package/build/common/local/index.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts +1 -0
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +29 -1
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/local/portChecker.d.ts.map +1 -1
- package/build/common/local/portChecker.js +18 -48
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/local/taskDefinition.js +1 -1
- package/build/common/local/taskDefinition.js.map +1 -1
- package/build/common/permissionInterface.d.ts +1 -0
- package/build/common/permissionInterface.d.ts.map +1 -1
- package/build/common/permissionInterface.js +1 -0
- package/build/common/permissionInterface.js.map +1 -1
- package/build/common/projectSettingsValidator.d.ts +4 -0
- package/build/common/projectSettingsValidator.d.ts.map +1 -0
- package/build/common/projectSettingsValidator.js +65 -0
- package/build/common/projectSettingsValidator.js.map +1 -0
- package/build/common/samples-config.json +24 -12
- package/build/common/samples.d.ts +1 -0
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +1 -0
- package/build/common/samples.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/core/error.js +1 -1
- package/build/core/error.js.map +1 -1
- package/build/core/index.js +1 -1
- package/build/core/middleware/CommonErrorHandlerMW.d.ts +14 -0
- package/build/core/middleware/CommonErrorHandlerMW.d.ts.map +1 -0
- package/build/core/middleware/CommonErrorHandlerMW.js +55 -0
- package/build/core/middleware/CommonErrorHandlerMW.js.map +1 -0
- package/build/core/middleware/errorHandler.js +2 -1
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectMigrator.js +1 -2
- package/build/core/middleware/projectMigrator.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +1 -1
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/tools.d.ts.map +1 -1
- package/build/core/tools.js +2 -6
- package/build/core/tools.js.map +1 -1
- package/build/plugins/resource/aad/v2/index.d.ts +2 -2
- package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v2/index.js +2 -1
- package/build/plugins/resource/aad/v2/index.js.map +1 -1
- package/build/plugins/resource/apim/managers/apimManager.d.ts.map +1 -1
- package/build/plugins/resource/apim/managers/apimManager.js +2 -4
- package/build/plugins/resource/apim/managers/apimManager.js.map +1 -1
- package/build/plugins/resource/apim/managers/questionManager.d.ts +1 -1
- package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
- package/build/plugins/resource/apim/managers/questionManager.js +11 -9
- package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
- package/build/plugins/resource/apim/v2/index.d.ts +2 -2
- package/build/plugins/resource/apim/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/v2/index.js +2 -1
- package/build/plugins/resource/apim/v2/index.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +2 -0
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +71 -1
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.js +2 -2
- package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
- package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +2 -1
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.js +16 -2
- package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
- package/build/plugins/resource/bot/aadRegistration.d.ts.map +1 -1
- package/build/plugins/resource/bot/aadRegistration.js +5 -4
- package/build/plugins/resource/bot/aadRegistration.js.map +1 -1
- package/build/plugins/resource/bot/dotnet/constants.d.ts +5 -0
- package/build/plugins/resource/bot/dotnet/constants.d.ts.map +1 -0
- package/build/plugins/resource/bot/dotnet/constants.js +13 -0
- package/build/plugins/resource/bot/dotnet/constants.js.map +1 -0
- package/build/plugins/resource/bot/dotnet/plugin.d.ts +14 -0
- package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -0
- package/build/plugins/resource/bot/dotnet/plugin.js +62 -0
- package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -0
- package/build/plugins/resource/bot/index.d.ts +5 -0
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +23 -13
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/interface.d.ts +16 -0
- package/build/plugins/resource/bot/interface.d.ts.map +1 -0
- package/build/plugins/resource/bot/interface.js +5 -0
- package/build/plugins/resource/bot/interface.js.map +1 -0
- package/build/plugins/resource/bot/plugin.d.ts +2 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +2 -4
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/v2/index.d.ts +2 -2
- package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v2/index.js +2 -1
- package/build/plugins/resource/bot/v2/index.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +7 -3
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +10 -6
- package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +2 -4
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
- package/build/plugins/resource/frontend/interface.js +2 -0
- package/build/plugins/resource/frontend/interface.js.map +1 -1
- package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.js +2 -3
- package/build/plugins/resource/frontend/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/v2/index.d.ts +2 -2
- package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v2/index.js +2 -1
- package/build/plugins/resource/frontend/v2/index.js.map +1 -1
- package/build/plugins/resource/frontend/v3/AzureStoragePlugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js +7 -7
- package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +2 -4
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/v2/index.d.ts +2 -2
- package/build/plugins/resource/function/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/function/v2/index.js +2 -1
- package/build/plugins/resource/function/v2/index.js.map +1 -1
- package/build/plugins/resource/identity/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/index.js +1 -2
- package/build/plugins/resource/identity/index.js.map +1 -1
- package/build/plugins/resource/identity/v2/index.d.ts +2 -2
- package/build/plugins/resource/identity/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/v2/index.js +2 -1
- package/build/plugins/resource/identity/v2/index.js.map +1 -1
- package/build/plugins/resource/keyvault/plugin.d.ts.map +1 -1
- package/build/plugins/resource/keyvault/plugin.js +1 -2
- package/build/plugins/resource/keyvault/plugin.js.map +1 -1
- package/build/plugins/resource/keyvault/v2/index.d.ts +2 -2
- package/build/plugins/resource/keyvault/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/keyvault/v2/index.js +2 -1
- package/build/plugins/resource/keyvault/v2/index.js.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.d.ts +2 -2
- package/build/plugins/resource/localdebug/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.js +2 -1
- package/build/plugins/resource/localdebug/v2/index.js.map +1 -1
- package/build/plugins/resource/simpleauth/index.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/index.js +5 -5
- package/build/plugins/resource/simpleauth/index.js.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.js +2 -4
- package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.d.ts +2 -2
- package/build/plugins/resource/simpleauth/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.js +2 -1
- package/build/plugins/resource/simpleauth/v2/index.js.map +1 -1
- package/build/plugins/resource/spfx/v2/index.d.ts +2 -2
- package/build/plugins/resource/spfx/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/spfx/v2/index.js +2 -1
- package/build/plugins/resource/spfx/v2/index.js.map +1 -1
- package/build/plugins/resource/sql/config.d.ts +1 -0
- package/build/plugins/resource/sql/config.d.ts.map +1 -1
- package/build/plugins/resource/sql/config.js +1 -0
- package/build/plugins/resource/sql/config.js.map +1 -1
- package/build/plugins/resource/sql/constants.d.ts +3 -0
- package/build/plugins/resource/sql/constants.d.ts.map +1 -1
- package/build/plugins/resource/sql/constants.js +3 -0
- package/build/plugins/resource/sql/constants.js.map +1 -1
- package/build/plugins/resource/sql/errors.d.ts +1 -1
- package/build/plugins/resource/sql/errors.d.ts.map +1 -1
- package/build/plugins/resource/sql/errors.js +1 -1
- package/build/plugins/resource/sql/errors.js.map +1 -1
- package/build/plugins/resource/sql/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/index.js +10 -2
- package/build/plugins/resource/sql/index.js.map +1 -1
- package/build/plugins/resource/sql/managementClient.js +14 -14
- package/build/plugins/resource/sql/managementClient.js.map +1 -1
- package/build/plugins/resource/sql/plugin.d.ts +3 -0
- package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
- package/build/plugins/resource/sql/plugin.js +53 -13
- package/build/plugins/resource/sql/plugin.js.map +1 -1
- package/build/plugins/resource/sql/sqlClient.d.ts +2 -2
- package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
- package/build/plugins/resource/sql/sqlClient.js +13 -12
- package/build/plugins/resource/sql/sqlClient.js.map +1 -1
- package/build/plugins/resource/sql/v2/index.d.ts +2 -2
- package/build/plugins/resource/sql/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/v2/index.js +2 -1
- package/build/plugins/resource/sql/v2/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts +3 -3
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js +3 -3
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +6 -9
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +16 -2
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/checkPermission.js +1 -2
- package/build/plugins/solution/fx-solution/v2/checkPermission.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +2 -2
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +2 -4
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +3 -3
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/grantPermission.js +1 -2
- package/build/plugins/solution/fx-solution/v2/grantPermission.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js +6 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.js +10 -2
- package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +3 -3
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +6 -4
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +11 -5
- package/resource/strings.json +6 -1
- package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/botservice/bicep/botServiceProvision.template.bicep +34 -0
- package/templates/plugins/resource/botservice/bicep/parameters.json +4 -0
- package/templates/plugins/resource/botservice/bicep/provision.template.bicep +13 -0
- package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
- package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
- package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
- package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/plugins/resource/sql/bicep/newDatabase.orchestration.template.bicep +5 -0
- package/templates/plugins/resource/sql/bicep/newDatabaseProvision.template.bicep +15 -0
- package/templates/plugins/resource/sql/bicep/sqlProvision.template.bicep +1 -0
- package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +25 -0
- package/templates/plugins/resource/storage/bicep/provision.template.bicep +15 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param botEndpoint string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId'] // Read AAD app client id for Azure Bot Service from parameters
|
|
7
|
+
var botServiceName = contains(provisionParameters, 'botServiceName') ? provisionParameters['botServiceName'] : '${resourceBaseName}' // Try to read name for Azure Bot Service from parameters
|
|
8
|
+
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
9
|
+
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
10
|
+
|
|
11
|
+
// Register your web service as a bot with the Bot Framework
|
|
12
|
+
resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
13
|
+
kind: 'azurebot'
|
|
14
|
+
location: 'global'
|
|
15
|
+
name: botServiceName
|
|
16
|
+
properties: {
|
|
17
|
+
displayName: botDisplayName
|
|
18
|
+
endpoint: uri(botEndpoint, '/api/messages')
|
|
19
|
+
msaAppId: botAadAppClientId
|
|
20
|
+
}
|
|
21
|
+
sku: {
|
|
22
|
+
name: botServiceSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add botServiceSku property to provisionParameters to override the default value "F0".
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Connect the bot service to Microsoft Teams
|
|
27
|
+
resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
|
|
28
|
+
parent: botService
|
|
29
|
+
location: 'global'
|
|
30
|
+
name: 'MsTeamsChannel'
|
|
31
|
+
properties: {
|
|
32
|
+
channelName: 'MsTeamsChannel'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Resources for bot
|
|
2
|
+
module botProvision '\{{fx-resource-bot.Provision.botservice.path}}' = {
|
|
3
|
+
name: 'botProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
botEndpoint: \{{fx-resource-frontend-hosting.References.endpointAsParam}}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
output botOutput object = {
|
|
11
|
+
teamsFxPluginId: 'fx-resource-bot'
|
|
12
|
+
validDomain: \{{fx-resource-frontend-hosting.References.domainAsParam}}
|
|
13
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// database added with name suffix [{{suffix}}]
|
|
2
|
+
var sqlDatabaseName_{{suffix}} = contains(provisionParameters, 'sqlDatabaseName_{{suffix}}') ? provisionParameters['sqlDatabaseName_{{suffix}}'] : '${resourceBaseName}_{{suffix}}'
|
|
3
|
+
var sqlDatabaseSku_{{suffix}} = contains(provisionParameters, 'sqlDatabaseSku_{{suffix}}') ? provisionParameters['sqlDatabaseSku_{{suffix}}'] : 'Basic'
|
|
4
|
+
|
|
5
|
+
resource sqlDatabase_{{suffix}} 'Microsoft.Sql/servers/databases@2021-05-01-preview' = {
|
|
6
|
+
// parent should refer to resource symbolic name of SQL server
|
|
7
|
+
parent: sqlServer
|
|
8
|
+
location: resourceGroup().location
|
|
9
|
+
name: sqlDatabaseName_{{suffix}}
|
|
10
|
+
sku: {
|
|
11
|
+
name: sqlDatabaseSku_{{suffix}}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
output databaseName_{{suffix}} string = sqlDatabaseName_{{suffix}}
|
|
@@ -8,6 +8,7 @@ var administratorLogin = contains(provisionParameters, 'azureSqlAdmin') ? provis
|
|
|
8
8
|
var administratorLoginPassword = contains(provisionParameters, 'azureSqlAdminPassword') ? provisionParameters['azureSqlAdminPassword'] : '' // Try to read admin password for SQL Server from parameters, empty means do not update admin password
|
|
9
9
|
|
|
10
10
|
// SQL Server that hosts the databases
|
|
11
|
+
// The symbolic name of SQL Server will be referenced as parent when adding nmultiple databases
|
|
11
12
|
resource sqlServer 'Microsoft.Sql/servers@2021-05-01-preview' = {
|
|
12
13
|
location: resourceGroup().location
|
|
13
14
|
name: sqlServerName
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
4
|
+
var storageName = contains(provisionParameters, 'azureStorageName') ? provisionParameters['azureStorageName'] : '${resourceBaseName}tab' // Try to read name for frontend hosting Storage Account from parameters
|
|
5
|
+
var storageSku = contains(provisionParameters, 'azureStorageSku') ? provisionParameters['azureStorageSku'] : 'Standard_LRS' // Try to read SKU for frontend hosting Storage Account from parameters
|
|
6
|
+
|
|
7
|
+
// Azure Storage that hosts your static web site
|
|
8
|
+
resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
|
|
9
|
+
kind: 'StorageV2'
|
|
10
|
+
location: resourceGroup().location
|
|
11
|
+
name: storageName
|
|
12
|
+
properties: {
|
|
13
|
+
supportsHttpsTrafficOnly: true
|
|
14
|
+
}
|
|
15
|
+
sku: {
|
|
16
|
+
name: storageSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add frontendHostingStorageSku property to provisionParameters to override the default value "Standard_LRS".
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var siteDomain = replace(replace(storage.properties.primaryEndpoints.web, 'https://', ''), '/', '')
|
|
21
|
+
|
|
22
|
+
output resourceId string = storage.id
|
|
23
|
+
output endpoint string = 'https://${siteDomain}'
|
|
24
|
+
output domain string = siteDomain
|
|
25
|
+
output indexPath string = '/index.html#'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Resources for frontend hosting
|
|
2
|
+
module azureStorageProvision '\{{fx-resource-azure-storage.Provision.azureStorage.path}}' = {
|
|
3
|
+
name: 'azureStorageProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
output azureStorageOutput object = {
|
|
10
|
+
teamsFxPluginId: 'fx-resource-frontend-hosting'
|
|
11
|
+
domain: azureStorageProvision.outputs.domain
|
|
12
|
+
endpoint: azureStorageProvision.outputs.endpoint
|
|
13
|
+
indexPath: azureStorageProvision.outputs.indexPath
|
|
14
|
+
storageResourceId: azureStorageProvision.outputs.resourceId
|
|
15
|
+
}
|