Basic Azure App Service and Azure SQL Database deployment example using Powershell and git
- Powershell 7+
- Azure Powershell Extensions - See Install instructions
- git for Windows
- MSBuild or Visual Studio
- VS Code - Recommended, but not required.
- NuGet CLI - v5+ requires .NET Framework 4.8, use 4.x for older projects.
The user you use to run this script will need the following permissions on the subscription you wish to deploy the resources to (minimum):
- Managed Application Contributor Role
- Sql Server Contributor
- Network Contributor
- Open the
app-service-config.psd1
file in your favorite text editor (VS Code recommended!). You'll want to set all the values in this file. All fields are required. Once you have finished save this file, and launch your Powershell prompt. - Login to your Azure tenant in powershell using
Connect-AzAccount -Tenant '00000000-0000-0000-0000-000000000000'
with your tenant id - Run the Powershell script from your powershell prompt. 1
Footnotes
-
Recommended that you DO NOT use Powershell ISE, we have seen issues with session problems, and issues with Azure Powershell commands not completing using Powershell ISE. Use either a raw terminal session, or VS Code command window. ↩