-
Notifications
You must be signed in to change notification settings - Fork 5
Instructions 00 Azure Services
The following Azure Service are used in the CodeBreaker Light solution:
- Cosmos DB
- Container Registry
- Container Apps
- Log Analytics
- Application Insights

To create this resources, we can use bicep-scripts.
In /infrastructure/bicep you can find the bicep-scripts for the resources listed above.
The bicep-script _main.bicep combines the other bicep-scripts and is responsible for deploying all necessary Azure resources.
_main.bicep requires the following parameters:
- userPrincipalIds (array) - The principal-ids (GUIDs) of the developer-accounts needing access to Azure resources from their local machine.
To get the principal-id of your account runaz ad signed-in-user show --query idin your commandline. - applyFreeTiers (bool) - Whether free tiers should be applied or not.
Some Azure services only allow one free instance per subscription. - suffix (string) - The suffix used for resources, where a name collision might occur.
A bicep script can be deployed using different ways.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-cli
Login to Azure CLI (if not already).
az login
Deploy a bicep script to a resource group with default parameter values.
az deployment group create --resource-group <resource-group-name> --template-file <path-to-bicep>
Parameters can be specified using the --parameters flag.
az deployment group create --resource-group <resource-group-name> --template-file <path-to-bicep> --parameters parameter1=value1 parameter2=value2
PowerShell: az deployment group create --resource-group <resource-group-name> --template-file _main.bicep --parameters userPrincipalIds="['00000000-0000-0000-0000-000000000000']" applyFreeTiers=true suffix=mysuffix43921
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-vscode
In VS Code we can deploy a bicep script by right clicking a bicep script and clicking on Deploy bicep file....
VS Code will ask for input necessary to deploy the bicep script.