{"record":{"id":"f8dd7dee9304899c","repo":"BerriAI/litellm","slug":"missing-required-environment-variable-azure-stora-f8dd7d","errorCode":null,"errorMessage":"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM","messagePattern":"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/azure_storage/azure_storage.py","lineNumber":46,"sourceCode":"        **kwargs,\n    ):\n        try:\n            verbose_logger.debug(\"AzureBlobStorageLogger: in init azure blob storage logger\")\n\n            # Env Variables used for Azure Storage Authentication\n            self.tenant_id = os.getenv(\"AZURE_STORAGE_TENANT_ID\")\n            self.client_id = os.getenv(\"AZURE_STORAGE_CLIENT_ID\")\n            self.client_secret = os.getenv(\"AZURE_STORAGE_CLIENT_SECRET\")\n            self.azure_storage_account_key: str | None = os.getenv(\"AZURE_STORAGE_ACCOUNT_KEY\")\n\n            # Required Env Variables for Azure Storage\n            _azure_storage_account_name: Final = os.getenv(\"AZURE_STORAGE_ACCOUNT_NAME\")\n            if not _azure_storage_account_name:\n                raise ValueError(\"Missing required environment variable: AZURE_STORAGE_ACCOUNT_NAME\")\n            self.azure_storage_account_name: str = _azure_storage_account_name\n            _azure_storage_file_system: Final = os.getenv(\"AZURE_STORAGE_FILE_SYSTEM\")\n            if not _azure_storage_file_system:\n                raise ValueError(\"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM\")\n            self.azure_storage_file_system: str = _azure_storage_file_system\n            self.azure_storage_endpoint_suffix: str = (\n                os.getenv(\"AZURE_STORAGE_ENDPOINT_SUFFIX\") or AZURE_STORAGE_DEFAULT_ENDPOINT_SUFFIX\n            )\n            self._service_client = None\n            # Time that the azure service client expires, in order to reset the connection pool and keep it fresh\n            self._service_client_timeout: float | None = None\n\n            # Internal variables used for Token based authentication\n            self.azure_auth_token: str | None = None  # the Azure AD token to use for Azure Storage API requests\n            self.token_expiry: datetime | None = None  # the expiry time of the currentAzure AD token\n\n            asyncio.create_task(self.periodic_flush())\n            self.flush_lock = asyncio.Lock()\n            self.log_queue: list[StandardLoggingPayload] = []\n            super().__init__(**kwargs, flush_lock=self.flush_lock)\n        except Exception as e:\n            verbose_logger.exception(","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/azure_storage/azure_storage.py#L28-L64","documentation":"AzureBlobStorageLogger requires AZURE_STORAGE_FILE_SYSTEM — the ADLS Gen2 filesystem (container) name inside the storage account where log blobs are written — with no default and no constructor fallback; init raises when it is unset. The filesystem must already exist or writes will fail later even after this check passes.","triggerScenarios":"Enabling the azure_storage logger with the account name set but the container never created; assuming a default container is auto-provisioned; renaming the filesystem without updating env; copying configs between projects that use different container names.","commonSituations":"Account provisioned via IaC but the `az storage fs create` step skipped; naming drift between environments (litellm-logs vs litellm_logs); empty-string value from a misconfigured secret.","solutions":["Create the filesystem if needed: `az storage fs create --name litellm-logs --account-name <account>` (or container create)","Export AZURE_STORAGE_FILE_SYSTEM=<filesystem name>","Optionally set AZURE_STORAGE_ENDPOINT_SUFFIX if using sovereign clouds (defaults to the public-cloud suffix)","Re-run the proxy/process so init sees the variable"],"exampleFix":"// before\nexport AZURE_STORAGE_ACCOUNT_NAME=\"mystgacct\"   # filesystem never set\n// after\nexport AZURE_STORAGE_ACCOUNT_NAME=\"mystgacct\"\nexport AZURE_STORAGE_FILE_SYSTEM=\"litellgpt-logs\"","handlingStrategy":"validation","validationCode":"import os\n\nfs_name = os.getenv(\"AZURE_STORAGE_FILE_SYSTEM\")\nif not fs_name:\n    raise RuntimeError(\"set AZURE_STORAGE_FILE_SYSTEM to an existing ADLS Gen2 filesystem name\")","typeGuard":"def is_valid_file_system_name(name: str) -> bool:\n    import re\n    return bool(re.fullmatch(r\"[a-z0-9][a-z0-9-]{2,62}\", name))","tryCatchPattern":null,"preventionTips":["Create the filesystem before enabling the logger: az storage fs create --name <fs> --account-name <acct>","Filesystem names are lowercase, 3-63 chars — validate at config time","Pin one canonical container name across environments to avoid drift","Recheck existence after IaC re-destroys environments"],"tags":["azure-blob-storage","adls-gen2","container","litellm","logging","missing-env-var"],"backgroundTag":"missing-env-var","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}