Skip to content

Function App is failing to retrieve the AZURE_OPENAI_API_KEY. #100

@fpittelo

Description

@fpittelo

Function App is failing to retrieve the AZURE_OPENAI_API_KEY.

The Cause: In infra/main.tf. The Key Vault network rule default_action = "Deny".

The Problem: Azure Function Apps (even on S1 plans) have dynamic outbound IP addresses. The "Allow Trusted Microsoft Services" bypass does not automatically include Function Apps unless they are VNet integrated. Therefore, the Key Vault firewall rejects the Function App's request for the key.

The Symptom: The environment variable in Python resolves to the string @Microsoft.KeyVault(...) instead of the actual key, causing the OpenAI client initialization to crash.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions