This repository illustrates how to automatically rotate keys on every deployment for certain Azure services (namely Azure Storage, Cosmos DB, and Service Bus, although the same approach could be used with some other services).
For full details, please see this blog post.