Components and Sizing Recommendations
Prerequisites
Ensure the following tools and resources are installed and available:- Azure Subscription with permissions to create Container Apps, Key Vault, Storage, VNet, Application Gateway, etc.
- Azure CLI configured with credentials
- Terraform v1.5 or later
Create a Portkey Account
- Go to the Portkey website.
- Sign up for a Portkey account.
- Once logged in, locate and save your
Organisation IDfor future reference. It can be found in the browser URL:https://app.portkey.ai/organisation/<organisation_id>/ - Contact the Portkey AI team and provide your Organisation ID and the email address used during signup.
- The Portkey team will share the following information with you:
- Docker credentials for the Gateway images (username and password).
- License: Client Auth Key.
Setup Project Environment
1. Prepare Azure Resources
2. Create Terraform Configuration Files
Create a new directory for your deployment:3. Create Module Configuration
Create amain.tf file:
Advanced Configuration
MCP Gateway (Optional)
By default, only the AI Gateway is enabled. To enable the MCP Gateway, update yourterraform.tfvars:
MCP Only:
server_mode = "all" with Application Gateway, you must configure either host-based.
Auto-Scaling Configuration
Control how replicas scale based on different metrics. CPU-based scaling (default):Network Configuration with VNet
Deploy Gateway within a VNet: Create new VNet:Application Gateway Ingress
Deploy Azure Application Gateway with WAF, SSL termination, and zone redundancy: Basic Configuration:Azure Managed Redis
Use Azure Cache for Redis instead of the built-in container:main.tf:
Storage Configuration
Using Auto-Created Storage (Default): No configuration needed. Terraform automatically creates a Storage Account and container. Optional: Customize container name:Integrating Gateway with Control Plane
Outbound Connectivity (Data Plane to Control Plane) Portkey supports the following methods for integrating the Data Plane with the Control Plane:- Azure Private Link
- Over the Internet
Azure Private Link (Outbound)
Connect your Gateway to the Portkey Control Plane privately over Azure Private Link. Prerequisites: VNET deployment (network_mode = "new" or "existing").
Steps:
- Request whitelisting β Share your Azure Subscription ID with the Portkey team. Wait for confirmation that your subscription is whitelisted.
- Deploy Private Endpoint β Enable outbound Private Link in your Terraform configuration:
terraform.tfvars:
- Private Endpoint in your VNET
- Private DNS Zone (
privatelink-az.portkey.ai) - DNS A record (
azure-cp) pointing to the Private Endpoint IP - VNET link for DNS resolution
- Request connection approval β Get the Private Endpoint resource ID and share it with the Portkey team:
- Verify approval (optional):
- Configure Private Endpoint URLs β Update your Gateway configuration to use the private Control Plane endpoint.
main.tf:
- Redeploy β Apply the configuration changes:
Over the Internet
Ensure Gateway has access to the following endpoints over the internet:https://api.portkey.aihttps://albus.portkey.ai
Inbound Connectivity (Control Plane to Data Plane)
- Azure Private Link
- IP Whitelisting
Azure Private Link (Inbound)
Allow Portkey Control Plane to connect to your Gateway privately via Azure Private Endpoint. Prerequisites: Gateway deployed and running. Steps:- Share connection details β Get your Gateway connection information and share with the Portkey team:
- ACA Environment Resource ID (e.g.,
/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.App/managedEnvironments/xxx) - Gateway FQDN (e.g.,
gateway.<env-domain>.<region>.azurecontainerapps.io)
- Wait for connection request β Portkey creates a Private Endpoint in their subscription targeting your ACA Environment. A connection request will appear in your Azure subscription.
- Check for pending connections:
- Approve the connection:
IP Whitelisting
Allows Control Plane to access the Data Plane over the internet by restricting inbound traffic to specific IP addresses. This method requires the Data Plane to have a publicly accessible endpoint. To whitelist, add an inbound rule to the Azure NSG or Firewall allowing connections from the Portkey Control Planeβs IPs (54.81.226.149, 34.200.113.35, 44.221.117.129) on the required port.
To integrate the Control Plane with the Data Plane, contact the Portkey team and provide the Public Endpoint of the Data Plane.
Verifying Gateway Integration with the Control Plane
- Send a test request to Gateway using
curl. - Go to Portkey website -> Logs.
- Verify that the test request appears in the logs and that you can view its full details by selecting the log entry.
Uninstalling Portkey Gateway
Example Configurations
Simple Deployment (No VNet)
This example shows a basic deployment with built-in Redis and auto-created storage: terraform.tfvars:Deployment with VNet and Application Gateway
This example shows a deployment with VNet, Application Gateway with WAF, and managed services: terraform.tfvars:Gateway + MCP Deployment
This example shows how to deploy both AI Gateway and MCP Gateway: terraform.tfvars:Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us

