Sync Azure App Service app settings and connection strings from a source app A to a target app B. Merge semantics: keys in A are added/updated in B; keys only in B are never deleted.
- Python 3.11+
- Azure CLI (
az) installed and logged in (az login)
pip install -e .
-
Copy
sync.example.yamltosync.yamland edit it. -
Dry-run (prints a masked diff, writes nothing):
sync-env-var --config sync.yaml -
Apply (prompts for confirmation, then writes to B):
sync-env-var --config sync.yaml --apply
| Flag | Effect |
|---|---|
--apply |
Write changes to the target. |
--yes |
Skip the confirmation prompt (for CI). |
--show-values |
Reveal masked values in the diff. |
--settings-only |
Sync app settings only. |
--connstrings-only |
Sync connection strings only. |
Secret values are masked in output by default. Key Vault references are copied as literal strings and continue to resolve in the target.