Skip to content

azurermDataFactory

Manages an Azure Data Factory (Version 2).

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermDataFactoryExample = new azurerm.dataFactory.DataFactory(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Data Factory. Changing this forces a new resource to be created. Must be globally unique. See the Microsoft documentation for all restrictions.

  • resourceGroupName - (Required) The name of the resource group in which to create the Data Factory. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • githubConfiguration - (Optional) A githubConfiguration block as defined below.

  • globalParameter - (Optional) A list of globalParameter blocks as defined above.

  • identity - (Optional) An identity block as defined below.

  • vstsConfiguration - (Optional) A vstsConfiguration block as defined below.

  • managedVirtualNetworkEnabled - (Optional) Is Managed Virtual Network enabled?

  • publicNetworkEnabled - (Optional) Is the Data Factory visible to the public network? Defaults to true.

  • customerManagedKeyId - (Optional) Specifies the Azure Key Vault Key ID to be used as the Customer Managed Key (CMK) for double encryption. Required with user assigned identity.

  • customerManagedKeyIdentityId - (Optional) Specifies the ID of the user assigned identity associated with the Customer Managed Key. Must be supplied if customerManagedKeyId is set.

  • purviewId - (Optional) Specifies the ID of the purview account resource associated with the Data Factory.

  • tags - (Optional) A mapping of tags to assign to the resource.


A githubConfiguration block supports the following:

  • accountName - (Required) Specifies the GitHub account name.

  • branchName - (Required) Specifies the branch of the repository to get code from.

  • gitUrl - (Required) Specifies the GitHub Enterprise host name. For example: https://github.mydomain.com. Use https://github.com for open source repositories.

  • repositoryName - (Required) Specifies the name of the git repository.

  • rootFolder - (Required) Specifies the root folder within the repository. Set to / for the top level.

-> Note: You must log in to the Data Factory management UI to complete the authentication to the GitHub repository.


A globalParameter block supports the following:

  • name - (Required) Specifies the global parameter name.

  • type - (Required) Specifies the global parameter type. Possible Values are array, bool, float, int, object or string.

  • value - (Required) Specifies the global parameter value.

-> Note: For type array and object it is recommended to use jsonencode() for the value


An identity block supports the following:

  • type - (Required) Specifies the type of Managed Service Identity that should be configured on this Data Factory. Possible values are systemAssigned, userAssigned, systemAssigned,UserAssigned (to enable both).

  • identityIds - (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Data Factory.

\~> NOTE: This is required when type is set to userAssigned or systemAssigned,UserAssigned.


A vstsConfiguration block supports the following:

  • accountName - (Required) Specifies the VSTS account name.

  • branchName - (Required) Specifies the branch of the repository to get code from.

  • projectName - (Required) Specifies the name of the VSTS project.

  • repositoryName - (Required) Specifies the name of the git repository.

  • rootFolder - (Required) Specifies the root folder within the repository. Set to / for the top level.

  • tenantId - (Required) Specifies the Tenant ID associated with the VSTS account.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Data Factory.

  • identity - An identity block as defined below.


An identity block exports the following:

  • principalId - The Principal ID associated with this Managed Service Identity.

  • tenantId - The Tenant ID associated with this Managed Service Identity.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Data Factory.
  • update - (Defaults to 30 minutes) Used when updating the Data Factory.
  • read - (Defaults to 5 minutes) Used when retrieving the Data Factory.
  • delete - (Defaults to 30 minutes) Used when deleting the Data Factory.

Import

Data Factory can be imported using the resourceId, e.g.

terraform import azurerm_data_factory.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example