Architecture
The current repository is intentionally small.
AzureSqlVmToolkit.psd1AzureSqlVmToolkit.psm1vm_creation_with_bastion.ps1config.yamlschemas/config.schema.jsonPublic/scripts/AzureSqlVmToolkit.Common.psm1scripts/AzureSqlVmToolkit.Deployment.psm1scripts/AzureSqlVmToolkit.Deployment.Context.ps1scripts/AzureSqlVmToolkit.Deployment.Network.ps1scripts/AzureSqlVmToolkit.Deployment.Compute.ps1scripts/AzureSqlVmToolkit.Deployment.Security.ps1scripts/AzureSqlVmToolkit.Deployment.Storage.ps1scripts/AzureSqlVmToolkit.Deployment.GuestSetup.ps1scripts/AzureSqlVmToolkit.Deployment.Orchestration.ps1scripts/Test-Version.ps1scripts/Test-Local.ps1tests/AzureSqlVmToolkit.Common.Tests.ps1tests/AzureSqlVmToolkit.Deployment.Tests.ps1tests/AzureSqlVmToolkit.Module.Tests.ps1docs-site/README.mdGetting-Started.mdSecurity.mdLicensing.mdModule Entry Point
Section titled “Module Entry Point”AzureSqlVmToolkit.psd1 and AzureSqlVmToolkit.psm1 expose the current public command surface:
New-AzureSqlVmToolkitDeploymentTest-AzureSqlVmToolkitConfig
The root script remains as a compatibility entry point.
Deployment Engine
Section titled “Deployment Engine”The module command calls the deployment engine through scripts/AzureSqlVmToolkit.Deployment.psm1. That file is the stable import surface and loader for focused internal implementation shards:
AzureSqlVmToolkit.Deployment.Context.ps1AzureSqlVmToolkit.Deployment.Network.ps1AzureSqlVmToolkit.Deployment.Compute.ps1AzureSqlVmToolkit.Deployment.Security.ps1AzureSqlVmToolkit.Deployment.Storage.ps1AzureSqlVmToolkit.Deployment.GuestSetup.ps1AzureSqlVmToolkit.Deployment.Orchestration.ps1
The root script is now a compatibility wrapper around the module command.
- Parses YAML with
powershell-yaml. - Uses common helpers for validation, naming, password generation, role assignment, and guest-script generation.
- Prints a no-Azure
-Plan. - Runs Azure-aware
-WhatIfthrough read-only Azure lookups andShouldProcess. - Creates, reuses, updates, or blocks Azure resources through internal
Ensure-*functions. - Configures RBAC-enabled Key Vault access.
- Creates the SQL Server VM and managed identity.
- Creates Bastion and storage resources.
- Runs trusted guest setup scripts.
- Uploads the manual
.bakrestore helper.
Config
Section titled “Config”config.yaml is the sample public config. schemas/config.schema.json documents the editor-facing schema. Use ignored config.local.yaml or *.local.yaml files for real lab settings.
Checks
Section titled “Checks”scripts/Test-Local.ps1 runs parser checks, module manifest validation, version alignment, schema parsing, script-backed config validation, Pester tests when available, and optional PSScriptAnalyzer checks.
Roadmap
Section titled “Roadmap”The next architecture milestone is live Azure integration evidence for reruns, drift scenarios, and -WhatIf output.