Skip to content

Fail fast on missing Azure credentials for abs:// litestream replica URL#88

Merged
EdGeraghty merged 3 commits into
azure-deploy-docsfrom
copilot/sub-pr-87
May 1, 2026
Merged

Fail fast on missing Azure credentials for abs:// litestream replica URL#88
EdGeraghty merged 3 commits into
azure-deploy-docsfrom
copilot/sub-pr-87

Conversation

Copy link
Copy Markdown

Copilot AI commented May 1, 2026

The ABS://*) case in check_litestream_replica_url was empty, allowing misconfigured deployments to pass entrypoint validation and only fail later when litestream attempts to connect to Azure Blob Storage.

Changes

  • Credential fast-fail for abs://: Validates that at least one Azure auth mechanism is present before the container starts:

    1. Account key — LITESTREAM_AZURE_ACCOUNT_KEY
    2. Service principal — all three of AZURE_CLIENT_ID + AZURE_TENANT_ID + AZURE_CLIENT_SECRET
    3. Managed identity — IDENTITY_ENDPOINT (injected by Azure Container Apps / Functions runtimes)
  • Consistent failure propagation: Uses the same ||-chain idiom as require_env_var, so log_errorfalse propagates under set -e and the container exits immediately rather than continuing.

ABS://*)
    env_var_is_defined "LITESTREAM_AZURE_ACCOUNT_KEY" \
        || { env_var_is_defined "AZURE_CLIENT_ID" && env_var_is_defined "AZURE_TENANT_ID" && env_var_is_defined "AZURE_CLIENT_SECRET"; } \
        || env_var_is_defined "IDENTITY_ENDPOINT" \
        || log_error "Azure Blob Storage ('abs://') requires at least one auth mechanism: ..."
    ;;

Copilot AI changed the title [WIP] [WIP] Address feedback on Azure implementation and documentation update Fail fast on missing Azure credentials for abs:// litestream replica URL May 1, 2026
Copilot AI requested a review from EdGeraghty May 1, 2026 09:53
@EdGeraghty EdGeraghty marked this pull request as ready for review May 1, 2026 09:54
@EdGeraghty EdGeraghty merged commit a2e8d37 into azure-deploy-docs May 1, 2026
3 checks passed
@EdGeraghty EdGeraghty deleted the copilot/sub-pr-87 branch May 1, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants