I have two resource groups in our azure account, one(A) is having all the database(SQL) resources and other one(B) having other resources like app service, key vault, service bus etc.
Now we have decided to make a single resource group and we are trying to move SQL resources from resource group A resource group B. but it gives duplicate resources error as saying the resources we are trying to move is already there. But I have checked properly and those resources are not in resource group B.I have checked hidden types as well.
(A)
(B)
Related
I need to get the architecture of all the resources connected in a subscription. Is there any feature where I can get the architecture of how all the resource are connected under a subscription.
In the Azure Portal, go to the Subscriptions and Select your Subscription.
Click on Resource Groups or Resources based on your need.
Resource Groups option shows you the resource groups using these filters like Location, Type, Kind, Resource Group, etc.
Resources Option shows you all the resources based on its recent activity.
But you can get the resources which are linked with that resource group or specific Azure Services using the filters option.
For example,
In Resource Groups Page, if you select No grouping option - it shows all the resource groups alphabetically/randomly.
If you select the filter as type, then it shows the resource groups according to services like:
I am using the Azure Resource Mover under preview.azure.portal to move an app service and its dependencies between subscriptions but keep encountering the following error:
{"code":"ResourceMoveProviderValidationFailed","target":"Microsoft.Web/sites","message":"{"Code":"BadRequest","Message":"Please select all the Microsoft.Web resources from 'SourceTestRG
resource group for cross-subscription migration.
Also, please ensure destination resource group 'DestTestRG'
doesn't have any Microsoft.Web resources before move operation.
Here is the list of resources you have to move together: AzureTestAppTest (Microsoft.Web/sites).
This resource is located in resource group 'SourceTestRG',
but hosted in the resource group 'AppsRG'. This may be a result of prior move operations.
The destination RG 'DestTestRG' does not have any resources.
Any ideas on what may be the issue ?
UPDATE:
So basically the process is as follows ?
Create an App service plan lets say MainAppServicePlan in a ResourceGroup lets say ASPRG1 under subscription MainSub1
You can create resources in different resource groups for example:
App Service: AppService1 in ResourceGroup RGApp1
App Service: AppService2 in ResourceGroup RGApp2
App Service: AppService3 in ResourceGroup RGApp3
But thay all are under the App Service Plan ASPRG1.
That means if i try to move from AppService1 from MainSub1 to MainSub2 it will give an error
because i am required to move AppService2 and AppService3, is that correct ?
If that is the case , wouldn't it be feasible to create a brand new App Service Plan and move AppService1 to that new
AppService Plan and then since no other resource resides in that App Servie Plan then the cross subscription migration should be ok ?
Can the app service plan be changed once it is already set on an app service ?
App Service resources and Resource Groups are tied together internally, and it's not always transparent. See the Move guidance for all considerations.
Specifically:
All App Service resources in the resource group must be moved together.
App Service resources can only be moved from the resource group in which they were originally created. If an App Service resource is no
longer in its original resource group, move it back to its original
resource group. Then, move the resource across subscriptions.
Is it possible to create VMs in a different location but in the same resource group?
Eg One VM will in West Europe and the other in East US
Of course, yes.
A resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. You decide how you want to allocate resources to resource groups based on what makes the most sense for your organization. Generally, add resources that share the same lifecycle to the same resource group so you can easily deploy, update, and delete them as a group.
The resource group stores metadata about the resources. Therefore, when you specify a location for the resource group, you are specifying where that metadata is stored. For compliance reasons, you may need to ensure that your data is stored in a particular region.
The resources in a resource group can be located in different regions than the resource group. And you can even move a resource from one resource group to another.
The other factors that can help in defining your resource group are explained here in detail.
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.
Is it possible to share a particular resource (redis cache in my case) across multiple resource group?
Resource group is just logical container. It doesn't matter in which resource group resource is. You can use resources from any resource group.
Example:
Imagine that you create App Service Plan in RG1 and Web App Service in RG2. This Web App Service can use App Service Plan from RG1.
Your redis cache could be used from any code you write, whether in the cloud, on-premises, or wherever, given proper uri + access key.
As long as you have access keys/passwords/etc. to your resources, you can use your resources no matter what resource group they're in. This includes ssh keys, vm usernames/passwords, redis cache keys, storage keys, cosmos db keys, sql database logins, etc.
The only thing access-specific, with resource groups, is granted user permissions. That is: if you add someone as a contributor to resource group A, and not to resource group B, they won't be able to manipulate the settings in resource group B via the portal or any of the Management APIs. Still, they'd be able to work with all of the resources in resource group B, assuming they had the login details / keys / etc.