Created
February 10, 2023 06:53
-
-
Save papeMK2/dda8502d948d733bb9066f12c582f217 to your computer and use it in GitHub Desktop.
Create app service and add app configuration data reader role.
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
resource plan 'Microsoft.Web/serverfarms@2022-03-01' = { | |
name: 'plan-demo-lab' | |
location: resourceGroup().location | |
kind: 'app' | |
sku: { | |
name: 'B1' | |
} | |
} | |
resource app 'Microsoft.Web/sites@2022-03-01' = { | |
name: 'app-demo' | |
location: resourceGroup().location | |
kind: 'app' | |
identity: { | |
type: 'SystemAssigned' | |
} | |
properties: { | |
serverFarmId: plan.id | |
} | |
} | |
var roleDefinitionAppConfigurationDataReader = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '516239f1-63e1-4d78-a4de-a74fb236a071') | |
resource managedId 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = { | |
name: guid(app.name, app.id, roleDefinitionAppConfigurationDataReader) | |
properties: { | |
principalId: app.identity.principalId | |
principalType: 'ServicePrincipal' | |
roleDefinitionId: roleDefinitionAppConfigurationDataReader | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment