Azure Data Factory Linked Service SQL Server
This page shows how to write Terraform and Azure Resource Manager for Data Factory Linked Service SQL Server and write them securely.
azurerm_data_factory_linked_service_sql_server (Terraform)
The Linked Service SQL Server in Data Factory can be configured in Terraform with the resource name azurerm_data_factory_linked_service_sql_server. The following sections describe 9 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_data_factory_linked_service_sql_server" "linked_service_sql_server" {
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_sql_server" "linked_service_sql_server" {
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_sql_server" "this" {
additional_properties = var.additional_properties
annotations = var.annotations
connection_string = var.connection_string
data_factory_name = var.data_factory_name
description = var.description
resource "azurerm_data_factory_linked_service_sql_server" "this" {
additional_properties = var.additional_properties
annotations = var.annotations
connection_string = var.connection_string
data_factory_name = var.data_factory_name
description = var.description
resource "azurerm_data_factory_linked_service_sql_server" "linked_service_sql_server" {
name = azurecaf_name.dataset.name
resource_group_name = var.resource_group_name
data_factory_name = var.data_factory_name
description = try(var.settings.description, null)
integration_runtime_name = try(var.settings.integration_runtime_name, null)
resource "azurerm_data_factory_linked_service_sql_server" "main" {
name = var.data_factory_linked_sql_name
resource_group_name = data.azurerm_resource_group.main.name
data_factory_name = azurerm_data_factory.main.name
connection_string = var.data_factory_linked_sql_connection_string
integration_runtime_name = azurerm_data_factory_integration_runtime_managed.main.name
resource "azurerm_data_factory_linked_service_sql_server" "example" {
name = var.name
resource_group_name = var.resource_group_name
data_factory_name = var.name
connection_string = "Server=tcp:alessiodatalake.database.windows.net,1433;Initial Catalog=alessiodatalake;Persist Security Info=False;User ID=alessiodatalake;Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}
resource "azurerm_data_factory_linked_service_sql_server" "linked_service_sql_server" {
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_sql_server" "MDSDAFACLSSIS" {
name = "mdsdflinkedssis"
resource_group_name = azurerm_resource_group.MDSDATAFAC.name
data_factory_name = azurerm_data_factory.MDSDAFAC.name
connection_string = "Integrated Security=False;Data Source=test;Initial Catalog=test;User ID=test;Password=test"
}
Parameters
-
additional_propertiesoptional - map from string to string -
annotationsoptional - list of string -
connection_stringrequired - string -
data_factory_namerequired - string -
descriptionoptional - string -
idoptional computed - string -
integration_runtime_nameoptional - string -
namerequired - string -
parametersoptional - map from string to string -
resource_group_namerequired - string -
key_vault_passwordlist block-
linked_service_namerequired - string -
secret_namerequired - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages a Linked Service (connection) between a SQL Server 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
apiVersionrequired - stringnamerequired - stringThe linked service name.
propertiesrequiredadditionalPropertiesoptional - objectUnmatched properties from the message are deserialized this collection
annotationsoptional - arrayList of tags that can be used for describing the linked service.
connectViaoptionalparametersoptional - objectAn object mapping parameter names to argument values.
referenceNamerequired - stringReference integration runtime name.
typerequired - stringType of integration runtime.
descriptionoptional - stringLinked service description.
parametersoptional - undefinedDefinition of all parameters for an entity.
typerequired - string
Frequently asked questions
What is Azure Data Factory Linked Service SQL Server?
Azure Data Factory Linked Service SQL Server 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 SQL Server?
For Terraform, the anmoltoppo/Terraform, pkhuntia/aztfmod and kevinhead/azurerm source code examples are useful. See the Terraform Example section for further details.