Resources
Resource types
Section titled “Resource types”Every Azure resource has a type in the format Microsoft.{Provider}/{ResourceType}. The lexicon generates a TypeScript class for each type.
import { StorageAccount, VirtualMachine, WebApp } from "@intentius/chant-lexicon-azure";Common resource types:
| Type | Class | Description |
|---|---|---|
Microsoft.Storage/storageAccounts | StorageAccount | Blob, file, queue, table storage |
Microsoft.Compute/virtualMachines | VirtualMachine | IaaS virtual machines |
Microsoft.Web/sites | WebApp | App Service web applications |
Microsoft.Web/serverfarms | AppServicePlan | App Service plans |
Microsoft.Network/virtualNetworks | VirtualNetwork | Virtual networks |
Microsoft.Network/networkSecurityGroups | NetworkSecurityGroup | Firewall rules |
Microsoft.ContainerService/managedClusters | ManagedCluster | AKS Kubernetes clusters |
Microsoft.KeyVault/vaults | KeyVault | Secret and key management |
Microsoft.Sql/servers | SqlServer | Azure SQL logical servers |
Microsoft.ContainerRegistry/registries | ContainerRegistry | Docker container registries |
Resource-level fields
Section titled “Resource-level fields”ARM templates have fields that sit at the resource level (outside properties):
The pricing tier or capability level:
export const storage = new StorageAccount({ sku: { name: "Standard_GRS" },});Disambiguates resource subtypes:
export const storage = new StorageAccount({ kind: "StorageV2", // or "BlobStorage", "BlockBlobStorage"});identity
Section titled “identity”Managed identity configuration:
export const app = new WebApp({ identity: { type: "SystemAssigned" },});Key-value metadata:
export const storage = new StorageAccount({ tags: { environment: "production", team: "platform" },});Availability zone placement:
export const vm = new VirtualMachine({ zones: ["1"],});Marketplace plan information:
export const vm = new VirtualMachine({ plan: { name: "my-plan", publisher: "my-publisher", product: "my-product", },});location
Section titled “location”Azure region. Defaults to [resourceGroup().location]:
import { Azure } from "@intentius/chant-lexicon-azure";
export const storage = new StorageAccount({ location: Azure.ResourceGroupLocation, // default // or: location: "eastus2",});apiVersion
Section titled “apiVersion”Every ARM resource requires an apiVersion — the serializer injects the latest stable version automatically. You typically never set this manually.
The post-synth checks AZR011 and AZR012 validate:
- AZR011: apiVersion exists and follows YYYY-MM-DD format
- AZR012: apiVersion is not outdated (older than 2023-01-01)