Azure / aztfexport

A tool to bring existing Azure resources under Terraform's management
https://azure.github.io/aztfexport/
Mozilla Public License 2.0
1.53k stars 174 forks source link

Cannot export resource group #532

Open MLingenau opened 3 weeks ago

MLingenau commented 3 weeks ago

When running a plain export command of a res group (aztfexport.exe rg "rg-name"), the following error occurs when selecting and import:

Error: Cannot import non-existent remote object

While attempting to import an existing object to "azurerm_resource_group.res-0", 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.

magodo commented 3 weeks ago

Probably because the wrong subscription is selected, please use -s to set the subscription id explicitly.