Skill 3.1.4
Deploy infrastructure using Bicep templates and Azure CLI
Key Concepts
In Bicep, a Foundry resource is Microsoft.CognitiveServices/accounts with kind: 'AIServices', a managed identity, customSubDomainName, allowProjectManagement: true, publicNetworkAccess and disableLocalAuth. A project is the child resource accounts/projects, and a model deployment is accounts/deployments with a SKU such as GlobalStandard and a capacity, plus the model format, name and version. Role assignments and connections are declared in the same file.
With the Azure CLI, az cognitiveservices account create --kind AIServices --assign-identity --allow-project-management true creates the resource, az cognitiveservices account project create creates a project, and az cognitiveservices account deployment create creates a deployment. Project management must be enabled when the resource is created, and the resource needs a managed identity before projects can be added. GitHub Actions can run the same commands or deploy the Bicep file through OIDC.