Manage Azure cloud resources imperatively using TypeScript.
- Write automation scripts in TypeScript, a DSL designed for working with JSON data.
- Leverage the Azure CLI with simple result serialization and easy argument passing via Execa.
- Can be used along with the Azure SDK too!
- Execute actions asynchronously for fast execution of complex scripts.
- Powerful tools for complex scenarios requiring branching or iteration.
A simple script to define a storage account:
import type { SkuName, StorageAccount } from "@azure/arm-storage";
import az from "armpit";
const sku: SkuName = "Standard_LRS";
const name = "garbagefile";
await az.account.ensureActiveAccount();
const rg = await az.group("samples", "centralus");
const sa = await rg<StorageAccount>`storage account create -n ${name} --sku ${sku} --kind StorageV2`;
console.log(`Storage account ready: ${sa.name}`);
More samples can be found in the samples workspace.