As you might have noticed; It is not possible to rename an Azure Data Factory. So what do I do if I want to give it a new name?
In this post, I will show you one way of doing this.
The basic steps will be:
- Open your existing Data Factory
- Export it as an ARM Template
- Create an “empty” Data Factory with the new name
- Change the name of the Data Factory in the parameter file in your ARM template
- Deploy your ARM Template
First of all, you should open the Data Factory that you would like to rename. Then export this as an “ARM Template”
Unzip the files to a folder.
Change the name of the Data Factory in your parameter file (arm_template_parameters.json). In my case, I would like to call it MyFactoryName.
Then open PowerShell (it requires you to have Azure PowerShell installed)
Authenticate by writing this command:
Then create an empty Azure Data Factory by writing this command
New-AzDataFactoryV2 -ResourceGroupName MyResourceGroupName -Name MyFactoryName –Location "westeurope"
To deploy your existing ARM Template to Azure
New-AzResourceGroupDeployment -Name MyFactoryName -ResourceGroupName MyResourceGroupName -TemplateFile C:\Users\username\Downloads\arm_template\arm_template.json -TemplateParameterFile C:\Users\username\Downloads\arm_template\arm_template_parameters.json -Verbose
I like adding the -Verbose flag to see all the details.
If everything works out your new “copy” will appear in the portal.