I have exported template of app service, how to make it run

Jaanvi Dhariwal 40 Reputation points
2023-05-23T10:44:47.48+00:00

Hi,

I have taken arm template of app service, application insight, app service plan from different subscription into my subscription, how to make the website run when successfully templates are deployed into my subscription, what changes I have to make for deploying that website in different subscription.

Ps-I am new to apps, please help me out in this deployment.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,970 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-05-23T12:08:15.8366667+00:00

    This could be a slightly daunting journey for you, so i'd want to plant the seed that there's 2 approaches. Doing it right, or making it work as fast as you can.

    1. Doing it right - Take your exported ARM code and use Bicep (improved ARM authoring experience) in VS Code to decompile the Arm to Bicep. https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/decompile?tabs=azure-cli
      Review the parameters to only expose the things you want to change, look over the code and clean up the names and make sure all of problems identified by the Bicep VS Code extension are fixed.
      Deploy to a new Resource Group in Azure using the Azure CLI
      Test and refine the IaC code
    2. Fast and loose - Take the exported template code, add them as Template Specs and attempt to deploy using the Portal UI. For each deployment failure, parse the error and incrementally change the template until it works.

  2. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2023-05-23T17:04:47.2+00:00

    @Jaanvi Dhariwal , Apologies it looks like AirGordon may have missed to add method 2.

    Based on my understanding of your scenario, you have exported an ARM template (downloaded it), by using one of exported  method described in the Azure doc and that now, you want to deploy this exported ARM template of the app service, to do that, you may follow these steps:

     

    Essentially, you will need to import/upload/re-use the template, edit template in the portal template editor and modify the parameters and variables as per your requirement.

    1.    Open the Azure portal and click on +Create a resource and navigate to Template deployment - under GetStarted>Azure services.

    (added screenshots below for a reference)

    --In the search bar, type "Template deployment" and select the "Template deployment" option from the list.

    2.    Click on the "Create" button to create a new resource and navigate to “Build your own template in the editor

    3.    ‘Load file’ to import or upload the exported ARM template.

    4.    Adjust the Parameters, variable, resources tab, adjust the required parameters for the app service, such as the app name, app service plan, and other settings and save it.

    --ensure app name is not reused, which is unique

    5.    Click on the "Review + create" button to review the deployment settings.

    6.    Once you have reviewed the settings, click on the "Create" button to start the deployment.

    7.    Wait for the deployment to complete. You can monitor the deployment progress in the Azure portal

    If you wish, you may take a look at our Learn module to understand and get hands-on template deployment

    Deploy Azure infrastructure by using JSON ARM templates

    Kindly take a look at these reference resources

    Deploy resources from custom template || #deploy-resources-from-custom-template || Frequently asked questions about ARM templates (review limits)

    Please let us know how it goes, we will follow-up further.

    User's image

    User's image


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.