ARMTemplate deployment

B K 0 Reputation points
2024-11-25T07:09:17+00:00

i have the ARMtemplate build and store in the pipeline artifact.When deployed to the PROD it is removing the existing resources which are not a part of the ARMresourcetemplate.The deployment mode is already set to incremental but still on deployment it removes

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pinaki Ghatak 5,600 Reputation points Microsoft Employee Volunteer Moderator
    2024-11-25T09:36:54.4233333+00:00

    Hello @B K

    From the problem you described, it is possible that the resources you are trying to deploy are not defined in your ARM template, and hence, they are being removed during the deployment.

    To avoid this, you can add the resources that you want to keep in your ARM template. Another reason for this issue could be that the resources you are trying to deploy have a different name or location than the existing resources. In this case, the incremental deployment mode will not work as expected, and it will remove the existing resources.

    To avoid this, you can try using the complete deployment mode instead of incremental deployment mode. If you are still facing issues, you can try debugging the issue by checking the deployment logs. The logs will give you more information about the resources that are being removed and the reason for their removal.

    I'd also suggest to utilize Bicep templates, instead of ARM templates, that may solve not only the above issue, but also make it more manageable. Not to forget, Bicep also has the feature of putting a resource template that already exists, but you want just a reference in your template to use.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.