-
Notifications
You must be signed in to change notification settings - Fork 218
Disk failed to be exported, error says it does not exist (it does) #498
Description
I tried to export a resource group and 74/75 resources completed successfully which is amazing. However, one disk I never suspected would be a problem, has failed. The error message below also doesn't explain much, as it is also wrong.
/subscriptions/a56db8aa-****-****-****-84c0fa3866a1/resourceGroups/REDACTED/providers/Microsoft.Compute/virtualMachines/REDACTEDApp01/dataDisks/appdisk0
exit status 1
Error: Cannot import non-existent remote object
While attempting to import an existing object to
"azurerm_virtual_machine_data_disk_attachment.res-6", the provider detected
that no object exists with the given id. Only pre-existing objects can be
imported; check that the id is correct and that it is associated with the
provider's configured region or endpoint, or use "terraform apply" to create
a new remote object for this resource.
This resource absolutely does exist, as shown below:
Any idea why it failed to be recognized and exported? This should have been business as usual.
I'm using: aztfexport version v0.14.0(fb772ba)
and: Terraform v1.7.0 on linux_amd64
with:
azure-cli 2.56.0
core 2.56.0
telemetry 1.1.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/opt/az/bin/python3'
Extensions directory '/home/REDACTED/.azure/cliextensions'
Python (Linux) 3.11.5 (main, Jan 8 2024, 09:08:13) [GCC 11.4.0]
Your CLI is up-to-date.
I found #440
and tried the instructions there to list the resources via AzureCLI first. Here is the failed appdisk0 resource listed:
{
"changedTime": "2023-09-07T13:45:29.570855+00:00",
"createdTime": "2023-09-07T13:25:57.524618+00:00",
"extendedLocation": null,
"id": "/subscriptions/a56db8aa-****-****-****-84c0fa3866a1/resourceGroups/REDACTED/providers/Microsoft.Compute/disks/appdisk0",
"identity": null,
"kind": null,
"location": "northeurope",
"managedBy": "/subscriptions/a56db8aa-****-****-****-84c0fa3866a1/resourceGroups/REDACTED/providers/Microsoft.Compute/virtualMachines/REDACTEDApp01",
"name": "appdisk0",
"plan": null,
"properties": null,
"provisioningState": "Succeeded",
"resourceGroup": "REDACTED",
"sku": {
"capacity": null,
"family": null,
"model": null,
"name": "Premium_LRS",
"size": null,
"tier": "Premium"
},
"tags": null,
"type": "Microsoft.Compute/disks",
"zones": [
"1"
]
},
I tried also --use-azure-cli-cred and this too: #440 (comment)
Sadly neither have helped with this disk.
Could someone please suggest some more things to try?
