I tried to deploy ARM template for azure Data Factory as part of DevOps implementation.
Mode of deployment was selected as complete in oreder to cleanup the existing adf instance and deploy only the pipelines that are available in ARM template. as shown below.
When I tried to run the deployment, It failed with an error as
##[error]The deployment failed because some resources could not be deleted. This might be due to not having permissions to delete resources in the targeted scope. Please see https://aka.ms/arm-debug for usage details.
2020-11-02T05:33:34.5795133Z ##[error]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
When I did a debug on this issue, i could understand that the deployment scope is selected as Resource Group and deployment task tried to delete all the resources under this resource group and failed because it couldnt delete resources other than ADF instance because of access issues.
Since I do not have access to other resources, they were not deleted, otherwise i could have messed up everything by deleting all other resources like ADLS, databricks, sql....
Since I am deploying ADF ARM template is there any way to restrict the deployment scope only for ADF instance, which will not affect other resources.
Any leads appreciated!
I have a query about the What-If feature provided by azure for ARM template deployment. Can we use this in our Release pipeline as a powershell task?