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
resource "azurerm_data_factory" "dev" {
name = var.adf_dev
location = var.location
resource_group_name = azurerm_resource_group.dev.name
identity {
type = "SystemAssigned"
resource "azurerm_data_factory" "dev" {
name = var.adf_dev
location = var.location
resource_group_name = azurerm_resource_group.dev.name
identity {
type = "SystemAssigned"
resource "azurerm_data_factory" "data_factory_good" {
name = "example"
location = "location"
resource_group_name = "group"
}
resource "azurerm_data_factory" "example" {
name = "bbradfmain"
location = var.location
resource_group_name = "bbr-tfstate"
resource "azurerm_data_factory" "adf" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
tags = var.tags
}
resource "azurerm_data_factory" "data_factory_good" {
name = "example"
location = "location"
resource_group_name = "group"
}
resource "azurerm_data_factory" "adf" {
name = var.adfname
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
}
resource "azurerm_data_factory" "cegladanychadf" {
name = "fabrykadanychcegla"
location = azurerm_resource_group.cegladanychrg.location
resource_group_name = azurerm_resource_group.cegladanychrg.name
resource "azurerm_data_factory" "github" {
location = azurerm_resource_group.example.location
name = "example"
resource_group_name = azurerm_resource_group.example.name
github_configuration {
resource "azurerm_data_factory" "DF" {
name = var.df_name
location = var.location
resource_group_name = var.rg_name
tags = var.tags
identity {
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.
Ensure to disable public access
It is better to disable public access for Data Factory, which is enabled as default.
Parameters
-
id
optional computed - string -
location
required - string -
name
required - string -
public_network_enabled
optional - bool -
resource_group_name
required - string -
tags
optional - map from string to string -
github_configuration
list block-
account_name
required - string -
branch_name
required - string -
git_url
required - string -
repository_name
required - string -
root_folder
required - string
-
-
identity
list block-
principal_id
optional computed - string -
tenant_id
optional computed - string -
type
required - string
-
-
timeouts
single block -
vsts_configuration
list block-
account_name
required - string -
branch_name
required - string -
project_name
required - string -
repository_name
required - string -
root_folder
required - string -
tenant_id
required - string
-
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
"type": "Microsoft.DataFactory/factories",
"identity": {
"type": "SystemAssigned"
},
"properties": {}
},
"metricNamespace": "Microsoft.DataFactory/factories",
"metricName": "PipelineFailedRuns",
"dimensions": [
{
"name": "Name",
"operator": "Include",
"metricNamespace": "Microsoft.DataFactory/factories",
"metricName": "PipelineFailedRuns",
"dimensions": [
{
"name": "Name",
"operator": "Include",
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {},
"identity": {
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {},
"identity": {
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {},
"identity": {
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {},
"identity": {
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {
},
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {
},
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"properties": {},
"identity": {
Parameters
apiVersion
required - stringidentity
optionaltype
required - stringThe identity type.
userAssignedIdentities
optional - objectDefinition of all user assigned identities for a factory.
location
optional - stringThe resource location.
name
required - stringThe factory name.
properties
requiredencryption
optionalidentity
optionaluserAssignedIdentity
optional - stringThe resource id of the user assigned identity to authenticate to customer's key vault.
keyName
required - stringThe name of the key in Azure Key Vault to use as Customer Managed Key.
keyVersion
optional - stringThe version of the key used for CMK. If not provided, latest version will be used.
vaultBaseUrl
required - stringThe url of the Azure Key Vault used for CMK.
globalParameters
optional - undefinedDefinition of all parameters for an entity.
publicNetworkAccess
optional - stringWhether or not public network access is allowed for the data factory.
repoConfiguration
optionalaccountName
required - stringAccount name.
collaborationBranch
required - stringCollaboration branch.
lastCommitId
optional - stringLast commit id.
repositoryName
required - stringRepository name.
rootFolder
required - stringRoot folder.
tags
optional - stringThe 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.