0

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).

All of this was created manually via the portal. Currently deploying & swapping slots 100% with a CI/CD process via GitHub Actions, but in trying to learn more about ARM templates & bicep, wondering…

Can you I take the existing resources I’ve deployed, create matching ARM templates/Bicep files for them, and add those to my CD process? The goal: when I want to make updates, I do it in the ARM/bicep templates and use CD to make the changes instead of manually doing it. But, I don’t want to delete what I have & recreate it.

Is this possible? Or do I need to start from scratch in building the resources & deploying them?

Andrew Connell
  • 4,939
  • 5
  • 30
  • 42

1 Answers1

1

Create the matching ARM templates files for existing resources and add those to your CD pipeline. At the time of creating the ARM template use the incremental mode of deployment. For more information please click here.

Nayeem
  • 26
  • 4
  • Thanks… I think that’s the approach I’m going to take (except using Bicep, but that’s not important to my question or your reply). I can test this approach using by running the deployment using these templates with the `what-if` argument to fine tune the templates. Will test in a dummy repro & resource group. Current challenge is that a lot of things show up in the ARM template when I export that I don’t think I need. Trying to decide if I should use the exported templates as just a reference and not as the starting point… seems I should use as reference. – Andrew Connell Nov 07 '21 at 14:34