Skip to content

azurermDataFactoryLinkedServiceDataLakeStorageGen2

Manages a Linked Service (connection) between Data Lake Storage Gen2 and Azure Data Factory.

\~> Note: All arguments including the servicePrincipalKey will be stored in the raw state as plain-text. Read more about sensitive data in state.

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 dataAzurermClientConfigCurrent =
  new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
    this,
    "current",
    {}
  );
const azurermDataFactoryExample = new azurerm.dataFactory.DataFactory(
  this,
  "example_2",
  {
    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");
const azurermDataFactoryLinkedServiceDataLakeStorageGen2Example =
  new azurerm.dataFactoryLinkedServiceDataLakeStorageGen2.DataFactoryLinkedServiceDataLakeStorageGen2(
    this,
    "example_3",
    {
      data_factory_id: azurermDataFactoryExample.id,
      name: "example",
      service_principal_id: dataAzurermClientConfigCurrent.clientId,
      service_principal_key: "exampleKey",
      tenant: "11111111-1111-1111-1111-111111111111",
      url: "https://datalakestoragegen2",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryLinkedServiceDataLakeStorageGen2Example.overrideLogicalId(
  "example"
);

Argument Reference

The following supported arguments are common across all Azure Data Factory Linked Services:

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

  • dataFactoryId - (Required) The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.

  • description - (Optional) The description for the Data Factory Linked Service.

  • integrationRuntimeName - (Optional) The integration runtime reference to associate with the Data Factory Linked Service.

  • annotations - (Optional) List of tags that can be used for describing the Data Factory Linked Service.

  • parameters - (Optional) A map of parameters to associate with the Data Factory Linked Service.

  • additionalProperties - (Optional) A map of additional properties to associate with the Data Factory Linked Service.

The following supported arguments are specific to Data Lake Storage Gen2 Linked Service:

  • url - (Required) The endpoint for the Azure Data Lake Storage Gen2 service.

\~> NOTE Users should specify only one of the following three authentication strategies: storage account key, managed identity, service principal.

  • storageAccountKey - (Optional) The Storage Account Key with which to authenticate against the Azure Data Lake Storage Gen2 account. Incompatible with servicePrincipalId, servicePrincipalKey, tenant and useManagedIdentity.

  • useManagedIdentity - (Optional) Whether to use the Data Factory's managed identity to authenticate against the Azure Data Lake Storage Gen2 account. Incompatible with servicePrincipalId, servicePrincipalKey, tenant and storageAccountKey.

  • servicePrincipalId - (Optional) The service principal id with which to authenticate against the Azure Data Lake Storage Gen2 account. Incompatible with storageAccountKey and useManagedIdentity.

  • servicePrincipalKey - (Optional) The service principal key with which to authenticate against the Azure Data Lake Storage Gen2 account.

  • tenant - (Optional) The tenant id or name in which the service principal exists to authenticate against the Azure Data Lake Storage Gen2 account.

\~> NOTE If servicePrincipalId is used, servicePrincipalKey and tenant are also required.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Data Factory Data Lake Storage Gen2 Linked Service.

Timeouts

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

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

Import

Data Factory Data Lake Storage Gen2 Linked Services can be imported using the resourceId, e.g.

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