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/references/delivery-options/save-local.md
1# Mode B — Save to a local folder23## Step 1 — Suggest a path45Detect the user's current working context (in priority order; pick the **first** that succeeds):67| Signal | Suggested path |8|---|---|9| Host session has an `--add-dir` workspace containing a `.git` directory | `<workspace>/infra/{vm-name}/` |10| User mentioned a repo path earlier in the conversation | `<that-path>/infra/{vm-name}/` |11| `pwd` is inside a git repo | `<repo-root>/infra/{vm-name}/` |12| None of the above | `~/Desktop/{vm-name}-infra/` |1314Present the suggestion and let the user override:1516> *"I'll save to `~/Desktop/dev-vm-infra/` (no repo detected). Use that, or pick another path?"*1718If the path already exists with files, **always show the diff and ask before overwriting**. Never silently clobber.1920## Step 2 — Choose the filename(s)2122| Format | Files written |23|---|---|24| bash | `create-vm.sh` (chmod +x) |25| Bicep | `main.bicep`, `README.md` |26| Terraform | `main.tf`, `variables.tf`, `outputs.tf`, `terraform.tfvars.example`, `README.md` |2728The `README.md` contains:29- The full **Plan Card** markdown (so the next reader knows what this deploys)30- **Deploy** section with exact commands (`az deployment group create ...` / `terraform init && apply ...` / `bash create-vm.sh`)31- **Verify** section: `az vm show` / `az vm list-ip-addresses`32- **Cleanup** section: `az group delete --name <rg> --yes --no-wait`3334## Step 3 — Write and confirm3536After writing, echo back absolute paths and the single command the user runs next:3738> ✅ Wrote 2 files:39> - `~/source/my-infra/infra/dev-vm/main.bicep`40> - `~/source/my-infra/infra/dev-vm/README.md`41>42> Next step:43> ```bash44> cd ~/source/my-infra/infra/dev-vm45> az deployment group create --resource-group dev-vm-rg --template-file main.bicep \46> --parameters vmName=dev-vm adminUsername=azureuser \47> adminPublicKey="$(cat ~/.ssh/id_rsa.pub)"48> ```4950## Tool implementation5152Use the `Write` tool (or the host's equivalent) for each file. For shell scripts: write, then `chmod +x` via Bash.53