Configuration API Reference
boilermaker.config.Config
Bases: BaseSettings
Configuration settings for Boilermaker Azure Service Bus integration.
Uses Pydantic settings to load configuration from environment variables or direct instantiation. Manages Azure authentication credentials and Service Bus connection details.
Attributes:
Name | Type | Description |
---|---|---|
azure_credential_include_msi |
bool
|
Whether to include Managed Service Identity for Azure authentication (default: False for local development) |
service_bus_namespace_url |
str
|
Full URL to Azure Service Bus namespace (e.g., "https://myapp.servicebus.windows.net/") |
service_bus_queue_name |
str
|
Name of the Service Bus queue to use |
service_bus_credential |
DefaultAzureCredential | None
|
Optional pre-configured Azure credential |
Environment Variables
- SERVICE_BUS_NAMESPACE_URL: Azure Service Bus namespace URL
- SERVICE_BUS_QUEUE_NAME: Queue name for task messages
- AZURE_CREDENTIAL_INCLUDE_MSI: Set to "true" for MSI in deployed environments
Example
From environment variables
config = Config()
Direct configuration
config = Config( ... service_bus_namespace_url="https://myapp.servicebus.windows.net/", ... service_bus_queue_name="tasks", ... azure_credential_include_msi=True ... )
az_credential()
Create or return Azure credential for Service Bus authentication.
Returns a configured DefaultAzureCredential with appropriate settings for the deployment environment. For local development, excludes Managed Service Identity to avoid timeout delays.
Returns:
Name | Type | Description |
---|---|---|
DefaultAzureCredential |
Configured Azure credential object |
Note
- Local development: Excludes MSI to prevent 169.254.169.254 timeouts
- Deployed environments: Includes MSI for automatic authentication