Import ADF in terraform state

I have Azure Data Factory which was created manually. It consists of Linked services, runtime integrations and few triggers. Now I want to import all these configurations into terraform state file. I have tried below things.

resource "azurerm_data_factory" "adf" {
  name                = "project-apps-${var.env_info.name}-df"
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
}

terraform import 'azurerm_data_factory.adf' 'ADF resource ID'

Although above block imported ADF related content but not everything what it have currently. i.e.

Linked services, runtime integrations and triggers.

Could you please let me know how do I import everything about particular resource?

Hi @khandushinde4, in your case, you need to understand all the resources created manually as part of your ADF, create a resource block for each of them, and them import each of them one at a time. After, you can now start adding dependencies as you see fit in other to achieve your goal.

1 Like

sure…thank you @mifalowo for the response!