Automate CDN actions such as endpoint purge

Frank LaRosa 1 Reputation point
2021-03-29T19:29:01.097+00:00

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?

Azure Content Delivery Network
{count} votes