Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11529

Terraform import azurerm_virtual_machine.XXXX

$
0
0

Hi all,
I’ve been working on importing Azure resources and I was able to do so far no problem…
azurerm_resource_group, azurerm_virtual_network, azurerm_subnet, azurerm_network_interface and now I try to import azurerm_virtual_machine that I created yesterday thru azure portal so I can test on it the “import” (before I move to my production)
I made sure that the VM Resource ID is right, and that resource address is in configuration file … like I did before for other resources but I get this Error:

    Error: resource address "azurerm_virtual_machine.MGTest_VM1" does not exist in the configuration.

Before importing this resource, please create its configuration in the root module. For example:
resource “azurerm_virtual_machine” “MGTest_VM1” {

(resource arguments)

}

not sure what is going on.
I tried to define a section as well using the new: azurerm_windows_virtual_machine but I get the same problem.
Does anyone have any ideas?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 11529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>