Microsoft Foundry in Practice

Deploying Foundry Resources with ARM Templates and Bicep

Clicking through the Foundry portal is fine for a proof of concept. For production, you want your Claude resources defined in files that are reviewed, versioned, and redeployable — that is what ARM templates and Bicep are for.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Infrastructure as code (IaC) means describing cloud resources in declarative files instead of creating them by hand. On Azure, the native options are ARM templates (JSON documents consumed by Azure Resource Manager, the platform's deployment engine) and Bicep (a cleaner language that compiles to ARM templates — same engine, far more readable). For Claude on Microsoft Foundry, IaC buys you three things enterprises care about: identical dev/staging/production environments, a reviewable audit trail of every infrastructure change, and fast rebuilds when you need a new region or a disaster-recovery copy.

What a Claude-on-Foundry template needs to express

Foundry uses a two-level hierarchy, and your templates should mirror it: a Foundry resource carries security and billing configuration, and one or more deployments inside it are the model instances your applications call. The decisions you make in the portal are exactly the decisions to encode as template parameters:

The marketplace wrinkle

Claude models in Foundry are third-party Azure Marketplace offerings from Anthropic, and using them requires an Azure Marketplace subscription plus acceptance of the offer terms — in the portal flow, that acceptance happens during "Deploy > Custom settings". When automating, plan for this step: marketplace terms acceptance is an account-level action that your pipeline or a one-time bootstrap must handle before template deployments succeed. Prerequisites from the portal flow apply equally to pipelines: a paid Azure subscription (free trial and credit-only subscriptions are not supported for Claude) and Contributor or Owner on the target resource group for the identity running the deployment.

Start from the official starter kit

Rather than authoring templates from scratch, start with the Claude on Foundry starter kit (github.com/Azure-Samples/claude), referenced from Microsoft's own documentation. It provisions a Foundry account, project, and Claude deployments with a single azd up — the Azure Developer CLI command that deploys an application template — and offers both Bicep and Terraform variants. Notably, it wires the Anthropic SDK and Claude Code CLI to authenticate with Microsoft Entra ID, so no API keys need to be generated, stored, or rotated. Reading its Bicep files is the fastest way to learn the exact resource types and API versions Microsoft currently uses for Claude deployments — details we deliberately do not reproduce here, since official schemas evolve and the kit is kept current.

Rule of thumb: keep secrets out of templates entirely. Prefer Entra ID authentication as the starter kit does; if you must use API keys, have the template grant access for retrieval rather than emitting keys into outputs, since template outputs can persist in deployment history.

Pipeline practices that pay off

Where to go next

If your team standardizes on Terraform instead, see managing Foundry resources with Terraform. For the manual baseline the templates automate, read Foundry resource setup and model deployments.

Sources