Azure
How to Import Azure Resources into Terraform
To import Azure infrastructure into Terraform, scan it with Terraback (
terraback scan all azure --subscription-id YOUR_ID) and run terraback azure import --method bulk. Terraback generates the resource blocks and the Terraform 1.5+ import blocks for every resource it finds. Pick a resource below for a focused guide.Scan Azure and generate Terraform
terraback scan all azure --subscription-id YOUR_IDterraback azure import --method bulkAzure import guides
Azure Virtual MachineFree
azurerm_linux_virtual_machineAzure Storage AccountFreeazurerm_storage_accountAzure Virtual NetworkFreeazurerm_virtual_networkAzure Resource GroupProazurerm_resource_groupAzure Key VaultProazurerm_key_vaultAzure Kubernetes Service (AKS) ClusterProazurerm_kubernetes_clusterAzure SubnetFreeazurerm_subnetAzure API ManagementProazurerm_api_managementAzure App ConfigurationProazurerm_app_configurationAzure Application GatewayProazurerm_application_gatewayAzure Application InsightsProazurerm_application_insightsAzure Automation AccountProazurerm_automation_accountAzure CDN EndpointProazurerm_cdn_endpointAzure CDN ProfileProazurerm_cdn_profileAzure Container RegistryProazurerm_container_registryAzure Cosmos DB AccountProazurerm_cosmosdb_accountAzure Cosmos DB SQL DatabaseProazurerm_cosmosdb_sql_databaseAzure Data FactoryProazurerm_data_factoryAzure Databricks WorkspaceProazurerm_databricks_workspaceAzure DNS ZoneProazurerm_dns_zoneAzure DNS A RecordProazurerm_dns_a_recordAzure Event HubProazurerm_eventhubAzure Event Hubs NamespaceProazurerm_eventhub_namespaceAzure Event Grid TopicProazurerm_eventgrid_topicAzure Key Vault SecretProazurerm_key_vault_secretAzure Key Vault KeyProazurerm_key_vault_keyAzure Kubernetes Node PoolProazurerm_kubernetes_cluster_node_poolAzure Load BalancerProazurerm_lbAzure Log Analytics WorkspaceProazurerm_log_analytics_workspaceAzure Logic App WorkflowProazurerm_logic_app_workflowAzure Managed DiskProazurerm_managed_diskAzure Monitor Action GroupProazurerm_monitor_action_groupAzure Monitor Metric AlertProazurerm_monitor_metric_alertAzure SQL DatabaseProazurerm_mssql_databaseAzure SQL ServerProazurerm_mssql_serverAzure NAT GatewayProazurerm_nat_gatewayAzure Network InterfaceProazurerm_network_interfaceAzure Network Security GroupProazurerm_network_security_groupAzure Private DNS ZoneProazurerm_private_dns_zoneAzure Private EndpointProazurerm_private_endpointAzure Public IPProazurerm_public_ipAzure Recovery Services VaultProazurerm_recovery_services_vaultAzure Cache for RedisProazurerm_redis_cacheAzure Role AssignmentProazurerm_role_assignmentAzure Route TableProazurerm_route_tableAzure AI Search ServiceProazurerm_search_serviceAzure Service Bus NamespaceProazurerm_servicebus_namespaceAzure Service Bus QueueProazurerm_servicebus_queueAzure Service Bus TopicProazurerm_servicebus_topicAzure App Service PlanProazurerm_service_planAzure Storage File ShareProazurerm_storage_shareAzure User-Assigned Managed IdentityProazurerm_user_assigned_identityAzure Virtual Network PeeringProazurerm_virtual_network_peeringAzure Web Application Firewall PolicyProazurerm_web_application_firewall_policyAzure API Management APIProazurerm_api_management_apiAzure Application Security GroupProazurerm_application_security_groupAzure Automation RunbookProazurerm_automation_runbookAzure Cosmos DB SQL ContainerProazurerm_cosmosdb_sql_containerAzure DNS CNAME RecordProazurerm_dns_cname_recordAzure Event Grid Event SubscriptionProazurerm_eventgrid_event_subscriptionAzure Event Hub Consumer GroupProazurerm_eventhub_consumer_groupAzure Managed ImageProazurerm_imageAzure Key Vault CertificateProazurerm_key_vault_certificateAzure Load Balancer Backend PoolProazurerm_lb_backend_address_poolAzure Load Balancer RuleProazurerm_lb_ruleAzure Load Balancer ProbeProazurerm_lb_probeAzure Load Balancer NAT RuleProazurerm_lb_nat_ruleAzure Linux VM Scale SetProazurerm_linux_virtual_machine_scale_setAzure Windows VM Scale SetProazurerm_windows_virtual_machine_scale_setAzure Monitor Autoscale SettingProazurerm_monitor_autoscale_settingAzure Monitor Diagnostic SettingProazurerm_monitor_diagnostic_settingAzure SQL Firewall RuleProazurerm_mssql_firewall_ruleAzure SQL Elastic PoolProazurerm_mssql_elasticpoolAzure Private DNS A RecordProazurerm_private_dns_a_recordAzure Custom Role DefinitionProazurerm_role_definitionAzure RouteProazurerm_routeAzure Service Bus SubscriptionProazurerm_servicebus_subscriptionAzure Subnet NSG AssociationProazurerm_subnet_network_security_group_associationAzure VM Data Disk AttachmentProazurerm_virtual_machine_data_disk_attachmentAzure azapi_resourceProazapi_resourceAzure API ConnectionProazurerm_api_connectionAzure Container Registry WebhookProazurerm_container_registry_webhookAzure DNS NS RecordProazurerm_dns_ns_recordAzure Monitor Activity Log AlertProazurerm_monitor_activity_log_alertAzure Monitor Scheduled Query Rule Alert (v2)Proazurerm_monitor_scheduled_query_rules_alert_v2Azure SQL Database Extended Auditing PolicyProazurerm_mssql_database_extended_auditing_policyAzure SQL Server Extended Auditing PolicyProazurerm_mssql_server_extended_auditing_policyAzure SQL Server Security Alert PolicyProazurerm_mssql_server_security_alert_policyAzure SQL Virtual Network RuleProazurerm_mssql_virtual_network_ruleAzure NetApp AccountProazurerm_netapp_accountAzure NetApp Capacity PoolProazurerm_netapp_poolAzure NetApp VolumeProazurerm_netapp_volumeAzure Portal DashboardProazurerm_portal_dashboardAzure Proximity Placement GroupProazurerm_proximity_placement_groupAzure Cache for Redis Enterprise ClusterProazurerm_redis_enterprise_clusterAzure Cache for Redis Enterprise DatabaseProazurerm_redis_enterprise_databaseAzure Redis Firewall RuleProazurerm_redis_firewall_ruleAzure Redis Linked ServerProazurerm_redis_linked_serverAzure SSH Public KeyProazurerm_ssh_public_keyAzure Subnet NAT Gateway AssociationProazurerm_subnet_nat_gateway_associationAzure Subnet Route Table AssociationProazurerm_subnet_route_table_associationImport your whole Azure account in minutes
Terraback supports 80+ Azure resource types and emits clean Terraform plus import blocks, running locally with read-only credentials.