Task 03: Validate Configuration
Objective: Confirm Key Vault access, Log Analytics configuration, and monitoring readiness
DOCUMENT CATEGORY: Runbook SCOPE: Validate Key Vault access, Log Analytics, and monitoring setup PURPOSE: Validate Key Vault access, Log Analytics, and monitoring setup MASTER REFERENCE: Azure Local Deployment Overview
Status: Active
Key Vault Validation
1. Test Secret Operations
Azure CLI:
# Set a test secret
az keyvault secret set \
--vault-name kv-{cid}-{env}-mgmt \
--name deployment-validation \
--value "Phase04-Complete-$(date +%Y%m%d)"
# Retrieve the secret
az keyvault secret show \
--vault-name kv-{cid}-{env}-mgmt \
--name deployment-validation \
--query value -o tsv
PowerShell:
# Test from Azure PowerShell
$SecretValue = ConvertTo-SecureString "TestValue123" -AsPlainText -Force
Set-AzKeyVaultSecret -VaultName "kv-{cid}-{env}-mgmt" -Name "test-secret" -SecretValue $SecretValue
# Retrieve
Get-AzKeyVaultSecret -VaultName "kv-{cid}-{env}-mgmt" -Name "test-secret" -AsPlainText
2. Verify Access Policies
Azure Portal:
- Key vaults → Select Key Vault → Access policies
- Verify these principals have access:
- Azure Local Cloud management group
- CI/CD service principal (Azure Local Cloud-cicd)
- Deployment administrator accounts
3. Check Security Settings
Azure Portal: Key Vault → Properties
Verify:
- Soft delete: Enabled (platform vault: 90-day retention; cluster vault:
cluster.key_vault.soft_delete_retention_days) - Purge protection: platform vault enabled, except when
scenario.environment_classislab,testordev; the cluster vault has none, as Microsoft's deployment template creates it - Public network access: Enabled or Disabled per policy
- Private endpoint: Created (if configured)
Log Analytics Validation
1. Verify Workspace Configuration
Azure Portal:
- Log Analytics workspaces → Select workspace
- Settings → Workspace configuration
- Verify:
- Retention: 30-90 days (per requirements)
- Data cap: Configured if required
- Solutions: Installed if configured
2. Test Data Ingestion
Azure Portal: Log Analytics → Logs
Run query:
// Check for recent Activity Log entries
AzureActivity
| where TimeGenerated > ago(1h)
| summarize count() by ResourceProvider
| order by count_ desc
Expected: Shows activity from recent deployment.
3. Check Diagnostic Settings
Verify resources sending logs to Log Analytics:
Azure CLI:
# Check diagnostic settings for VPN Gateway
az monitor diagnostic-settings list \
--resource /subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Network/virtualNetworkGateways/{vpn-gw-name}
Verify:
- VPN Gateway logs enabled
- Bastion logs enabled
- Key Vault audit logs enabled
- NSG flow logs enabled (if configured)
Monitoring Setup
1. Verify Optional Monitoring Servers
If NDM server deployed:
Azure Portal:
- Virtual machines → NDM server VM
- Verify:
- VM running
- Monitoring agent installed
- SNMP configured (if applicable)
2. Check Resource Tags
Verify all resources have appropriate tags:
Azure CLI:
az resource list \
--resource-group rg-{cid}-{env}-{region}-management \
--query '[].{Name:name, Tags:tags}' \
--output table
Expected tags:
CustomerEnvironmentManagedBy = "Azure Local Cloud CI/CD"CostCenter(if configured)
Final Validation Checklist
Key Vault
- Secret operations working (set/get)
- Access policies correctly configured
- Azure Local Cloud group can access
- CI/CD service principal can access
- Soft delete enabled
- Purge protection enabled on the platform vault (not in
lab,testordev)
Log Analytics
- Workspace active and collecting data
- Recent activity logs visible
- Retention configured correctly
- Diagnostic settings enabled for key resources
Monitoring
- Optional servers running (if deployed)
- Resource tags applied
- Monitoring agents installed (if configured)
Overall Deployment
- All resources in expected state
- Connectivity tests passed
- Access controls working
- Logging and monitoring operational
- Documentation updated with actual values
Post-Deployment Tasks
1. Document Deployment Details
Create deployment record:
Deployment Date: YYYY-MM-DD
Customer: {Customer Name}
Environment: {env}
Region: {region}
VPN Gateway: vpngw-{cid}-{env}-{region}
Key Vault: kv-{cid}-{env}-mgmt
Log Analytics: law-{cid}-{env}-{region}
Bastion: bas-{cid}-{env}-{region}
2. Store Credentials in Key Vault
Store important credentials:
# Local admin password (if applicable)
az keyvault secret set --vault-name kv-{cid}-{env}-mgmt \
--name "vm-admin-password" --value "{secure-password}"
# VPN PSK (if not already stored)
az keyvault secret set --vault-name kv-{cid}-{env}-mgmt \
--name "vpn-psk-cluster-c01" --value "{pre-shared-key}"
3. Update Network Documentation
Document for network team:
- Azure VNet CIDR:
10.100.1.0/24 - VPN Gateway public IPs
- BGP ASN and IPs
- DNS resolver IP
Completion
Phase 04 deployment complete! ✅
All management infrastructure deployed, validated, and ready for Azure Local cluster deployment.
Next Steps
- Coordinate with on-premises team to verify VPN connectivity
- Configure monitoring alerts in Log Analytics
- Store additional secrets as needed
- Proceed to Phase 05: Identity & Security
- GitHub
- GitLab
- Azure DevOps
When to use: Use this tab if your CI/CD pipeline runs on GitHub Actions.
See procedure steps above for GitHub-specific guidance.
When to use: Use this tab if your CI/CD pipeline runs on GitLab CI/CD.
See procedure steps for GitLab-specific guidance.
When to use: Use this tab if your CI/CD pipeline runs on Azure DevOps Pipelines.
See procedure steps for Azure DevOps-specific guidance.
Azure CLI script
When to use: Check the task from a host that has the Azure CLI and not the Az PowerShell modules. The script is PowerShell 7 that calls
azand only reads Azure.
Script
| Script | What it does |
|---|---|
scripts/deploy/02-azure-foundation/phase-04-azure-management-infrastructure/01-cicd-pipeline-deployment/phase-03-validation/task-03-validate-configuration/azurecli/Test-ManagementConfiguration.azcli.ps1 | Checks with the Azure CLI the Key Vault access, the Log Analytics workspace, the diagnostic settings and the tags of the management infrastructure. Changes nothing. |
Requires: PowerShell 7 and the Azure CLI, signed in with az login --tenant <azure.tenant_id>.
The Azure side of the checks only. The Key Vault access check reads the secret list of each vault and writes no test secret. You need Reader on the subscriptions and a role that can list the secrets of each vault (for example Key Vault Secrets User). The data collection and the Azure Monitor Agent are out of scope here.
Run
./Test-ManagementConfiguration.azcli.ps1 -InfrastructureFile ./infrastructure.yml
Scripts for this task are located in the azurelocal-toolkit repository under scripts/deploy/ in the appropriate task folder.
Alternatives
The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.
Navigation
| Previous | Up | Next |
|---|---|---|
| Task 02 - Test Connectivity | Phase 03 - Validation | Phase 05 - Identity & Security |
Values from infrastructure.yml
The pipeline settings are in the devops section of infrastructure.yml (schema 5): the platform, the project, the repository, the approval environments, the runners and the Terraform state. The Terraform code does not define these values a second time. config/variables/scripts/New-IacVariableFiles.ps1 writes terraform.tfvars.json and backend.hcl from the file. See the variables reference.
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| Configuration validation fails | Deployed configuration deviates from expected state | Compare deployed state against configuration baseline |
| Validation script errors | Missing dependencies or permissions | Ensure validation tools are installed and have required access |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-03-24 | Azure Local Cloud | Initial release |