RKh
RKh

Reputation: 14161

Any tool to test ARM templates locally before deploying

I have never used Docker for Azure and any such thing before and new to Azure.

I have an issue with an ARM template. Whenever I am trying to deploy it, I am getting error: Either Resource Group already exists, or cluster or few other parameters.

I want to know whether there is any container service or test environment which is available locally where I can test my ARM templates.

Upvotes: 2

Views: 4290

Answers (3)

redOctober13
redOctober13

Reputation: 3974

For anyone finding this question in 2024, there's now the Azure ARM Template Test Toolkit. It's a CLI tool that you give your ARM Template to and get change suggestions.

Upvotes: 0

LAKSHAY ARORA
LAKSHAY ARORA

Reputation: 137

As per my experience also, there is no such tool to test your ARM template. From different code editors, you can test the syntax of your template.

To check whether RG name is occupied or valid configurations are there, you need to pre-check your template before deployment.

For that, you can do some ad-hoc stuff. Like to check name availability, you can make use of Azure CLI/ Power Shell commands, to check for any configuration (like related to Vnets/ SubNets/ Route Tables), you can go to Azure portal and check it manually.

After that, you can place the figures in your templates.

Also, as told earlier, you can create your own TEST environment and use it for testing.

Upvotes: 0

4c74356b41
4c74356b41

Reputation: 72171

No, there is no way to test ARM Template locally. Your best bet is Test-AzureRmResourceGroupDeployment Powershell cmdlet or just writing a script that will deploy the template and tell you if anything is wrong (basically like a unit\integration test).

Keep in mind that the Test-AzureRmResourceGroupDeployment doesnt really test end-to-end deployment, so if it says template is valid it doesnt mean that it will work.

There are different extensión done by Microsoft for different IDE's that help with the syntax (i'm only aware of such extensión for VSCode\VS, but there are probably such extensions for other platforms).

Upvotes: 2

Related Questions