Skip to content

Lint Rules

The Azure lexicon includes 3 pre-synth lint rules (run on TypeScript source) and 20 post-synth checks (run on generated ARM JSON).

These rules analyze your TypeScript source files before template generation.

Warns when a resource uses a hardcoded region string instead of Azure.ResourceGroupLocation.

// Bad — hardcoded
export const storage = new StorageAccount({ location: "eastus" });
// Good — uses pseudo-parameter
export const storage = new StorageAccount({ location: Azure.ResourceGroupLocation });

Warns when a storage account does not set supportsHttpsTrafficOnly: true.

Warns when an NSG security rule uses * for source or destination, which is overly permissive.

These checks validate the generated ARM template JSON after synthesis.

IDDescriptionSeverity
AZR010Redundant dependsOn — target already referenced via reference() or resourceId()warning
AZR011Missing or invalid apiVersion (must be YYYY-MM-DD format)error
AZR012Deprecated apiVersion (older than 2023-01-01)warning
AZR013Resource missing location (except exempt types like role assignments)warning
IDDescriptionSeverity
AZR014Public blob access enabled on storage accountwarning
AZR015Missing encryption on storage accountwarning
IDDescriptionSeverity
AZR016Key Vault soft-delete not enabledwarning
AZR017Key Vault purge protection not enabledwarning
IDDescriptionSeverity
AZR018SQL Server missing auditingwarning
AZR019SQL Server database missing TDE (Transparent Data Encryption)warning
IDDescriptionSeverity
AZR020App Service missing managed identitywarning
AZR021App Service missing HTTPS-onlywarning
AZR022App Service missing minimum TLS 1.2warning
IDDescriptionSeverity
AZR023VM missing managed diskwarning
AZR024VM missing boot diagnosticswarning
IDDescriptionSeverity
AZR025AKS cluster missing RBACwarning
AZR026AKS cluster missing network policywarning
IDDescriptionSeverity
AZR027Container Registry admin user enabledwarning
AZR028Network interface missing NSGwarning
AZR029Managed disk missing encryptionwarning

Post-synth checks cannot be suppressed individually. If a check is triggering on a resource that intentionally deviates from best practice, fix the resource configuration to match the recommended pattern.

See the Lexicon Authoring Guide for writing custom post-synth checks.