hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.65k forks source link

azurerm_data_factory_linked_custom_service does not support "type" = "Lakehouse" #27044

Closed nise2 closed 3 months ago

nise2 commented 3 months ago

Is there an existing issue for this?

Community Note

Version

terraform {
  backend "azurerm" {}
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">=3.115.0" #(latest today)
    }
 // ...
}

Description

Missing "Lakehouse" Linked Service Type in AzureRM Provider : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_factory_linked_custom_service

Expected Behavior:

I expect the provider to recognize the "Lakehouse" linked service type and create the resource accordingly, allowing me to configure specific properties and behaviors associated with Lakehouse environments.

Here is the documentation associated with this connector : https://learn.microsoft.com/en-gb/azure/data-factory/connector-microsoft-fabric-lakehouse?tabs=data-factory

What I tried to bypass the issue: I (recklessly) replaced "Lakehouse" by "MicrosoftFabricLakehouse" (base on the connector name), but same not working. So I guess that "Lakehouse" is simply not supported yet.

Actual Behavior: The actual terraform apply is overriding the specified "Lakehouse" (from the code and the plan as shown below) type with "LinkedService" leading to incorrect resource creation and potential configuration issues.

Screenshot 2024-08-14 at 19 02 45

Steps to Reproduce:

1. Create a Terraform configuration

resource "azurerm_data_factory_linked_service" "lakehouse_linked_service" {
  name                 = "my_lakehouse_linked_service"
  connection_string   = "my_connection_string"
  type                 = "Lakehouse"  # This type is being replaced
...
}

2. Apply the configuration terraform apply

3. Observe the created resource: Verify in the Azure portal that the linked service type is "LinkedService" instead of "Lakehouse".

Screenshot 2024-08-14 at 16 17 22

I believe adding support for the "Lakehouse" linked service type would greatly enhance the flexibility and capabilities of the AzureRM provider for working with Azure Data Factory / Azure Fabric and Lakehouse environments.

Workaround

Do you have any ?

Affected Resource(s)/Data Source(s)

New Resource(s)/Data Source(s)

In the mean time, I suggest this :

Potential Terraform Configuration

resource "azurerm_data_factory_linked_custom_service" "ls_lakehouse" {
  name            = <lakehouseName>
  data_factory_id = <dataFactoryId>
  type            = "Lakehouse"
...
}

References

https://learn.microsoft.com/en-gb/azure/data-factory/connector-microsoft-fabric-lakehouse?tabs=data-factory https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_factory_linked_custom_service

robertoNdams commented 3 months ago

The solution is very simple:

replace type = "Lakehouse" with type = "LakeHouse"

which comes from this documentation

nise2 commented 3 months ago

Thank you ! 😃

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.