@microsoft/teamsfx-core 1.0.0 → 1.0.1-alpha.389dbb3f.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/armInterface.d.ts +6 -11
- package/build/common/armInterface.d.ts.map +1 -1
- package/build/common/tools.d.ts +2 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +1 -5
- package/build/common/tools.js.map +1 -1
- package/build/core/error.d.ts +1 -0
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +5 -1
- package/build/core/error.js.map +1 -1
- package/build/core/index.d.ts +1 -0
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +46 -4
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +23 -2
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/envInfoWriter.d.ts.map +1 -1
- package/build/core/middleware/envInfoWriter.js +2 -0
- package/build/core/middleware/envInfoWriter.js.map +1 -1
- package/build/core/middleware/projectMigrator.js +1 -1
- 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 -0
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/plugins/resource/aad/index.d.ts +2 -3
- package/build/plugins/resource/aad/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/index.js.map +1 -1
- package/build/plugins/resource/aad/v2/index.d.ts +3 -0
- package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v2/index.js +9 -0
- package/build/plugins/resource/aad/v2/index.js.map +1 -1
- package/build/plugins/resource/apim/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +16 -6
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/interfaces/IAppDefinition.d.ts +6 -2
- package/build/plugins/resource/appstudio/interfaces/IAppDefinition.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +123 -36
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -0
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js +1 -0
- package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.d.ts +4 -2
- package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +9 -3
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/frontend/index.d.ts +1 -2
- package/build/plugins/resource/frontend/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/index.js.map +1 -1
- package/build/plugins/resource/function/enums.d.ts +1 -0
- package/build/plugins/resource/function/enums.d.ts.map +1 -1
- package/build/plugins/resource/function/enums.js +1 -0
- package/build/plugins/resource/function/enums.js.map +1 -1
- package/build/plugins/resource/function/index.d.ts +1 -0
- package/build/plugins/resource/function/index.d.ts.map +1 -1
- package/build/plugins/resource/function/index.js +5 -0
- package/build/plugins/resource/function/index.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts +1 -0
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +20 -2
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/identity/v2/index.d.ts +2 -1
- package/build/plugins/resource/identity/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/v2/index.js +3 -0
- package/build/plugins/resource/identity/v2/index.js.map +1 -1
- package/build/plugins/resource/index.d.ts +1 -0
- package/build/plugins/resource/index.d.ts.map +1 -1
- package/build/plugins/resource/index.js +1 -0
- package/build/plugins/resource/index.js.map +1 -1
- package/build/plugins/resource/keyvault/constants.d.ts +35 -0
- package/build/plugins/resource/keyvault/constants.d.ts.map +1 -0
- package/build/plugins/resource/keyvault/constants.js +42 -0
- package/build/plugins/resource/keyvault/constants.js.map +1 -0
- package/build/plugins/resource/keyvault/index.d.ts +14 -0
- package/build/plugins/resource/keyvault/index.d.ts.map +1 -0
- package/build/plugins/resource/keyvault/index.js +60 -0
- package/build/plugins/resource/keyvault/index.js.map +1 -0
- package/build/plugins/resource/keyvault/plugin.d.ts +6 -0
- package/build/plugins/resource/keyvault/plugin.d.ts.map +1 -0
- package/build/plugins/resource/keyvault/plugin.js +31 -0
- package/build/plugins/resource/keyvault/plugin.js.map +1 -0
- package/build/plugins/resource/keyvault/result.d.ts +9 -0
- package/build/plugins/resource/keyvault/result.d.ts.map +1 -0
- package/build/plugins/resource/keyvault/result.js +21 -0
- package/build/plugins/resource/keyvault/result.js.map +1 -0
- package/build/plugins/resource/keyvault/utils/telemetry.d.ts +17 -0
- package/build/plugins/resource/keyvault/utils/telemetry.d.ts.map +1 -0
- package/build/plugins/resource/keyvault/utils/telemetry.js +45 -0
- package/build/plugins/resource/keyvault/utils/telemetry.js.map +1 -0
- package/build/plugins/resource/localdebug/localEnvMulti.d.ts +0 -2
- package/build/plugins/resource/localdebug/localEnvMulti.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/localEnvMulti.js +0 -4
- package/build/plugins/resource/localdebug/localEnvMulti.js.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.js +2 -2
- package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.d.ts +7 -6
- package/build/plugins/resource/simpleauth/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.js +12 -6
- package/build/plugins/resource/simpleauth/v2/index.js.map +1 -1
- package/build/plugins/resource/utils4v2.d.ts +8 -8
- package/build/plugins/resource/utils4v2.d.ts.map +1 -1
- package/build/plugins/resource/utils4v2.js +26 -1
- package/build/plugins/resource/utils4v2.js.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts +1 -0
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js +1 -0
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts +5 -3
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +72 -32
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +2 -2
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +2 -1
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +10 -3
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.d.ts +2 -4
- package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +60 -565
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/adaptor.d.ts +11 -1
- package/build/plugins/solution/fx-solution/v2/adaptor.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/adaptor.js +82 -9
- package/build/plugins/solution/fx-solution/v2/adaptor.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts +5 -0
- package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/checkPermission.js +185 -0
- package/build/plugins/solution/fx-solution/v2/checkPermission.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.d.ts +24 -0
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.js +110 -0
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +14 -10
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executor.d.ts +1 -0
- package/build/plugins/solution/fx-solution/v2/executor.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executor.js +17 -1
- package/build/plugins/solution/fx-solution/v2/executor.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts +1 -0
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +12 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +5 -8
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/grantPermission.d.ts +5 -0
- package/build/plugins/solution/fx-solution/v2/grantPermission.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/grantPermission.js +205 -0
- package/build/plugins/solution/fx-solution/v2/grantPermission.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/listAllCollaborators.d.ts +5 -0
- package/build/plugins/solution/fx-solution/v2/listAllCollaborators.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/listAllCollaborators.js +118 -0
- package/build/plugins/solution/fx-solution/v2/listAllCollaborators.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts +8 -0
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js +202 -0
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +38 -9
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.js +8 -0
- package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +3 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +6 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +5 -3
- package/resource/strings.json +1 -0
- package/templates/azure/config.bicep +1 -13
- package/templates/azure/provision.bicep +8 -36
- package/templates/azure/teamsFx/bot.bicep +34 -0
- package/templates/plugins/resource/bot/bicep/botConfiguration.template.bicep +10 -0
- package/templates/plugins/resource/function/bicep/functionConfiguration.template.bicep +5 -0
- package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +54 -0
- package/templates/plugins/resource/keyvault/bicep/provision.template.bicep +13 -0
- package/templates/plugins/resource/simpleauth/bicep/simpleAuthConfiguration.template.bicep +5 -0
- package/templates/azure/provision/function.bicep +0 -79
- package/templates/azure/provision/identity.bicep +0 -14
|
@@ -14,19 +14,19 @@ output frontendHostingOutput object = {
|
|
|
14
14
|
endpoint: frontendHostingProvision.outputs.endpoint
|
|
15
15
|
storageResourceId: frontendHostingProvision.outputs.resourceId
|
|
16
16
|
}
|
|
17
|
-
// Resources for
|
|
18
|
-
module
|
|
19
|
-
name: '
|
|
17
|
+
// Resources for Simple Auth
|
|
18
|
+
module simpleAuthProvision './provision/simpleAuth.bicep' = {
|
|
19
|
+
name: 'simpleAuthProvision'
|
|
20
20
|
params: {
|
|
21
21
|
provisionParameters: provisionParameters
|
|
22
|
+
userAssignedIdentityId: userAssignedIdentityProvision.outputs.identityResourceId
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
output
|
|
26
|
-
teamsFxPluginId: 'fx-resource-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
identityClientId: userAssignedIdentityProvision.outputs.identityClientId
|
|
26
|
+
output simpleAuthOutput object = {
|
|
27
|
+
teamsFxPluginId: 'fx-resource-simple-auth'
|
|
28
|
+
endpoint: simpleAuthProvision.outputs.endpoint
|
|
29
|
+
webAppResourceId: simpleAuthProvision.outputs.webAppResourceId
|
|
30
30
|
}
|
|
31
31
|
// Resources for Azure SQL
|
|
32
32
|
module azureSqlProvision './provision/azureSql.bicep' = {
|
|
@@ -41,32 +41,4 @@ output azureSqlOutput object = {
|
|
|
41
41
|
sqlResourceId: azureSqlProvision.outputs.resourceId
|
|
42
42
|
sqlEndpoint: azureSqlProvision.outputs.sqlEndpoint
|
|
43
43
|
databaseName: azureSqlProvision.outputs.databaseName
|
|
44
|
-
}
|
|
45
|
-
// Resources for Azure Functions
|
|
46
|
-
module functionProvision './provision/function.bicep' = {
|
|
47
|
-
name: 'functionProvision'
|
|
48
|
-
params: {
|
|
49
|
-
provisionParameters: provisionParameters
|
|
50
|
-
userAssignedIdentityId: userAssignedIdentityProvision.outputs.identityResourceId
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
output functionOutput object = {
|
|
55
|
-
teamsFxPluginId: 'fx-resource-function'
|
|
56
|
-
functionAppResourceId: functionProvision.outputs.functionAppResourceId
|
|
57
|
-
functionEndpoint: functionProvision.outputs.functionEndpoint
|
|
58
|
-
}
|
|
59
|
-
// Resources for Simple Auth
|
|
60
|
-
module simpleAuthProvision './provision/simpleAuth.bicep' = {
|
|
61
|
-
name: 'simpleAuthProvision'
|
|
62
|
-
params: {
|
|
63
|
-
provisionParameters: provisionParameters
|
|
64
|
-
userAssignedIdentityId: userAssignedIdentityProvision.outputs.identityResourceId
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
output simpleAuthOutput object = {
|
|
69
|
-
teamsFxPluginId: 'fx-resource-simple-auth'
|
|
70
|
-
endpoint: simpleAuthProvision.outputs.endpoint
|
|
71
|
-
webAppResourceId: simpleAuthProvision.outputs.webAppResourceId
|
|
72
44
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Auto generated content, please customize files under provision folder
|
|
2
|
+
|
|
3
|
+
@secure()
|
|
4
|
+
param provisionParameters object
|
|
5
|
+
param provisionOutputs object
|
|
6
|
+
@secure()
|
|
7
|
+
param currentAppSettings object
|
|
8
|
+
|
|
9
|
+
var botWebAppName = split(provisionOutputs.botOutput.value.botWebAppResourceId, '/')[8]
|
|
10
|
+
var m365ClientId = provisionParameters['m365ClientId']
|
|
11
|
+
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
12
|
+
var m365TenantId = provisionParameters['m365TenantId']
|
|
13
|
+
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
14
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId']
|
|
15
|
+
var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
16
|
+
|
|
17
|
+
var botId = provisionParameters['botAadAppClientId']
|
|
18
|
+
|
|
19
|
+
var m365ApplicationIdUri = 'api://${provisionOutputs.frontendHostingOutput.value.domain}/botid-${botId}'
|
|
20
|
+
|
|
21
|
+
resource botWebAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
22
|
+
name: '${botWebAppName}/appsettings'
|
|
23
|
+
properties: union({
|
|
24
|
+
INITIATE_LOGIN_ENDPOINT: uri(provisionOutputs.botOutput.value.siteEndpoint, 'auth-start.html')
|
|
25
|
+
M365_AUTHORITY_HOST: m365OauthAuthorityHost
|
|
26
|
+
M365_CLIENT_ID: m365ClientId
|
|
27
|
+
M365_CLIENT_SECRET: m365ClientSecret
|
|
28
|
+
M365_TENANT_ID: m365TenantId
|
|
29
|
+
M365_APPLICATION_ID_URI: m365ApplicationIdUri
|
|
30
|
+
BOT_ID: botAadAppClientId
|
|
31
|
+
BOT_PASSWORD: botAadAppClientSecret
|
|
32
|
+
IDENTITY_ID: provisionOutputs.identityOutput.value.identityClientId
|
|
33
|
+
}, currentAppSettings)
|
|
34
|
+
}
|
|
@@ -8,11 +8,21 @@ param currentAppSettings object
|
|
|
8
8
|
|
|
9
9
|
var botWebAppName = split(provisionOutputs.botOutput.value.botWebAppResourceId, '/')[8]
|
|
10
10
|
var m365ClientId = provisionParameters['m365ClientId']
|
|
11
|
+
{{#contains 'fx-resource-key-vault' Plugins}}
|
|
12
|
+
var m365ClientSecret = {{../PluginOutput.fx-resource-key-vault.References.m365ClientSecretReference}}
|
|
13
|
+
{{/contains}}
|
|
14
|
+
{{#notContains 'fx-resource-key-vault' Plugins}}
|
|
11
15
|
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
16
|
+
{{/notContains}}
|
|
12
17
|
var m365TenantId = provisionParameters['m365TenantId']
|
|
13
18
|
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
14
19
|
var botAadAppClientId = provisionParameters['botAadAppClientId']
|
|
20
|
+
{{#contains 'fx-resource-key-vault' Plugins}}
|
|
21
|
+
var botAadAppClientSecret = {{../PluginOutput.fx-resource-key-vault.References.botClientSecretReference}}
|
|
22
|
+
{{/contains}}
|
|
23
|
+
{{#notContains 'fx-resource-key-vault' Plugins}}
|
|
15
24
|
var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
25
|
+
{{/notContains}}
|
|
16
26
|
|
|
17
27
|
var botId = provisionParameters['botAadAppClientId']
|
|
18
28
|
|
|
@@ -11,7 +11,12 @@ param currentAppSettings object
|
|
|
11
11
|
var functionAppName = split({{PluginOutput.fx-resource-function.References.functionAppResourceId}}, '/')[8]
|
|
12
12
|
|
|
13
13
|
var m365ClientId = provisionParameters['m365ClientId']
|
|
14
|
+
{{#contains 'fx-resource-key-vault' Plugins}}
|
|
15
|
+
var m365ClientSecret = {{../PluginOutput.fx-resource-key-vault.References.m365ClientSecretReference}}
|
|
16
|
+
{{/contains}}
|
|
17
|
+
{{#notContains 'fx-resource-key-vault' Plugins}}
|
|
14
18
|
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
19
|
+
{{/notContains}}
|
|
15
20
|
var m365TenantId = provisionParameters['m365TenantId']
|
|
16
21
|
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
17
22
|
var oauthAuthority = uri(m365OauthAuthorityHost, m365TenantId)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param userAssignedIdentityObjectId string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var keyVaultName = contains(provisionParameters, 'keyVaultName') ? provisionParameters['keyVaultName'] : '${resourceBaseName}'
|
|
7
|
+
var tenantId = subscription().tenantId
|
|
8
|
+
var m365ClientSecretName = 'm365ClientSecret'
|
|
9
|
+
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
10
|
+
var botClientSecretName = 'botClientSecret'
|
|
11
|
+
var botClientSecret = contains(provisionParameters, 'botAadAppClientSecret') ? provisionParameters['botAadAppClientSecret'] : ''
|
|
12
|
+
var keyVaultSkuName = contains(provisionParameters, 'keyVaultSkuName') ? provisionParameters['keyVaultSkuName'] : 'standard'
|
|
13
|
+
|
|
14
|
+
resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
|
|
15
|
+
name: keyVaultName
|
|
16
|
+
location: resourceGroup().location
|
|
17
|
+
properties: {
|
|
18
|
+
tenantId: tenantId
|
|
19
|
+
accessPolicies: [
|
|
20
|
+
{
|
|
21
|
+
tenantId: tenantId
|
|
22
|
+
objectId: userAssignedIdentityObjectId
|
|
23
|
+
permissions: {
|
|
24
|
+
secrets: [
|
|
25
|
+
'get'
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
sku: {
|
|
31
|
+
name: keyVaultSkuName // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add "keyVaultSkuName" property to provisionParameters to override the default value "standard".
|
|
32
|
+
family: 'A'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
resource clientSecretKv 'Microsoft.KeyVault/vaults/secrets@2019-09-01' = if (length(m365ClientSecret) != 0) {
|
|
38
|
+
parent: keyVault
|
|
39
|
+
name: m365ClientSecretName
|
|
40
|
+
properties: {
|
|
41
|
+
value: m365ClientSecret
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
resource botClientSecretKv 'Microsoft.KeyVault/vaults/secrets@2019-09-01' = if (length(botClientSecret) != 0) {
|
|
46
|
+
parent: keyVault
|
|
47
|
+
name: botClientSecretName
|
|
48
|
+
properties: {
|
|
49
|
+
value: botClientSecret
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
output m365ClientSecretReference string = '@Microsoft.KeyVault(VaultName=${keyVaultName};SecretName=${m365ClientSecretName})'
|
|
54
|
+
output botClientSecretReference string = '@Microsoft.KeyVault(VaultName=${keyVaultName};SecretName=${botClientSecretName})'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Resources for Azure Key Vault
|
|
2
|
+
module keyVaultProvision '{{PluginOutput.fx-resource-key-vault.Provision.keyVault.ProvisionPath}}' = {
|
|
3
|
+
name: 'keyVaultProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
userAssignedIdentityObjectId: {{PluginOutput.fx-resource-identity.References.identityPrincipalId}}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
output keyVaultOutput object = {
|
|
11
|
+
m365ClientSecretReference: keyVaultProvision.outputs.m365ClientSecretReference
|
|
12
|
+
botClientSecretReference: keyVaultProvision.outputs.botClientSecretReference
|
|
13
|
+
}
|
|
@@ -9,7 +9,12 @@ param currentAppSettings object
|
|
|
9
9
|
var webAppName = split(provisionOutputs.simpleAuthOutput.value.webAppResourceId, '/')[8]
|
|
10
10
|
|
|
11
11
|
var m365ClientId = provisionParameters['m365ClientId']
|
|
12
|
+
{{#contains 'fx-resource-key-vault' Plugins}}
|
|
13
|
+
var m365ClientSecret = {{../PluginOutput.fx-resource-key-vault.References.m365ClientSecretReference}}
|
|
14
|
+
{{/contains}}
|
|
15
|
+
{{#notContains 'fx-resource-key-vault' Plugins}}
|
|
12
16
|
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
17
|
+
{{/notContains}}
|
|
13
18
|
var m365TenantId = provisionParameters['m365TenantId']
|
|
14
19
|
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
15
20
|
var oauthAuthority = uri(m365OauthAuthorityHost, m365TenantId)
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
@secure()
|
|
2
|
-
param provisionParameters object
|
|
3
|
-
param userAssignedIdentityId string
|
|
4
|
-
|
|
5
|
-
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
-
var serverfarmsName = contains(provisionParameters, 'functionServerfarmsName') ? provisionParameters['functionServerfarmsName'] : '${resourceBaseName}api'
|
|
7
|
-
var serverfarmsSku = contains(provisionParameters, 'functionServerfarmsSku') ? provisionParameters['functionServerfarmsSku'] : 'Y1'
|
|
8
|
-
var functionAppName = contains(provisionParameters, 'functionWebappName') ? provisionParameters['functionWebappName'] : '${resourceBaseName}api'
|
|
9
|
-
var storageName = contains(provisionParameters, 'functionStorageName') ? provisionParameters['functionStorageName'] : '${resourceBaseName}api'
|
|
10
|
-
var storageSku = contains(provisionParameters, 'functionStorageSku') ? provisionParameters['functionStorageSku'] : 'Standard_LRS'
|
|
11
|
-
|
|
12
|
-
resource serverfarms 'Microsoft.Web/serverfarms@2021-02-01' = {
|
|
13
|
-
name: serverfarmsName
|
|
14
|
-
kind: 'functionapp'
|
|
15
|
-
location: resourceGroup().location
|
|
16
|
-
sku: {
|
|
17
|
-
name: serverfarmsSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add functionServerfarmsSku property to provisionParameters to override the default value "Y1".
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
22
|
-
name: functionAppName
|
|
23
|
-
kind: 'functionapp'
|
|
24
|
-
location: resourceGroup().location
|
|
25
|
-
properties: {
|
|
26
|
-
serverFarmId: serverfarms.id
|
|
27
|
-
keyVaultReferenceIdentity: userAssignedIdentityId
|
|
28
|
-
siteConfig: {
|
|
29
|
-
appSettings: [
|
|
30
|
-
{
|
|
31
|
-
name: 'AzureWebJobsDashboard'
|
|
32
|
-
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}'
|
|
33
|
-
}
|
|
34
|
-
{
|
|
35
|
-
name: 'AzureWebJobsStorage'
|
|
36
|
-
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}'
|
|
37
|
-
}
|
|
38
|
-
{
|
|
39
|
-
name: 'FUNCTIONS_EXTENSION_VERSION'
|
|
40
|
-
value: '~3'
|
|
41
|
-
}
|
|
42
|
-
{
|
|
43
|
-
name: 'FUNCTIONS_WORKER_RUNTIME'
|
|
44
|
-
value: 'node'
|
|
45
|
-
}
|
|
46
|
-
{
|
|
47
|
-
name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
|
|
48
|
-
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}'
|
|
49
|
-
}
|
|
50
|
-
{
|
|
51
|
-
name: 'WEBSITE_RUN_FROM_PACKAGE'
|
|
52
|
-
value: '1'
|
|
53
|
-
}
|
|
54
|
-
{
|
|
55
|
-
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
56
|
-
value: '~14'
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
identity: {
|
|
62
|
-
type: 'UserAssigned'
|
|
63
|
-
userAssignedIdentities: {
|
|
64
|
-
'${userAssignedIdentityId}': {}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
|
|
70
|
-
name: storageName
|
|
71
|
-
kind: 'StorageV2'
|
|
72
|
-
location: resourceGroup().location
|
|
73
|
-
sku: {
|
|
74
|
-
name: storageSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add functionStorageSku property to provisionParameters to override the default value "Standard_LRS".
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
output functionEndpoint string = 'https://${functionApp.properties.defaultHostName}'
|
|
79
|
-
output functionAppResourceId string = functionApp.id
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
@secure()
|
|
2
|
-
param provisionParameters object
|
|
3
|
-
var resourceBaseName = provisionParameters.resourceBaseName
|
|
4
|
-
var identityName = contains(provisionParameters, 'userAssignedIdentityName') ? provisionParameters['userAssignedIdentityName'] : '${resourceBaseName}'
|
|
5
|
-
|
|
6
|
-
resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
|
|
7
|
-
name: identityName
|
|
8
|
-
location: resourceGroup().location
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
output identityName string = identityName
|
|
12
|
-
output identityClientId string = managedIdentity.properties.clientId
|
|
13
|
-
output identityResourceId string = managedIdentity.id
|
|
14
|
-
output identityPrincipalId string = managedIdentity.properties.principalId
|