Skip to content

Architecture

The current repository is intentionally small.

AzureSqlVmToolkit.psd1
AzureSqlVmToolkit.psm1
vm_creation_with_bastion.ps1
config.yaml
schemas/config.schema.json
Public/
scripts/AzureSqlVmToolkit.Common.psm1
scripts/AzureSqlVmToolkit.Deployment.psm1
scripts/AzureSqlVmToolkit.Deployment.Context.ps1
scripts/AzureSqlVmToolkit.Deployment.Network.ps1
scripts/AzureSqlVmToolkit.Deployment.Compute.ps1
scripts/AzureSqlVmToolkit.Deployment.Security.ps1
scripts/AzureSqlVmToolkit.Deployment.Storage.ps1
scripts/AzureSqlVmToolkit.Deployment.GuestSetup.ps1
scripts/AzureSqlVmToolkit.Deployment.Orchestration.ps1
scripts/Test-Version.ps1
scripts/Test-Local.ps1
tests/AzureSqlVmToolkit.Common.Tests.ps1
tests/AzureSqlVmToolkit.Deployment.Tests.ps1
tests/AzureSqlVmToolkit.Module.Tests.ps1
docs-site/
README.md
Getting-Started.md
Security.md
Licensing.md

AzureSqlVmToolkit.psd1 and AzureSqlVmToolkit.psm1 expose the current public command surface:

  • New-AzureSqlVmToolkitDeployment
  • Test-AzureSqlVmToolkitConfig

The root script remains as a compatibility entry point.

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.ps1
  • AzureSqlVmToolkit.Deployment.Network.ps1
  • AzureSqlVmToolkit.Deployment.Compute.ps1
  • AzureSqlVmToolkit.Deployment.Security.ps1
  • AzureSqlVmToolkit.Deployment.Storage.ps1
  • AzureSqlVmToolkit.Deployment.GuestSetup.ps1
  • AzureSqlVmToolkit.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 -WhatIf through read-only Azure lookups and ShouldProcess.
  • 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 .bak restore helper.

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.

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.

The next architecture milestone is live Azure integration evidence for reruns, drift scenarios, and -WhatIf output.