Need an API and or script in python that can access and pull a secret from the Azure key vault.
- az login
- set env vars in env_vars.txt file (key vault name and secret)
- ensure the az ad account has needed access for key vault
- activate venv
- python 3 main.py
- build docker image: docker buildx build . --platform linux/arm64 -t python-azure-key-vault-api:latest or docker buildx build . --platform linux/amd64 -t python-azure-key-vault-api:latest
- set env vars in env_vars.txt file
- Run docker container: docker run it --env-file env_vars.txt python-azure-key-vault-api:latest
Once the container is up, login through browser on your host machine using the device code from the terminal shell.