Azure Data Factory Linked Service Key Vault
This page shows how to write Terraform and Azure Resource Manager for Data Factory Linked Service Key Vault and write them securely.
azurerm_data_factory_linked_service_key_vault (Terraform)
The Linked Service Key Vault in Data Factory can be configured in Terraform with the resource name azurerm_data_factory_linked_service_key_vault
. The following sections describe 8 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_data_factory_linked_service_key_vault" "adf_ls_kv" {
name = var.data_factory_linked_service_key_vault_name
resource_group_name = var.resource_group_name
data_factory_name = var.data_factory_name
key_vault_id = var.key_vault_id
resource "azurerm_data_factory_linked_service_key_vault" "linked_service_key_vault" {
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_key_vault" "linked_service_key_vault" {
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_key_vault" "factory_good" {
name = "example"
resource_group_name = "example"
data_factory_name = azurerm_data_factory.data_factory_good.name
key_vault_id = "123456"
resource "azurerm_data_factory_linked_service_key_vault" "factory_good" {
name = "example"
resource_group_name = "example"
data_factory_name = azurerm_data_factory.data_factory_good.name
key_vault_id = "123456"
resource "azurerm_data_factory_linked_service_key_vault" "linked_service_key_vault" {
name = azurecaf_name.dataset.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_key_vault" "key_vaults" {
count = length(var.key_vault_ids)
name = element(split("/", var.key_vault_ids[count.index]), length(split("/", var.key_vault_ids[count.index]))-1)
resource_group_name = data.azurerm_resource_group.this.name
data_factory_name = azurerm_data_factory.this.name
key_vault_id = var.key_vault_ids[count.index]
resource "azurerm_data_factory_linked_service_key_vault" "factory_good" {
name = "example"
resource_group_name = "example"
data_factory_name = azurerm_data_factory.data_factory_good.name
key_vault_id = "123456"
Parameters
-
additional_properties
optional - map from string to string -
annotations
optional - list of string -
data_factory_name
required - string -
description
optional - string -
id
optional computed - string -
integration_runtime_name
optional - string -
key_vault_id
required - string -
name
required - string -
parameters
optional - map from string to string -
resource_group_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages a Linked Service (connection) between Key Vault and Azure Data Factory.
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 Key Vault?
Azure Data Factory Linked Service Key Vault 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 Key Vault?
For Terraform, the FabLabGent/InfrastructureFabLabGent, anmoltoppo/Terraform and pkhuntia/aztfmod source code examples are useful. See the Terraform Example section for further details.