Coder Perfect

Replace a current Azure resource with an ARM/Bicep resource, or relink it?


I have an existing Azure resource (Function App) with some dependencies (storage & ApService) it needs to run & for monitoring (AppInsights) as well as some things referenced by the functions (storage queues, tables, etc).

Everything was done manually through the site. I’m currently deploying and swapping slots using GitHub Actions as part of a CI/CD process, but I’m curious about ARM templates and bicep.

Can you develop matching ARM templates/Bicep files for the existing resources I’ve deployed and add them to my CD process? The goal is that instead of manually updating the ARM/bicep templates, I do so in the ARM/bicep templates and utilize CD to make the modifications. But I don’t want to re-create what I already have.

Is that even possible? Or do I have to start from scratch when it comes to creating and distributing resources?

Asked by Andrew Connell

Solution #1

Create ARM template files for existing resources and include them in your CD workflow. Use the incremental way of deployment while constructing the ARM template. Please click here for additional details.

Answered by Nayeem

Post is based on