Reference for every environment variable CloudOracle reads. All vars are loaded once at startup by internal/config.Load() and injected into the cloud, LLM, and DB layers — no component reaches for os.Getenv on its own.
| Variable | Default | Description |
|---|---|---|
CLOUDORACLE_PROVIDER |
synthetic |
Cloud provider: aws, gcp, azure, or synthetic |
AWS_PROFILE |
cloudoracle |
AWS shared-config profile to use |
AWS_REGION |
us-east-2 |
AWS region to scan |
GOOGLE_CLOUD_PROJECT |
(unset) | GCP project ID (required when provider is gcp) |
AZURE_SUBSCRIPTION_ID |
(unset) | Azure subscription ID (required when provider is azure) |
SYNTHETIC_COUNT |
100 |
Default number of synthetic resources to generate |
SYNTHETIC_ACCOUNT |
synthetic-account |
Default account ID for synthetic data |
CLOUD_SERVICE_TIMEOUT |
30s |
Per-service timeout for each cloud API call (Go duration string) |
CLOUDORACLE_BILLING_PROVIDER |
snapshots |
Cost source for the v1 endpoints: snapshots (the projected-cost approximation) or aws_cost_explorer (real AWS unblended cost via the Cost Explorer API; uses AWS_REGION/AWS_PROFILE). On init failure it logs and falls back to snapshots. |
DB_HOST |
localhost |
PostgreSQL host |
DB_PORT |
5432 |
PostgreSQL port |
DB_USER |
oracle |
Database user |
DB_PASSWORD |
oracle_dev |
Database password |
DB_NAME |
cloudoracle |
Database name |
LLM_PROVIDER |
(auto) | Force a specific LLM provider: gemini, claude, or openai. If unset, auto-detects based on which API key is present. |
LLM_TIMEOUT |
30s |
HTTP timeout for LLM API calls (Go duration string) |
LLM_MAX_RETRIES |
3 |
Number of retries on transient LLM failures (429, 5xx, network errors). Set to 0 to disable. |
LLM_BASE_DELAY |
500ms |
Initial backoff between retries; doubles on each attempt with full jitter |
LLM_MAX_DELAY |
30s |
Cap for the per-retry wait (also caps Retry-After headers) |
GEMINI_API_KEY |
(unset) | API key for Google Gemini (gemini-2.5-flash) |
ANTHROPIC_API_KEY |
(unset) | API key for Anthropic Claude (claude-haiku-4-5) |
OPENAI_API_KEY |
(unset) | API key for OpenAI (gpt-4o-mini) |
LOG_LEVEL |
info |
Log level: debug, info, warn, or error |
LOG_FORMAT |
text |
Log format: text (human-readable) or json (structured) |
For the design of the LLM provider layer and the analyzer rule engine, see architecture.md. For per-cloud setup details (profiles, credentials, IAM scopes), see cloud-providers.md.