2

I created in Visual Studio 2017 a new Azure Resource Group and selected Logic Apps. In the project there is Deploy-AzureResourceGroup.ps1.

I want to change parameters in the json file accordingly with the parameters in the LogicApp.json

LogicApp.json

If I run it, it seems it working but nothing is created in Azure. I change the parameters file

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "logicAppName": {
      "value": "LogicApps-Test-Deploy"
    },
    "logicAppLocation": {
      "value": "northeurope"
    }
  }
}

Deploy

And nothing happened. I tried to generate in the Azure portal an Automatic Script: in this case I have a script and a template for all my resources (very long and complicate file).

Azure Automatic Script

Basically I want to create different scripts for different environment. What is the right process for that?

2 Answers 2

3

Don't "create different scripts for different environments". Instead, aim to have a single script ( DeployAzureResourceGroup.ps1 ), a single template to deploy your logic app ( LogicApp.json ), and different versions of your parameters file to parameterize the template. For example,

  • LogicApp.parameters.dev.json
  • LogicApp.parameters.test.json
  • LogicApp.parameters.prod.json

This will enable you to deploy the same infrastructure consistently and reliably, across multiple subscriptions (ie: subscriptions for dev, test, and prod environments).

Also, use a PowerShell console window or PowerShell ISE to test your work. Some of your problem could be simply trying to execute the template in Visual Studio. I've had intermittent issues in the past (mostly token cache issues) executing ARM template deployments from Visual Studio and finally just got in the practice of testing the code from a PowerShell environment, which is what most users of the scripts and templates will be doing anyway.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you @rick-rainey for your answer; good advise. I'm using PowerShell ISE: when New-AzureRmResourceGroupDeployment is executed there is not ErrorMessages. Is this the problem link with cached token?
I tried in another laptop to execute the script in Visual Studio Code: as in the last picture, the code is running without error but nothing is created.
Not sure - cannot tell from your original post. The problem I was mentioning was intermittent though.
0

If you have already created an ARM template for logic app, you can also use Template feature in Azure Portal to fix any issues with your ARM template. I normally use it while developing any new ARM template. This also helps with a detailed error report and in general I find it a better and quick way of identifying any issue.

Have a look the link below -

https://azure.microsoft.com/en-gb/updates/deploy-custom-templates-from-the-preview-portal/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.