I have an existing resource group on Azure with a VM running on it and have been playing around with Terraform to try and import the resource to my state file.
I ha
It looks like you need to fix your script file first - azurerm isn't a valid resource name, did you mean:
resource "azurerm_resource_group" "example" {
# ...instance configuration...
name = "MyResourceGroup"
}
As seen in the output, import is expecting two parameters, ADDR and ID - you're only passing (what I assume is) the ID. You also need to tell terraform which resource in your script it maps to:
terraform import azurerm_resource_group.example \
/subscriptions/MySubscriptionNumber/resourceGroups/MyResourceGroup