This project shows how to create a Azure environment with Azure SQL. The creation of the SQL will use a Service Principal as Administrator, and a Function App Identity as the member of the SQL database.
All deployable via a script that uses Az CLI.
- You will require to install AZ cli
- You will require to intall PNP Powershell
For the project you will need a secret.json file. Create a Folder called 'Secrets'.
{
"Tenant" : "<Tenant>",
"Name": "SQLExample",
"AzureSubscription": "Visual Studio Enterprise with MSDN",
"Location": "uksouth",
"SQLDatabase": {
"AdminUser": "SQLAdminUser",
"Password": "[Random Password Required]",
"DatabaseName": "Example",
"SQLAdminAppPrincipalName": "SQLAdminAppPrincipal",
"SQLDBAccessGroup": "SQLGeneralUsersADGroup",
"SQLAdminADGroup": "SQLAdminADGroup"
}
}
- Change the <tenant> name to the name of your tenant. E.g, cfcode.
- Change the AzureSubscription to match with your Azure Subscription Name.
- Change the [Random Password Required] to a random password you wish to use.
This will install
cd .\Powershell
.\Install-SQL.ps1 -path:..\Secrets\secret.json