✅ Correction Jour 14 · Sécuriser l'accès réseau : NSG, ASG, Azure Bastion, points de terminaison de service et privés · 30 min
Correction du lab 14 : NSG, ASG, Bastion et point de terminaison privé
Réseau, VM et ASG
az group create -n rg-lab-j14 -l francecentral
az network vnet create -g rg-lab-j14 -n vnet-lab-j14 --address-prefixes 10.140.0.0/16 --subnet-name snet-web --subnet-prefixes 10.140.1.0/24
for S in snet-sql:10.140.2.0/24 snet-pe:10.140.3.0/24 AzureBastionSubnet:10.140.4.0/26; do
az network vnet subnet create -g rg-lab-j14 --vnet-name vnet-lab-j14 -n ${S%%:*} --address-prefixes ${S##*:}
done
for V in web sql; do
az vm create -g rg-lab-j14 -n vm-lab-$V --image Ubuntu2204 --size Standard_B1s --vnet-name vnet-lab-j14 \
--subnet snet-$V --public-ip-address "" --nsg "" --admin-username marchal --generate-ssh-keys
az network asg create -g rg-lab-j14 -n asg-$V
az network nic ip-config update -g rg-lab-j14 --nic-name vm-lab-${V}VMNic -n ipconfigvm-lab-$V --application-security-groups asg-$V
done
Le nom de la configuration IP créée par az vm create est ipconfig<nom-de-la-vm> ; vérifiez-le avec az network nic ip-config list.
Cette leçon est réservée aux abonnés
Pendant l'accès anticipé, tous les cours, vidéos, ateliers, corrections et le certificat sont gratuits jusqu'au 15 janvier 2027, sans carte bancaire.
Créer mon compte gratuit
J'ai déjà un compte