Skip to content

Commit d07eee7

Browse files
docs: add variable reference at docs/reference/variables.md
- Create docs/reference/ directory and variables.md - Full sectioned reference matching config/variables.example.yml - Sections: azure, azure_local, conversion, tags - Add naming rules table and script parameter mapping - Add Reference nav section in mkdocs.yml Part of: AzureLocal/azurelocal.github.io#15
1 parent 95a98f1 commit d07eee7

2 files changed

Lines changed: 107 additions & 0 deletions

File tree

docs/reference/variables.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Variable Reference
2+
3+
All VM conversion scripts use a central configuration file: `config/variables.yml`. This file documents the common values you will need across all scripts. Future versions may support loading from this file directly.
4+
5+
!!! tip "Getting started"
6+
Copy the example and fill in your values:
7+
```powershell
8+
cp config/variables.example.yml config/variables.yml
9+
```
10+
**Never commit** `variables.yml` — it is excluded by `.gitignore` because it contains environment-specific values.
11+
12+
!!! note "Current usage"
13+
These scripts currently accept parameters directly on the command line.
14+
This file documents the common values you will need and serves as the canonical parameter reference.
15+
16+
---
17+
18+
## Naming Rules
19+
20+
| Scope | Convention | Example |
21+
|-------|-----------|---------|
22+
| Top-level sections | `snake_case` | `azure_local`, `conversion` |
23+
| Keys within sections | `snake_case` | `subscription_id`, `max_parallel` |
24+
| Azure resource IDs | Full ARM resource ID | `/subscriptions/.../customLocations/cl-01` |
25+
26+
---
27+
28+
## Azure
29+
30+
```yaml
31+
azure:
32+
subscription_id: "00000000-0000-0000-0000-000000000000"
33+
resource_group: "rg-azurelocal-prod"
34+
location: "eastus"
35+
```
36+
37+
| Variable | Type | Required | Description | Default |
38+
|----------|------|:--------:|-------------|---------|
39+
| `azure.subscription_id` | string | **Yes** | Azure subscription ID | — |
40+
| `azure.resource_group` | string | **Yes** | Resource group containing the target VMs | — |
41+
| `azure.location` | string | **Yes** | Azure region | `eastus` |
42+
43+
---
44+
45+
## Azure Local
46+
47+
```yaml
48+
azure_local:
49+
custom_location_id: "/subscriptions/.../customLocations/cl-azurelocal-01"
50+
logical_network_id: "/subscriptions/.../logicalNetworks/lnet-mgmt-01"
51+
```
52+
53+
| Variable | Type | Required | Description | Default |
54+
|----------|------|:--------:|-------------|---------|
55+
| `azure_local.custom_location_id` | string | **Yes** | Full ARM resource ID of the Azure Local custom location | — |
56+
| `azure_local.logical_network_id` | string | **Yes** | Full ARM resource ID of the logical network for the converted VM | — |
57+
58+
---
59+
60+
## Conversion Settings
61+
62+
```yaml
63+
conversion:
64+
working_directory: "C:\\ClusterStorage\\Volume01\\Gen2Conversion"
65+
max_parallel: 1
66+
```
67+
68+
| Variable | Type | Required | Description | Default |
69+
|----------|------|:--------:|-------------|---------|
70+
| `conversion.working_directory` | string | **Yes** | Scratch directory for conversion work files (must have sufficient free space) | — |
71+
| `conversion.max_parallel` | integer | No | Number of VMs to process in parallel (`1` = sequential) | `1` |
72+
73+
---
74+
75+
## Tags
76+
77+
```yaml
78+
tags:
79+
project: "VM-Conversion"
80+
environment: "production"
81+
workload: "gen1-to-gen2"
82+
solution: "vmconvert-azure-local"
83+
```
84+
85+
| Variable | Type | Required | Description | Default |
86+
|----------|------|:--------:|-------------|---------|
87+
| `tags.project` | string | No | Project tag | `VM-Conversion` |
88+
| `tags.environment` | string | No | Environment tag | `production` |
89+
| `tags.workload` | string | No | Workload type tag | `gen1-to-gen2` |
90+
| `tags.solution` | string | No | Solution identifier tag | `vmconvert-azure-local` |
91+
92+
---
93+
94+
## Script Parameter Mapping
95+
96+
The table below maps `variables.yml` keys to the actual script parameters:
97+
98+
| Variable Key | Azure Local Script Param | Hyper-V Script Param |
99+
|-------------|-------------------------|---------------------|
100+
| `azure.subscription_id` | `-SubscriptionId` | N/A |
101+
| `azure.resource_group` | `-ResourceGroup` | N/A |
102+
| `azure_local.custom_location_id` | `-CustomLocationId` | N/A |
103+
| `azure_local.logical_network_id` | `-LogicalNetworkId` | N/A |
104+
| `conversion.working_directory` | `-WorkingDirectory` | `-WorkingDirectory` |
105+
| `conversion.max_parallel` | `-MaxParallel` | `-MaxParallel` |

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ nav:
4040
- Azure Local Path: runbook-azurelocal.md
4141
- Hyper-V Path: runbook-hyperv.md
4242
- Troubleshooting: troubleshooting.md
43+
- Reference:
44+
- Variable Reference: reference/variables.md
4345
- Contributing: contributing.md
4446

4547
markdown_extensions:

0 commit comments

Comments
 (0)