Use Azure Foundry with Pulumi Agents
Run Pulumi Agents against model deployments in your Azure Foundry resource. You need the resource name or endpoint and the names of the deployments you want to use. If you need to deploy Claude, follow Microsoft's deployment instructions.
Connect Azure Foundry
Choose the API format your deployment serves: Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses. For Authentication, select API key and enter the resource's key, or select Workload identity (Entra ID) and configure the trust relationship below.
Configure workload identity
With workload identity, Pulumi exchanges an OpenID Connect (OIDC) token for short-lived Azure credentials. If you selected API key authentication, continue to enter your model deployments.
- Copy the Issuer, Subject, and Audience shown in the Pulumi form. The subject identifies your organization as
pulumi:agents:pulumi.organization.id:<organization-id>, and the audience isazure:agents:<organization-id>. - In Microsoft Entra ID, create or choose an app registration and add a federated credential with those three values.
- Assign the app the Cognitive Services User role on your Foundry resource.
- Return to Pulumi and enter the app's Directory (tenant) ID and Application (client) ID.
Enter your model deployments
- Azure resource or endpoint: Enter either:
- Your Foundry resource name, such as
my-resource. - The endpoint's base URL. For Anthropic Messages, this ends in
/anthropic, such ashttps://my-resource.services.ai.azure.com/anthropic. For the OpenAI formats, it ends in/openai/v1.
- Your Foundry resource name, such as
- Default model: The deployment name in your Foundry resource, such as
agents-sonnet-prod. - Fast model (recommended): The deployment name for a smaller, faster model.
Use the deployment names from your Foundry resource. These can differ from the underlying model IDs. With OpenAI Responses, you can also set Thinking for the provider.