Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Select, configure, and scale Azure compute resources—VMs, App Service, AKS, and Container Apps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
workflows/vm-creator/examples/bicep/README.md
1# {vm-name} — Bicep23Deploys a single Linux VM with VNet, subnet, NSG (SSH allow), public IP, and NIC.45## Prerequisites6- Azure CLI (`az login`)7- An existing resource group8- SSH public key at `~/.ssh/id_rsa.pub`910## Quickstart1112```bash13az deployment group what-if \14--resource-group {resourceGroup} \15--template-file main.bicep \16--parameters vmName={vmName} adminUsername={adminUsername} adminPublicKey="$(cat ~/.ssh/id_rsa.pub)"1718az deployment group create \19--resource-group {resourceGroup} \20--template-file main.bicep \21--parameters vmName={vmName} adminUsername={adminUsername} adminPublicKey="$(cat ~/.ssh/id_rsa.pub)"22```2324## Parameters2526| Name | Required | Default | Notes |27|---|---|---|---|28| `vmName` | * | — | VM resource name |29| `adminUsername` | * | — | Linux admin user |30| `adminPublicKey` | * | — | Contents of `id_rsa.pub` (secure) |31| `location` | | resourceGroup location | Azure region |32| `vmSize` | | `Standard_D2s_v5` | Verify availability with `compute_vm_list-skus` |33| `osDiskSizeGb` | | `30` | |34| `osDiskType` | | `Premium_LRS` | |35| `zone` | | `''` | `1`/`2`/`3`, or empty for regional |36| `tags` | | `{}` | |3738## Outputs39- `vmId` — full ARM resource ID40- `publicIpAddress` — connect with `ssh {adminUsername}@{publicIpAddress}`4142## VMSS variant43Swap `Microsoft.Compute/virtualMachines` for `Microsoft.Compute/virtualMachineScaleSets@2024-07-01`, add `sku: { name: vmSize, capacity: instanceCount }`, `properties.orchestrationMode: 'Flexible'`, and move `osProfile`/`storageProfile`/`networkProfile` inside `properties.virtualMachineProfile`.4445## Cleanup46```bash47az group delete --name {resourceGroup} --yes --no-wait48```49