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

Having an issue with exporting a resource - have tried using Azure CLI (az login) #495

Closed Bjarki2330 closed 5 months ago

Bjarki2330 commented 5 months ago

I'm testing this out for future projects, but I just can't seem to get it to work. At first I was doing it through a powershell terminal, then I tried CMD, but the results are always the same.

exit status 1

Error: retrieving Virtual Machine (Subscription: "redacted" Resource Group Name: "resourcegroup" Virtual Machine Name: "resource"): compute.VirtualMachinesClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceGroupNotFound" Message="Resource group 'resourcegroup' could not be found."

EDIT: Nevermind, I'm just dumb because I didn't set the az context first :D