@@ -25,26 +25,12 @@ var appServicePlanName = 'az-${resourcePrefix}-plan-${resourceToken}'
2525// App Service name
2626var appServiceName = 'az-${resourcePrefix }-app-${resourceToken }'
2727
28- // User-assigned managed identity name
29- var managedIdentityName = 'az-${resourcePrefix }-mi-${resourceToken }'
30-
31- // Create User-assigned Managed Identity
32- resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
33- name : managedIdentityName
34- location : location
35- tags : {
36- 'azd-env-name' : environmentName
37- 'azd-service-name' : 'todo-app'
38- }
39- }
40-
4128// Create App Service Plan (P0V3 Linux)
4229resource appServicePlan 'Microsoft.Web/serverfarms@2024-04-01' = {
4330 name : appServicePlanName
4431 location : location
4532 tags : {
4633 'azd-env-name' : environmentName
47- 'azd-service-name' : 'todo-app'
4834 }
4935 sku : {
5036 name : 'P0v3'
@@ -68,17 +54,15 @@ resource appService 'Microsoft.Web/sites@2024-04-01' = {
6854 'azd-service-name' : 'todo-app'
6955 }
7056 identity : {
71- type : 'UserAssigned'
72- userAssignedIdentities : {
73- '${managedIdentity .id }' : {}
74- }
57+ type : 'SystemAssigned'
7558 }
7659 properties : {
7760 serverFarmId : appServicePlan .id
7861 reserved : true
7962 httpsOnly : true
8063 siteConfig : {
8164 linuxFxVersion : 'PYTHON|3.12'
65+ appCommandLine : 'bash startup.sh'
8266 appSettings : [
8367 {
8468 name : 'SECRET_KEY'
@@ -110,6 +94,6 @@ resource appService 'Microsoft.Web/sites@2024-04-01' = {
11094// Outputs
11195output RESOURCE_GROUP_ID string = resourceGroup ().id
11296output AZURE_LOCATION string = location
113- output SERVICE_TODO_APP_IDENTITY_PRINCIPAL_ID string = managedIdentity . properties .principalId
97+ output SERVICE_TODO_APP_IDENTITY_PRINCIPAL_ID string = appService . identity .principalId
11498output SERVICE_TODO_APP_NAME string = appService .name
11599output SERVICE_TODO_APP_URI string = 'https://${appService .properties .defaultHostName }'
0 commit comments