- Have you been trying to manually compare two Azure resources, jumping between Azure portal tabs dozens of times?
- Have you encountred a confusing situation when a solution is working fine in environment A but failing in environment B ?
Well, say no more, I have been there, so I created this tool that will help you compare the configuration between two Azure resources (Function apps, app services, Virtual Machines..) and will return the properties of each resources and will highlight the differences.
Install the package
pip install azdiff
Login using az login
or sign in using a service principal.
export SUBSCRIPTION_ID={SUBSCRIPTION_ID}
azdiff appservice --resource_name1={resource_name1} --rg_name1={rg_name1} --resource_name2={resource_name2} --rg_name2={rg_name2}
Result:
notice the differences are marked in red with [?]
Available commands (--help):
Usage: azdiff [OPTIONS] COMMAND [ARGS]...
Options:
--debug / --no-debug Enable debug mode
--help Show this message and exit.
Commands:
appservice
functionapp
serviceplan
vm
- install python3 (tested with Python 3.8.10)
- I recommend to use Python3 virtual environments.
- install
REQUIREMENTS.txt
and run:
pip install -r requirements.txt
python3 main.py
# install wheel
pip install wheel
# build python wheel package
python3 setup.py bdist_wheel --version {0.b123}
# install the wheel created from the previous step
pip install {package_path}.whl
# test run
azdiff
Contributions are welcome:
- Please pick any of the features in the backlog here, or contact me to align if you have other ideas,
- Please make your PR against the dev branch,
- Please make sure that your PR includes functional tests with screenshots (as I still don't have a proper unit tests, or feel free to implement them :) )
Thank you!