I am facing issue while importing below azure resources.
azurerm_subscription_policy_assignment : while importing policy assignment getting error "ID was missing the policyAssignments
element’ .
ID passed has policyassigments which is case sensitive issue, tried to modify as policyAssignments and tried import command but no luck.
similar issue with azurerm_virtual_machine_data_disk_attachment resource import
terraform import azurerm_virtual_machine_data_disk_attachment.disk0 /subscriptions/xxxxx/resourceGroups/xxx/providers/Microsoft.Compute/disks/vmimport01_DataDisk_0
Error: ID was missing the virtualMachines
element
In this case terraform expecting virtualMachines in id but azure resource id doesn’t have it.
Please help to fix this issue, below are terraform and azure provider versions
required_version = “>= 1.5”
required_providers {
azurerm = {
source = “hashicorp/azurerm”
version = “3.64.0”
}