Automate CDN actions such as endpoint purge
I want to automate certain CDN actions in my deploy scripts. For example, I want to run "cdn endpoint purge" whenever new builds of a web application are deployed.
The problem I'm running in to is that not all of the machines where the script runs are logged in to Azure. So I want to be able to embed an account key in the command, but this isn't working for CDN commands.
With other commands, such as storage blob commands, I can include --account-name and --account-key on the command line so they work regardless of whether the person running the command has logged in.
How can I do this with the cdn endpoint commands?