Fiche 1 — Azure CLI indispensable
az login
az account show
az account set --subscription "Production"
az account list -o table
az group create --name RG-App --location francecentral
az group list -o table
az vm create --resource-group RG-Compute --name VM-Web01 --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys
az vm list -o table
az vm deallocate --resource-group RG-Compute --name VM-Web01
az network vnet create --resource-group RG-Net --name VNet-Hub --address-prefix 10.1.0.0/16
az storage account create --name sthorizon5app --resource-group RG-Data --sku Standard_GRS --kind StorageV2 --location francecentral
az role assignment create --assignee user@contoso.com --role Contributor --resource-group RG-App
az deployment group create --resource-group RG-App --template-file azuredeploy.json
az monitor metrics alert create --name Alert-CPU --resource-group RG-Monitor --scopes ID-VM --condition "avg Percentage CPU > 80"
Équivalences PowerShell (module Az)
Connect-AzAccount
New-AzResourceGroup -Name RG-App -Location francecentral
New-AzVM -ResourceGroupName RG-Compute -Name VM-Web01 -Image Ubuntu2204
New-AzADUser -DisplayName "Léa Martin" -UserPrincipalName "lea.martin@contoso.com"
New-AzRoleAssignment -SignInName lea.martin@contoso.com -RoleDefinitionName Contributor -ResourceGroupName RG-App