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.61k stars 4.65k forks source link

Support to add an azure sql database as an ADF dataset #12586

Open philthynz opened 3 years ago

philthynz commented 3 years ago

Community Note

Description

There is no way to create an Azure ADF dataset for an Azure SQL / MSSQL database:

image

New or Affected Resource(s)

Potential Terraform Configuration

resource "azurerm_data_factory_dataset_azure_sql_database" "example" {
  name                = "my_azure_sql_database"
  resource_group_name = "my_resource_group"
  data_factory_name   = "data_factory_name"
  linked_service_name = "linked_service_database_name"
}

Currently the workaround is to link the ADF to git, change all the json files and then re-upload. Or use ARM templates to deploy the datasets.

aristosvo commented 3 years ago

Hi @philthynz!

You can probably use azurerm_data_factory_custom_dataset introduced in version 2.68.0 by https://github.com/terraform-providers/terraform-provider-azurerm/pull/12484. This is a generic resource for all your datasets. It may be a bit more advanced to configure, but it's more flexible and should give you the necessary functionality.

philthynz commented 3 years ago

Thanks @aristosvo, yes I guess that will work. I didn't see it until now. Thanks!