Add resources to existing azure resource group - azure

Today I tried to add new VM into an Azure Resource Group that already has VMs and other resources and it was successful. I removed it and after a while, when a new VM was being added into the same Resource Group, it prompts a new Resource Group would be needed to store the new VM.
I was wondering when a new VM could and could not be added into a Resource Group taken by other resources.
Thanks.

No, this is not the case, you can put almost any resources together in a resource group. there are some weird exception like: windows and linux app service plans cant exist in the same resource group.
you can add resources to different regions in the same resource group as well
you cannot add resources with the same name and type to the resource group, because name + type combination has to be the same
so you can add VM called new and VM called new1, but not VM called new and another VM called new; but you can add VM called new and Azure SQL called new into the same resource group (give that Azure SQL instance called new is available, but this has nothing to do with the resource group)

This can now be done from the portal. In your portal at the Home page click Virtual Machines, then Add. You can then choose the current resource group and add the machine in to it. May be of use to someone else coming along later like I did.

Related

If a blank Azure Subscription is provided, how do you deploy a new Resource Group, and is it free?

If a blank Azure Subscription is provided, how do you deploy a new Resource Group, and is it free?
And following deployment of a new Resource Group, are there any steps that need to be undertaken before deploying resources to the newly created resource group?
how do you deploy a new Resource Group, and is it free?
There are various API's (REST API, Powershell, Azure CLI) to do this. The easiest is doing it interactively from the Azure portal. A resource group is free
And following deployment of a new Resource Group, are there any steps that need to be undertaken before deploying resources to the newly created resource group?
Generally No. Unless it is locked (by default it isn't) or has specific security stopping you (which won't be an isse if you are the same user)

Move Azure SQL Managed Instance across subscription

I have two SQL managed instance in two different region(One in Australia East another one in Australia Southeast. They are in a Pay-As-You-Go subscription. Now I want to move those resources to a CSP subscription. Is it possible to move SQL managed instance across subscription?
Azure SQL managed instance supports the move operation: move to another resource group or another subscription. You can get this from this document: Move operation support for resources.
If you want to move the managed instance subscription, you need to operate on the resource group overview. Choose all the resource about managed instance.
For more details, please see this Azure tutorial: Move resources to new resource group or subscription:
Summary:
This article shows you how to move Azure resources to either another Azure subscription or another resource group under the same subscription. You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources.
Both the source group and the target group are locked during the move operation. Write and delete operations are blocked on the resource groups until the move completes. This lock means you can't add, update, or delete resources in the resource groups, but it doesn't mean the resources are frozen. For example, if you move a SQL Server and its database to a new resource group, an application that uses the database experiences no downtime. It can still read and write to the database.
Moving a resource only moves it to a new resource group. The move operation can't change the location of the resource. The new resource group may have a different location, but that doesn't change the location of the resource.
It also gives you many examples about how to move resource group or subscription:
By using Azure portal.
By using Azure PowerShell.
By using Azure CLI.
By using REST API.
Hope this helps.

Can we recover the azure resource group in azure cloud?

Some times we had deleted the 'resource group' accidentally on azure cloud, its fine that if our/your resource group does not have any deployments on it and we can create immediately newer one and will proceed our stuff, but if we had deployments on it, then its becomes major problem/task.
So can we recover Resource Group? like a recovery of Virtual machine in Azure.
You can export service configurations that belong to a resource group as JSON. Within the portal, there is an option "Export Template" under the Resource Management Navigation Group.
So can we recover Resource Group? like a recovery of Virtual machine in Azure.
Unfortunately, we have no way to recovery it, if the resource group is deleted . We could get the warning if we try to delete resource group from the azure portal. Connect to Azure support team for help maybe a way, but I don't think it could be easy for restoring.
Note : based on my understanding even if we could re-create the resource with ARM template(If we have exported the ARM template before delete), it seems that just with the same resource names with deleted resource that is not equal recovery action.

Unable to associate existing virtual network moved from a resource group to another in which creating new virtual machine through azure portal

I'm unable to associate the existing virtual network after moved from one resource group to the required resource group in which I am trying to create new virtual machine in the required resource group through ARM azure portal.
According to the error log, please ensure your VNet is in the Southeast Asia and in the same subscription.
Note: When you move VNet from one resource group to another resource group with new different location, the location of VNet does not change.

Changing Azure Resource Group location

I have a setup in azure with a bunch of resources combined in a resource group. I want my services to be located in west-europe, so all my resources are there (where possible)
I just noticed that when creating the resource group, i accidentally used West US.
So the current setup is:
Resource Group 1 (West US)
App Service 1 (West Europe)
App Service 2 (West Europe)
SQL Server (West Europe)
Storage account (West Europe)
... (West Europe)
Can I change the location of the resource group without having to create a new one and migrate everyting?
And maybe more importantly: Should i change the location or does it not impact anything?
Thanks!
You can't change the location of a resource group.
It wouldn't matter where your resource group is created. It is just a logical container of resources inside it.
Your resources inside a resource group need not be in the same region as that of the resource group. They can be in any region where the resource is supported.
You cannot change the location of the resource group, also moving a resource only moves it to a new resource group. The new resource group may have a different location, but that does not change the location of the resource. You could refer to Move resources to new resource group or subscription for details.
Regarding your last question:
Should i change the location or does it not impact anything?
It does impact somehow, but its little:
The resourcegroup holds metadata of the resources within. That metadata is located in the location of the resourcegroup. So the impact is witnessed when you use the Azure Portal and the information is presented to you.
For example:
The other day Brazil South was having troubles, and the portal was taking forever on presenting me the information, because I have resource groups located in Brazil South.
This is not possible. But you already know that by now. Alternative is that you can shift services/resources from one resource group to other, where both resides in different geo location.
Resource group's location can't be changed per se. But by moving resources around I was able to achieve changing the resource group location.
The situation I was in is that I had my resourceGroup set to WestUS location and all the resources within the group set to WestUS2. This was causing issues with my ARM templates. So these are the steps of how I solved this:
Create a new temporary resource group, location doesn't matter for this one, for these steps we are calling this resourceGroup-temp
Move resources to the new resourceGroup-temp. This will depend on your particular situation, I only moved my Cosmos DB and storage account because I knew my FunctionApp and App plans can be recreated from my pipeline upon deployment.
Once empty, delete the old resourceGroup
Create new resourceGroup resourceGroup but with the correct location this time.
Move resources from resourceGroup-temp to resourceGroup
Delete temporary resourceGroup-temp
VoilĂ  you have your resources in a resource group with the same name and now the correct location. Good luck.

Resources