-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from Azure-Samples/refresh-functions-v3
Upgrade functions to v3
- Loading branch information
Showing
77 changed files
with
26,466 additions
and
10,332 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
param applicationName string = 'Rideshare' | ||
|
||
@allowed([ | ||
'centralus' | ||
'eastus2' | ||
'eastasia' | ||
'westeurope' | ||
'westus2' | ||
]) | ||
param staticWebAppLocation string | ||
param sqlAdminLogin string | ||
|
||
@secure() | ||
param sqlAdminPassword string | ||
param resourceTags object = { | ||
ProjectType: 'Azure Serverless Microservices' | ||
Purpose: 'Sample' | ||
} | ||
|
||
var location = resourceGroup().location | ||
var functionAppServicePlanName = '${applicationName}Plan' | ||
var keyVaultName = '${applicationName}KeyVault' | ||
var cosmosdbName = '${applicationName}Cosmos' | ||
var eventGridName = '${applicationName}TripExternalizations' | ||
var signalRName = applicationName | ||
var applicationInsightsName = '${applicationName}Insights' | ||
var apimName = '${applicationName}Apim' | ||
var sqlServerName = '${applicationName}-db' | ||
var staticWebAppName = '${applicationName}Web' | ||
var storageAccountName = take(toLower(replace('${applicationName}func', '-', '')), 24) | ||
var functionsApps = [ | ||
'Trips' | ||
'Drivers' | ||
'Passengers' | ||
'TripArchiver' | ||
'Orchestrators' | ||
] | ||
|
||
module cosmos 'modules/cosmosdb.bicep' = { | ||
name: cosmosdbName | ||
params: { | ||
accountName: cosmosdbName | ||
location: location | ||
databaseName: applicationName | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module sqlDb 'modules/sqldb.bicep' = { | ||
name: 'sqldb' | ||
params: { | ||
sqlServerName: sqlServerName | ||
sqlDatabaeName: applicationName | ||
administratorLogin: sqlAdminLogin | ||
administratorPassword: sqlAdminPassword | ||
location: location | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module eventGrid 'modules/eventgrid.bicep' = { | ||
name: eventGridName | ||
params: { | ||
eventGridTopicName: eventGridName | ||
location: location | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module signalR 'modules/signalr.bicep' = { | ||
name: signalRName | ||
params: { | ||
signalRName: signalRName | ||
location: location | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module applicationInsights 'modules/applicationInsights.bicep' = { | ||
name: applicationInsightsName | ||
params: { | ||
applicationInsightsName: applicationInsightsName | ||
location: location | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module apim 'modules/apim.bicep' = { | ||
name: apimName | ||
params: { | ||
apimName: apimName | ||
appInsightsName: applicationInsights.outputs.appInsightsName | ||
appInsightsInstrumentationKey: applicationInsights.outputs.appInsightsInstrumentationKey | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module staticeWebApp 'modules/staticwebapp.bicep' = { | ||
name: staticWebAppName | ||
params: { | ||
staticWebAppName: staticWebAppName | ||
location: staticWebAppLocation | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module functions 'modules/functions.bicep' = { | ||
name: 'functions' | ||
params: { | ||
storageAccountName: storageAccountName | ||
functionAppPrefix: applicationName | ||
functionApps: functionsApps | ||
appServicePlanName: functionAppServicePlanName | ||
location: location | ||
staticWebAppURL: staticeWebApp.outputs.staticWebAppURL | ||
appInsightsInstrumentationKey: applicationInsights.outputs.appInsightsInstrumentationKey | ||
resourceTags: resourceTags | ||
} | ||
} | ||
|
||
module keyVault 'modules/keyvault.bicep' = { | ||
name: keyVaultName | ||
params: { | ||
keyVaultName: keyVaultName | ||
functionAppPrefix: applicationName | ||
functionApps: functionsApps | ||
resourceTags: resourceTags | ||
} | ||
dependsOn: [ | ||
functions | ||
] | ||
} | ||
|
Oops, something went wrong.