How to deploy whole services in different subscriptions and different resource group and different tenant

Nitin Parmar-Tss consultancy 71 Reputation points
2023-05-19T06:39:44.6233333+00:00

Hi Team,

I want to know if it is possible to deploy my current setup to different subscriptions, tenants, and different resource.I have seen that the export template is in the resource group. And I have also tried to download the export template from the resource group, but it is unable to deploy services. I have found that there are many errors and unsupported files,so is there any other method to deploy my current setup on a different subscriptions and different tenant to save my time?

User's image

I also tried with the single service export template but was not able to deploy it. sharing screenshots below for reference.

User's image

Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
240 questions
Azure ISV (Independent Software Vendors) and Startups
Azure ISV (Independent Software Vendors) and Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.ISV (Independent Software Vendors) and Startups: A Microsoft program that helps customers adopt Microsoft Cloud solutions and drive user adoption.
97 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,386 Reputation points
    2023-05-19T07:40:31.9533333+00:00

    @Nitin Parmar-Tss consultancy , Thank you for posting this question.

    I see that you already have some resources deployed in one subscription (/resource group) and now would like to deploy them to another subscription (/resource group). You are on the right track and ARM template can be used to export the template and apply them again - to another subscription/Resource Group. Based on the error mentioned in the question, the following are the scenarios:

    1. Template limit - Based on the error in the first screenshot, the limit of 800 resources/template is being reached. If there are a number of resources in the RG, I would advise doing the deployment in steps. For example, instead of deploying the whole infra at a single go, try to divide it into multiple templates. One way would be to export the template at resource level, instead of the RG level. For that, you would have to ensure that the dependent resources are created before the resources dependent on them. For example, the Virtual Network needs to be created before the VM. You can get the dependent resources by looking at **dependsOn **field in the template.
    2. The second error indicates that the template/parameter file was not updated properly. It appears that one of the resource's templates (Application Gateway's) still has reference to subscription specific attribute (subscription id). I would suggest reviewing it to ensure that no reference to the existing subscription is available.

    I would also suggest reviewing the links below related to Infrastructure as Code (IaC). These are designed specifically for scenarios that you are facing, where you may have to create a copy of environment in different subscription/resource group"

    This involves using ARM template, CLI/PS to ensure consistency of resources.

    Hope this helps.

    If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.