Deploy Data Factory from GIT to Azure with ARM Template

You may have noticed the export feature on Azure resource groups don’t like too much the Data Factory. We can’t completely export a Data Factory as an ARM template, it fails.

Probably you know you don’t need to care about this too much. You can link the data factory with a github repo and get source code versioning control. The versioning control is, after all, even better than a simple export to an ARM template.

Even so, we will still need an ARM template to deploy this data factory to another azure environment when we would like so. The good news is this template is not only easy, but absolutely the same for any data factory we would like, because it just need to point to a github repo and all the data factory code will come from there.

The main part of the ARM template is the resource definition and the secret of the data factory resource definition is how to define a data factory already linked with github. Take a look:

It’s a regular resource definition, except by the properties: That’s the secret. We set the property repoConfiguration to an array with all github configurations needed for the data factory.

As you may notice, this property is making reference to a variable. As a result, we need to set this variable before the resources element.

All the github configuration properties are parameterized. Therefore, when deploying a data factory we will only this same ARM template and fill the parameters values.

The final ARM template will be this: