> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthsystems.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy on Azure

> Deploy Gateway to your Azure account.

At a high level, Gateway on Azure is a Durable Functions app backed by AI Foundry models with Cosmos DB for caching. All resources communicate over a private VNet.

## Prerequisites

* Azure subscription with permissions to create the resources mentioned above
* [Terraform](https://www.terraform.io/)
* [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) (used during `terraform apply` to deploy the function app code)
* The Gateway Terraform module (provided via SFTP during onboarding)
* **Cohere Marketplace terms accepted** — Cohere models require accepting Azure Marketplace terms before first deployment. Go to [AI Foundry](https://ai.azure.com), find each model in the catalog, and click "Deploy" to accept terms (you can cancel after accepting).

## Quick start

```bash theme={null}
# Unzip the Terraform scripts from SFTP
unzip azure.zip
cd azure

# Configure your deployment
# For a full list of variables, see variables.tf
cat > terraform.tfvars <<EOF
location        = "eastus2"
EOF

# Deploy
terraform init
terraform apply
```

After deployment, Terraform outputs the Function App URL and key:

```
function_app_url         = "https://gateway-func.azurewebsites.net"
function_app_default_key = <sensitive>
```

Retrieve the key with:

```bash theme={null}
terraform output function_app_default_key
```

Use the URL and key to configure the SDK.

## Authentication

Callers authenticate using a function key passed as a query parameter. No Azure AD roles are required — anyone with the key can invoke Gateway.

## Monitoring

Gateway logs to Application Insights. Distributed tracing, performance metrics, and logs are available in the Azure Portal under the Application Insights resource.
