Skip to main content
Pulumi logo Pulumi logo
  1. Docs
  2. Infrastructure AI
  3. Pulumi Agents
  4. Model providers
  5. Use Azure Foundry with Pulumi Agents

Use Azure Foundry with Pulumi Agents

This Pulumi Cloud feature is available in the Enterprise edition.

    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

    Organizations on the legacy Business Critical edition also have access to this feature. To connect the provider, you need permission to manage your organization's integrations, such as the Admin role.

    1. In Pulumi Cloud, open your organization's Agent Settings.
    2. Select Model provider, then Add model provider.
    3. Enter a unique Name using lowercase letters, numbers, and hyphens. Choose a name you can recognize when configuring an agent. The name is permanent, and Pulumi reserves pulumi.
    4. Under Provider, select 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.

    1. 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 is azure:agents:<organization-id>.
    2. In Microsoft Entra ID, create or choose an app registration and add a federated credential with those three values.
    3. Assign the app the Cognitive Services User role on your Foundry resource.
    4. 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 as https://my-resource.services.ai.azure.com/anthropic. For the OpenAI formats, it ends in /openai/v1.
    • 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.

    Test and use the provider

    Select Save. Pulumi sends a test request to each configured model and shows any errors. If a request fails, correct the settings and save again.

    To use the connection for one agent, open the agent's configuration, select the provider by name under Model, and save the agent. Start a new task to use that selection.

    To use the connection for new tasks that follow the organization default, check whether it is already the default. If needed, select Set as default in Agent Settings. See how Pulumi chooses the default provider.

      The infrastructure platform for humans and agents.