Skip to main content
Version: 0.5.3

LiteLLM on Aruba Cloud

Deploy LiteLLM — an OpenAI-compatible API proxy that routes requests to multiple LLM providers — on Aruba Cloud using Terraform and cloud-init. Supports OpenAI, Anthropic (Claude), Ollama, Azure OpenAI, and 100+ other providers through a single unified API.

Provider version: arubacloud/arubacloud ~> 0.5 | Terraform: ≥ 1.9


Introduction​

LiteLLM translates OpenAI API calls to the format required by each provider, enabling applications to switch between models without code changes. This example deploys:

  • LiteLLM proxy via Docker
  • OpenAI-compatible REST API on port 4000
  • Configurable provider routing (OpenAI, Anthropic, Ollama)
  • Master key authentication

Architecture Overview​


Infrastructure Created​

ResourceName patternDescription
arubacloud_projectllm-prodProject container
arubacloud_vpcllm-prod-vpcVirtual Private Cloud
arubacloud_subnetllm-prod-subnetBasic subnet
arubacloud_securitygroupllm-prod-vm-sgSecurity group
arubacloud_securityrulellm-prod-vm-sshSSH ingress
arubacloud_securityrulellm-prod-vm-apiLiteLLM proxy TCP 4000
arubacloud_elasticipllm-prod-vm-eipVM public IP
arubacloud_blockstoragellm-prod-boot20 GB boot disk (Performance)
arubacloud_keypairllm-prod-keypairSSH public key
arubacloud_cloudserverllm-prod-vmCloudServer VM

Estimated Monthly Cost​

ResourceSpecEst. cost/mo
CloudServer VMCSO2A4 — 2 vCPU / 4 GB~€20
Boot disk20 GB Performance~€3
Elastic IP—~€3
Total~€26/mo

Requirements​

  • Terraform ≥ 1.9
  • ArubaCloud Terraform Provider ~> 0.5
  • An ArubaCloud account with OAuth2 API credentials
  • An SSH key pair
  • At least one LLM provider API key or an Ollama server

Variables​

Required​

VariableDescription
arubacloud_client_idArubaCloud OAuth2 client ID
arubacloud_client_secretArubaCloud OAuth2 client secret
ssh_public_keySSH public key content
master_keyLiteLLM master API key (prefix with sk-)

Optional​

VariableDefaultDescription
app_name"llm"Short name used in all resource names
environment"prod"Environment label
location"ITBG-Bergamo"ArubaCloud region
zone"ITBG-1"Availability zone
billing_period"Hour""Hour" or "Month"
vm_flavor"CSO2A4"CloudServer flavor
vm_disk_size_gb20Boot disk size in GB
ssh_cidr"0.0.0.0/0"CIDR for SSH
api_cidr"0.0.0.0/0"CIDR for proxy API port 4000 — restrict to your app servers
openai_api_key""OpenAI API key
anthropic_api_key""Anthropic API key
ollama_base_url""Ollama server URL
litellm_version"main"LiteLLM Docker image tag

Outputs​

OutputDescription
litellm_urlLiteLLM proxy API URL
vm_public_ipPublic IP address of the VM
ssh_commandSSH command to connect to the VM
health_checkcurl command to verify the proxy is running

Deployment Instructions​

1. Clone and navigate​

git clone https://github.com/arubacloud/terraform-arubacloud-examples.git
cd terraform-arubacloud-examples/litellm

2. Configure variables​

cp terraform.tfvars.example terraform.tfvars

Set your master key and provider credentials:

master_key = "sk-my-master-key"
openai_api_key = "sk-..."
anthropic_api_key = "sk-ant-..."
ollama_base_url = "http://10.0.0.10:11434"

3. Deploy​

terraform init
terraform plan
terraform apply

4. Test​

# Health check
curl http://$(terraform output -raw vm_public_ip):4000/health

# List models
curl -H "Authorization: Bearer sk-my-master-key" \
http://$(terraform output -raw vm_public_ip):4000/models

# Chat completion (OpenAI-compatible)
curl -H "Authorization: Bearer sk-my-master-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}' \
http://$(terraform output -raw vm_public_ip):4000/chat/completions

References​