Code for blog post Securing your ASP.NET database access with Azure SQL and Azure pipelines
Install the latest .NET 5 SDK.
Windows:
scoop install dotnet-sdk
macOS:
brew install --cask dotnet-sdk
Migrate the database schema and start web host:
dotnet run --migrate
- Fork this repo.
- Create an Azure ARM service connection named SECURED_SQL_SAMPLE_ARM to the Azure subscription you want to use
- Create an Azure pipeline based on
./azure-pipelines.yml
- Set the following variables for the pipeline:
- resourceGroupName: the name of the resource group you want to deploy to. (Created automatically if not existing.)
- aadAdminLogin: the name of the Azure AD principal to be Azure SQL Server administrator (user or group)
- aadAdminOid: the object Id of the Azure AD principal to be Azure SQL Server administrator (user or group)