-1

I'm setting up my Bicep template to be deployed in a 'Complete' way and every successful build removes the subscription on my Devops page, what resource do I need to add to my bicep template to maintain the billing on my devops project?

At first I was thinking a managed connection but not sure how to define my organization in devops under bicep either.

ChrisW
  • 15
  • 6

1 Answers1

0

The only way to delete resources via a a pure ARM deployment (e.g. no deployment scripts) is through use of the Complete mode. My guess is that you're deploying resources via one template, it creates the subscription, resource groups and resources, then you're running this subsequent template (as Complete) which doesn't reference any of the above, so when it completes, it's removing everything that's not defined (everything) leaving you in your starting state.

Rather, change this to Incremental so you're always adding resources instead of your template reflecting the "final state" the deployment should be in.

Whit Waldo
  • 4,806
  • 4
  • 48
  • 70