@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.
Files changed (253) hide show
  1. package/build/common/deps-checker/constant/message.d.ts +0 -1
  2. package/build/common/deps-checker/constant/message.d.ts.map +1 -1
  3. package/build/common/deps-checker/constant/message.js +0 -4
  4. package/build/common/deps-checker/constant/message.js.map +1 -1
  5. package/build/common/local/index.d.ts +1 -0
  6. package/build/common/local/index.d.ts.map +1 -1
  7. package/build/common/local/index.js +1 -0
  8. package/build/common/local/index.js.map +1 -1
  9. package/build/common/local/packageJsonHelper.d.ts +1 -0
  10. package/build/common/local/packageJsonHelper.d.ts.map +1 -1
  11. package/build/common/local/packageJsonHelper.js +29 -1
  12. package/build/common/local/packageJsonHelper.js.map +1 -1
  13. package/build/common/local/portChecker.d.ts.map +1 -1
  14. package/build/common/local/portChecker.js +18 -48
  15. package/build/common/local/portChecker.js.map +1 -1
  16. package/build/common/local/taskDefinition.js +1 -1
  17. package/build/common/local/taskDefinition.js.map +1 -1
  18. package/build/common/permissionInterface.d.ts +1 -0
  19. package/build/common/permissionInterface.d.ts.map +1 -1
  20. package/build/common/permissionInterface.js +1 -0
  21. package/build/common/permissionInterface.js.map +1 -1
  22. package/build/common/projectSettingsValidator.d.ts +4 -0
  23. package/build/common/projectSettingsValidator.d.ts.map +1 -0
  24. package/build/common/projectSettingsValidator.js +65 -0
  25. package/build/common/projectSettingsValidator.js.map +1 -0
  26. package/build/common/samples-config.json +24 -12
  27. package/build/common/samples.d.ts +1 -0
  28. package/build/common/samples.d.ts.map +1 -1
  29. package/build/common/samples.js +1 -0
  30. package/build/common/samples.js.map +1 -1
  31. package/build/common/templates-config.json +1 -1
  32. package/build/core/error.js +1 -1
  33. package/build/core/error.js.map +1 -1
  34. package/build/core/index.js +1 -1
  35. package/build/core/middleware/CommonErrorHandlerMW.d.ts +14 -0
  36. package/build/core/middleware/CommonErrorHandlerMW.d.ts.map +1 -0
  37. package/build/core/middleware/CommonErrorHandlerMW.js +55 -0
  38. package/build/core/middleware/CommonErrorHandlerMW.js.map +1 -0
  39. package/build/core/middleware/errorHandler.js +2 -1
  40. package/build/core/middleware/errorHandler.js.map +1 -1
  41. package/build/core/middleware/projectMigrator.js +1 -2
  42. package/build/core/middleware/projectMigrator.js.map +1 -1
  43. package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
  44. package/build/core/middleware/projectSettingsLoader.js +1 -1
  45. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  46. package/build/core/tools.d.ts.map +1 -1
  47. package/build/core/tools.js +2 -6
  48. package/build/core/tools.js.map +1 -1
  49. package/build/plugins/resource/aad/v2/index.d.ts +2 -2
  50. package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
  51. package/build/plugins/resource/aad/v2/index.js +2 -1
  52. package/build/plugins/resource/aad/v2/index.js.map +1 -1
  53. package/build/plugins/resource/apim/managers/apimManager.d.ts.map +1 -1
  54. package/build/plugins/resource/apim/managers/apimManager.js +2 -4
  55. package/build/plugins/resource/apim/managers/apimManager.js.map +1 -1
  56. package/build/plugins/resource/apim/managers/questionManager.d.ts +1 -1
  57. package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
  58. package/build/plugins/resource/apim/managers/questionManager.js +11 -9
  59. package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
  60. package/build/plugins/resource/apim/v2/index.d.ts +2 -2
  61. package/build/plugins/resource/apim/v2/index.d.ts.map +1 -1
  62. package/build/plugins/resource/apim/v2/index.js +2 -1
  63. package/build/plugins/resource/apim/v2/index.js.map +1 -1
  64. package/build/plugins/resource/appstudio/constants.d.ts +2 -0
  65. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  66. package/build/plugins/resource/appstudio/constants.js +71 -1
  67. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  68. package/build/plugins/resource/appstudio/manifestTemplate.js +2 -2
  69. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  70. package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
  71. package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
  72. package/build/plugins/resource/appstudio/v2/index.js +2 -1
  73. package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
  74. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
  75. package/build/plugins/resource/appstudio/v3/index.js +16 -2
  76. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  77. package/build/plugins/resource/bot/aadRegistration.d.ts.map +1 -1
  78. package/build/plugins/resource/bot/aadRegistration.js +5 -4
  79. package/build/plugins/resource/bot/aadRegistration.js.map +1 -1
  80. package/build/plugins/resource/bot/dotnet/constants.d.ts +5 -0
  81. package/build/plugins/resource/bot/dotnet/constants.d.ts.map +1 -0
  82. package/build/plugins/resource/bot/dotnet/constants.js +13 -0
  83. package/build/plugins/resource/bot/dotnet/constants.js.map +1 -0
  84. package/build/plugins/resource/bot/dotnet/plugin.d.ts +14 -0
  85. package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -0
  86. package/build/plugins/resource/bot/dotnet/plugin.js +62 -0
  87. package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -0
  88. package/build/plugins/resource/bot/index.d.ts +5 -0
  89. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  90. package/build/plugins/resource/bot/index.js +23 -13
  91. package/build/plugins/resource/bot/index.js.map +1 -1
  92. package/build/plugins/resource/bot/interface.d.ts +16 -0
  93. package/build/plugins/resource/bot/interface.d.ts.map +1 -0
  94. package/build/plugins/resource/bot/interface.js +5 -0
  95. package/build/plugins/resource/bot/interface.js.map +1 -0
  96. package/build/plugins/resource/bot/plugin.d.ts +2 -1
  97. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  98. package/build/plugins/resource/bot/plugin.js +2 -4
  99. package/build/plugins/resource/bot/plugin.js.map +1 -1
  100. package/build/plugins/resource/bot/v2/index.d.ts +2 -2
  101. package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
  102. package/build/plugins/resource/bot/v2/index.js +2 -1
  103. package/build/plugins/resource/bot/v2/index.js.map +1 -1
  104. package/build/plugins/resource/frontend/dotnet/constants.d.ts +7 -3
  105. package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
  106. package/build/plugins/resource/frontend/dotnet/constants.js +10 -6
  107. package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
  108. package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
  109. package/build/plugins/resource/frontend/dotnet/plugin.js +2 -4
  110. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  111. package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
  112. package/build/plugins/resource/frontend/interface.js +2 -0
  113. package/build/plugins/resource/frontend/interface.js.map +1 -1
  114. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  115. package/build/plugins/resource/frontend/plugin.js +2 -3
  116. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  117. package/build/plugins/resource/frontend/v2/index.d.ts +2 -2
  118. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  119. package/build/plugins/resource/frontend/v2/index.js +2 -1
  120. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  121. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.d.ts.map +1 -1
  122. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js +7 -7
  123. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js.map +1 -1
  124. package/build/plugins/resource/function/plugin.d.ts.map +1 -1
  125. package/build/plugins/resource/function/plugin.js +2 -4
  126. package/build/plugins/resource/function/plugin.js.map +1 -1
  127. package/build/plugins/resource/function/v2/index.d.ts +2 -2
  128. package/build/plugins/resource/function/v2/index.d.ts.map +1 -1
  129. package/build/plugins/resource/function/v2/index.js +2 -1
  130. package/build/plugins/resource/function/v2/index.js.map +1 -1
  131. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  132. package/build/plugins/resource/identity/index.js +1 -2
  133. package/build/plugins/resource/identity/index.js.map +1 -1
  134. package/build/plugins/resource/identity/v2/index.d.ts +2 -2
  135. package/build/plugins/resource/identity/v2/index.d.ts.map +1 -1
  136. package/build/plugins/resource/identity/v2/index.js +2 -1
  137. package/build/plugins/resource/identity/v2/index.js.map +1 -1
  138. package/build/plugins/resource/keyvault/plugin.d.ts.map +1 -1
  139. package/build/plugins/resource/keyvault/plugin.js +1 -2
  140. package/build/plugins/resource/keyvault/plugin.js.map +1 -1
  141. package/build/plugins/resource/keyvault/v2/index.d.ts +2 -2
  142. package/build/plugins/resource/keyvault/v2/index.d.ts.map +1 -1
  143. package/build/plugins/resource/keyvault/v2/index.js +2 -1
  144. package/build/plugins/resource/keyvault/v2/index.js.map +1 -1
  145. package/build/plugins/resource/localdebug/v2/index.d.ts +2 -2
  146. package/build/plugins/resource/localdebug/v2/index.d.ts.map +1 -1
  147. package/build/plugins/resource/localdebug/v2/index.js +2 -1
  148. package/build/plugins/resource/localdebug/v2/index.js.map +1 -1
  149. package/build/plugins/resource/simpleauth/index.d.ts.map +1 -1
  150. package/build/plugins/resource/simpleauth/index.js +5 -5
  151. package/build/plugins/resource/simpleauth/index.js.map +1 -1
  152. package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
  153. package/build/plugins/resource/simpleauth/plugin.js +2 -4
  154. package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
  155. package/build/plugins/resource/simpleauth/v2/index.d.ts +2 -2
  156. package/build/plugins/resource/simpleauth/v2/index.d.ts.map +1 -1
  157. package/build/plugins/resource/simpleauth/v2/index.js +2 -1
  158. package/build/plugins/resource/simpleauth/v2/index.js.map +1 -1
  159. package/build/plugins/resource/spfx/v2/index.d.ts +2 -2
  160. package/build/plugins/resource/spfx/v2/index.d.ts.map +1 -1
  161. package/build/plugins/resource/spfx/v2/index.js +2 -1
  162. package/build/plugins/resource/spfx/v2/index.js.map +1 -1
  163. package/build/plugins/resource/sql/config.d.ts +1 -0
  164. package/build/plugins/resource/sql/config.d.ts.map +1 -1
  165. package/build/plugins/resource/sql/config.js +1 -0
  166. package/build/plugins/resource/sql/config.js.map +1 -1
  167. package/build/plugins/resource/sql/constants.d.ts +3 -0
  168. package/build/plugins/resource/sql/constants.d.ts.map +1 -1
  169. package/build/plugins/resource/sql/constants.js +3 -0
  170. package/build/plugins/resource/sql/constants.js.map +1 -1
  171. package/build/plugins/resource/sql/errors.d.ts +1 -1
  172. package/build/plugins/resource/sql/errors.d.ts.map +1 -1
  173. package/build/plugins/resource/sql/errors.js +1 -1
  174. package/build/plugins/resource/sql/errors.js.map +1 -1
  175. package/build/plugins/resource/sql/index.d.ts.map +1 -1
  176. package/build/plugins/resource/sql/index.js +10 -2
  177. package/build/plugins/resource/sql/index.js.map +1 -1
  178. package/build/plugins/resource/sql/managementClient.js +14 -14
  179. package/build/plugins/resource/sql/managementClient.js.map +1 -1
  180. package/build/plugins/resource/sql/plugin.d.ts +3 -0
  181. package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
  182. package/build/plugins/resource/sql/plugin.js +53 -13
  183. package/build/plugins/resource/sql/plugin.js.map +1 -1
  184. package/build/plugins/resource/sql/sqlClient.d.ts +2 -2
  185. package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
  186. package/build/plugins/resource/sql/sqlClient.js +13 -12
  187. package/build/plugins/resource/sql/sqlClient.js.map +1 -1
  188. package/build/plugins/resource/sql/v2/index.d.ts +2 -2
  189. package/build/plugins/resource/sql/v2/index.d.ts.map +1 -1
  190. package/build/plugins/resource/sql/v2/index.js +2 -1
  191. package/build/plugins/resource/sql/v2/index.js.map +1 -1
  192. package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts +3 -3
  193. package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts.map +1 -1
  194. package/build/plugins/solution/fx-solution/ResourcePluginContainer.js +3 -3
  195. package/build/plugins/solution/fx-solution/ResourcePluginContainer.js.map +1 -1
  196. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  197. package/build/plugins/solution/fx-solution/arm.js +6 -9
  198. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  199. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
  200. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +16 -2
  201. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
  202. package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts.map +1 -1
  203. package/build/plugins/solution/fx-solution/v2/checkPermission.js +1 -2
  204. package/build/plugins/solution/fx-solution/v2/checkPermission.js.map +1 -1
  205. package/build/plugins/solution/fx-solution/v2/deploy.js +1 -1
  206. package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
  207. package/build/plugins/solution/fx-solution/v2/executeUserTask.js +2 -2
  208. package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
  209. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +1 -1
  210. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +2 -4
  211. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +1 -1
  212. package/build/plugins/solution/fx-solution/v2/getQuestions.js +3 -3
  213. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  214. package/build/plugins/solution/fx-solution/v2/grantPermission.js +1 -2
  215. package/build/plugins/solution/fx-solution/v2/grantPermission.js.map +1 -1
  216. package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +1 -1
  217. package/build/plugins/solution/fx-solution/v2/listCollaborator.js +6 -1
  218. package/build/plugins/solution/fx-solution/v2/listCollaborator.js.map +1 -1
  219. package/build/plugins/solution/fx-solution/v2/provision.js +1 -1
  220. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  221. package/build/plugins/solution/fx-solution/v2/provisionLocal.js +1 -1
  222. package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
  223. package/build/plugins/solution/fx-solution/v2/publish.js +1 -1
  224. package/build/plugins/solution/fx-solution/v2/publish.js.map +1 -1
  225. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  226. package/build/plugins/solution/fx-solution/v2/scaffolding.js +10 -2
  227. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  228. package/build/plugins/solution/fx-solution/v2/utils.d.ts +3 -3
  229. package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
  230. package/build/plugins/solution/fx-solution/v2/utils.js +6 -4
  231. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  232. package/package.json +11 -5
  233. package/resource/strings.json +6 -1
  234. package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
  235. package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
  236. package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
  237. package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
  238. package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
  239. package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
  240. package/templates/plugins/resource/botservice/bicep/botServiceProvision.template.bicep +34 -0
  241. package/templates/plugins/resource/botservice/bicep/parameters.json +4 -0
  242. package/templates/plugins/resource/botservice/bicep/provision.template.bicep +13 -0
  243. package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
  244. package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
  245. package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
  246. package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
  247. package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
  248. package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
  249. package/templates/plugins/resource/sql/bicep/newDatabase.orchestration.template.bicep +5 -0
  250. package/templates/plugins/resource/sql/bicep/newDatabaseProvision.template.bicep +15 -0
  251. package/templates/plugins/resource/sql/bicep/sqlProvision.template.bicep +1 -0
  252. package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +25 -0
  253. 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,4 @@
1
+ {
2
+ "botAadAppClientId": "{{state.fx-resource-bot.botId}}",
3
+ "botAadAppClientSecret": "{{state.fx-resource-bot.botPassword}}"
4
+ }
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ // output for database with name suffix [{{suffix}}]
2
+ output azureSqlOutput_{{suffix}} object = {
3
+ teamsFxPluginId: 'fx-resource-azure-sql'
4
+ databaseName_{{suffix}}: azureSqlProvision.outputs.databaseName_{{suffix}}
5
+ }
@@ -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
+ }