Azure Data Factory Data Factory

This page shows how to write Terraform and Azure Resource Manager for Data Factory Data Factory and write them securely.

azurerm_data_factory (Terraform)

The Data Factory in Data Factory can be configured in Terraform with the resource name azurerm_data_factory. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

02_resources.tf#L66
resource "azurerm_data_factory" "dev" {
  name                = var.adf_dev
  location            = var.location
  resource_group_name = azurerm_resource_group.dev.name
  identity {
        type         = "SystemAssigned"
02_resources.tf#L66
resource "azurerm_data_factory" "dev" {
  name                = var.adf_dev
  location            = var.location
  resource_group_name = azurerm_resource_group.dev.name
  identity {
        type         = "SystemAssigned"
main.tf#L1
resource "azurerm_data_factory" "data_factory_good" {
  name                = "example"
  location            = "location"
  resource_group_name = "group"
}

main.tf#L10
resource "azurerm_data_factory" "example" {
  name                = "bbradfmain"
  location            = var.location
  resource_group_name = "bbr-tfstate"
main.tf#L1
resource "azurerm_data_factory" "adf" {
  name                = var.name
  location            = var.location
  resource_group_name = var.resource_group_name
  tags                = var.tags
}
main.tf#L1
resource "azurerm_data_factory" "data_factory_good" {
  name                = "example"
  location            = "location"
  resource_group_name = "group"
}

main.tf#L17
resource "azurerm_data_factory" "adf" {
  name                = var.adfname
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
}
adf.tf#L6
resource "azurerm_data_factory" "cegladanychadf" {
  name                = "fabrykadanychcegla"
  location            = azurerm_resource_group.cegladanychrg.location
  resource_group_name = azurerm_resource_group.cegladanychrg.name
main.tf#L3
resource "azurerm_data_factory" "github" {
  location            = azurerm_resource_group.example.location
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name

  github_configuration {
main.tf#L2
resource "azurerm_data_factory" "DF" {
  name = var.df_name
  location = var.location
  resource_group_name = var.rg_name
  tags =  var.tags
  identity {

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Security Best Practices for azurerm_data_factory

There is 1 setting in azurerm_data_factory that should be taken care of for security reasons. The following section explain an overview and example code.

risk-label

Ensure to disable public access

It is better to disable public access for Data Factory, which is enabled as default.

Review your Azure Data Factory settings

You can check if the azurerm_data_factory setting in your .tf file is correct in 3 min with Shisho Cloud.

Parameters

Explanation in Terraform Registry

Manages an Azure Data Factory (Version 2).

Microsoft.DataFactory/factories (Azure Resource Manager)

The factories in Microsoft.DataFactory can be configured in Azure Resource Manager with the resource name Microsoft.DataFactory/factories. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

azuredeploy.json#L36
            "type": "Microsoft.DataFactory/factories",
            "identity": {
                "type": "SystemAssigned"
            },
            "properties": {}
        },
data-factory-metric-alerts.json#L86
                          "metricNamespace": "Microsoft.DataFactory/factories",
                          "metricName": "PipelineFailedRuns",
                          "dimensions": [
                            {
                                "name": "Name",
                                "operator": "Include",
data-factory-metric-alerts.json#L86
                          "metricNamespace": "Microsoft.DataFactory/factories",
                          "metricName": "PipelineFailedRuns",
                          "dimensions": [
                            {
                                "name": "Name",
                                "operator": "Include",
DF-Resources-link.json#L146
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {},
            "identity": {
AlertsNewyorkDF.json#L86
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {},
            "identity": {
dataFactory.json#L91
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {},
            "identity": {
definitive_dataset_adf_withAlerts.json#L91
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {},
            "identity": {
DF-Resources.json#L117
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {
            },
NY-DF-SchemaChanges.json#L80
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {
            },
dataFactory.json#L99
            "type": "Microsoft.DataFactory/factories",
            "apiVersion": "2018-06-01",
            "name": "[parameters('factoryName')]",
            "location": "[parameters('location')]",
            "properties": {},
            "identity": {

Parameters

  • apiVersion required - string
  • identity optional
      • type required - string

        The identity type.

      • userAssignedIdentities optional - object

        Definition of all user assigned identities for a factory.

  • location optional - string

    The resource location.

  • name required - string

    The factory name.

  • properties required
      • encryption optional
          • identity optional
              • userAssignedIdentity optional - string

                The resource id of the user assigned identity to authenticate to customer's key vault.

          • keyName required - string

            The name of the key in Azure Key Vault to use as Customer Managed Key.

          • keyVersion optional - string

            The version of the key used for CMK. If not provided, latest version will be used.

          • vaultBaseUrl required - string

            The url of the Azure Key Vault used for CMK.

      • globalParameters optional - undefined

        Definition of all parameters for an entity.

      • publicNetworkAccess optional - string

        Whether or not public network access is allowed for the data factory.

      • repoConfiguration optional
          • accountName required - string

            Account name.

          • collaborationBranch required - string

            Collaboration branch.

          • lastCommitId optional - string

            Last commit id.

          • repositoryName required - string

            Repository name.

          • rootFolder required - string

            Root folder.

  • tags optional - string

    The resource tags.

  • type required - string

Frequently asked questions

What is Azure Data Factory Data Factory?

Azure Data Factory Data Factory is a resource for Data Factory of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Data Factory Data Factory?

For Terraform, the ErnstRoell/azure-demo, ErnstRoell/devops-adf and SnidermanIndustries/checkov-fork source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the pycharmer/azure-adf, acarlstein/azure-cloud-platform and acarlstein/azure-cloud-platform source code examples are useful. See the Azure Resource Manager Example section for further details.