Azure Data Factory Linked Service Azure Blob Storage
This page shows how to write Terraform and Azure Resource Manager for Data Factory Linked Service Azure Blob Storage and write them securely.
azurerm_data_factory_linked_service_azure_blob_storage (Terraform)
The Linked Service Azure Blob Storage in Data Factory can be configured in Terraform with the resource name azurerm_data_factory_linked_service_azure_blob_storage
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_data_factory_linked_service_azure_blob_storage" "linkedsource" {
name = "linkedservicesource"
resource_group_name = azurerm_resource_group.rg.name
data_factory_name = azurerm_data_factory.adf.name
connection_string = azurerm_storage_account.storage.primary_connection_string
}
resource "azurerm_data_factory_linked_service_azure_blob_storage" "linkedsource" {
name = "linkedservicesource"
resource_group_name = azurerm_resource_group.rg.name
data_factory_name = azurerm_data_factory.adf.name
connection_string = azurerm_storage_account.storage.primary_connection_string
}
resource "azurerm_data_factory_linked_service_azure_blob_storage" "blob-strg-linkedsvc" {
name = var.service_settings.name
resource_group_name = var.context.resource_group_name
data_factory_name = var.service_settings.data_factory_name
connection_string = var.service_settings.connection_string
}
resource "azurerm_data_factory_linked_service_azure_blob_storage" "adf_ls_blob" {
name = var.data_factory_linked_service_azure_blob_storage_name
resource_group_name = var.resource_group_name
data_factory_name = var.data_factory_name
connection_string = var.primary_blob_connection_string
resource "azurerm_data_factory_linked_service_azure_blob_storage" "linked_service_name" {
name = "storage-Linked-service"
resource_group_name = var.rg_name
data_factory_name = azurerm_data_factory.data_factory.name
use_managed_identity = data.azurerm_data_factory.data_factory.identity.0.principal_id
resource "azurerm_data_factory_linked_service_azure_blob_storage" "linked_service_azure_blob_storage" {
name = var.name
resource_group_name = var.resource_group_name
data_factory_name = var.data_factory_name
description = try(var.description, null)
integration_runtime_name = try(var.integration_runtime_name, null)
resource "azurerm_data_factory_linked_service_azure_blob_storage" "blob-strg-linkedsvc" {
name = var.service_settings.name
resource_group_name = var.context.resource_group_name
data_factory_name = var.service_settings.data_factory_name
connection_string = var.service_settings.connection_string
}
}
}
module "naming" {
source = "../../../naming"
suffix = var.suffix
resource "azurerm_data_factory_linked_service_azure_blob_storage" "bbr_adf_blob_input_link" {
name = "bbradfbloblink01"
resource_group_name = azurerm_resource_group.bbr_adf_rg.name
data_factory_name = azurerm_data_factory.bbr_adf.name
connection_string = azurerm_storage_account.bbr_adf_sta_in.primary_connection_string
resource "azurerm_data_factory_linked_service_azure_blob_storage" "linked_service_azure_blob_storage" {
name = var.name
resource_group_name = var.resource_group_name
data_factory_name = var.data_factory_name
description = try(var.description, null)
integration_runtime_name = try(var.integration_runtime_name, null)
Parameters
-
additional_properties
optional - map from string to string -
annotations
optional - list of string -
connection_string
optional - string -
data_factory_name
required - string -
description
optional - string -
id
optional computed - string -
integration_runtime_name
optional - string -
name
required - string -
parameters
optional - map from string to string -
resource_group_name
required - string -
sas_uri
optional - string -
service_endpoint
optional - string -
service_principal_id
optional - string -
service_principal_key
optional - string -
tenant_id
optional - string -
use_managed_identity
optional - bool -
timeouts
single block
Explanation in Terraform Registry
Manages a Linked Service (connection) between an Azure Blob Storage Account and Azure Data Factory.
Note: All arguments including the client secret will be stored in the raw state as plain-text. Read more about sensitive data in state.
Tips: Best Practices for The Other Azure Data Factory Resources
In addition to the azurerm_data_factory, Azure Data Factory has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_data_factory
Ensure to disable public access
It is better to disable public access for Data Factory, which is enabled as default.
Microsoft.DataFactory/factories/linkedservices (Azure Resource Manager)
The factories/linkedservices in Microsoft.DataFactory can be configured in Azure Resource Manager with the resource name Microsoft.DataFactory/factories/linkedservices
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersion
required - stringname
required - stringThe linked service name.
properties
requiredadditionalProperties
optional - objectUnmatched properties from the message are deserialized this collection
annotations
optional - arrayList of tags that can be used for describing the linked service.
connectVia
optionalparameters
optional - objectAn object mapping parameter names to argument values.
referenceName
required - stringReference integration runtime name.
type
required - stringType of integration runtime.
description
optional - stringLinked service description.
parameters
optional - undefinedDefinition of all parameters for an entity.
type
required - string
Frequently asked questions
What is Azure Data Factory Linked Service Azure Blob Storage?
Azure Data Factory Linked Service Azure Blob Storage 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 Linked Service Azure Blob Storage?
For Terraform, the abdulkhadeer366/adfterraform, abdulkhadeer366/doraadf and aadi555/azurerm source code examples are useful. See the Terraform Example section for further details.