BadRequest: The document creation or update failed because of invalid reference

AyusmanBasu-6332 6 Reputation points
2020-06-19T11:02:27.247+00:00

I'm trying to deploy an ADF pipeline using CICD (Azure DevOps Deployment) using a release pipeline. Here I'm trying to merge stuff from my Collaboration branch to master (usig GIT). I'm also using: Azure Deployment:Create Or Update Resource Group action (Agent Job) as a part of the Continuous Deployment Process

I'm getting the following error:

[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details. ##[error]Details: ##[error]BadRequest: The document creation or update failed because of invalid reference 'irslinked'. ##[error]Check out the troubleshooting guide to see if your issue is addressed: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting ##[error]Task failed while creating or updating the template deployment.

irslinked is the name of a self-hosted IR (Linked)
this IR: irslinked is also included in the overwrite template parameters list.

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

1 answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,236 Reputation points
    2020-06-24T22:23:40.083+00:00

    The way a linked IR ( using one hosted by other factory) is defined, is different from how a shared IR ( one hosted in this factory, but usable by others) is defined.

    A problem can occur if you take an ARM template from the hosting factory, and try to deploy it to another factory. Since the ARM template was taken from the host factory, the new factory will look for something that isn't there. The new factory will think it is the host of the IR, when it is not.

    The way to avoid this problem , is to have a third factory which is used just for hosting the IR's. This way all your environments can use the same linked IR definition.

    Is this the case for you, @AyusmanBasu-6332 ?


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.