ARM Deployment template validation failed

Taranjeet Malik 421 Reputation points
2024-04-05T08:26:22.5433333+00:00

Hi

I'm exporting ARM Template for an API Management instance (completely functional in source environment) and importing it to target. While deploying the template at target, the deployment validation fails and reports this:

Deployment template validation failed: 'The template resource 'abc-ps-sh-apim/imagesitadetectionfunc;rev=1/post-lprdetecthttptrigv2' at line '9204' and column '5' is not valid: The language expression {} is not valid: the string character '{' at position '3' is not expected.

I reviewed the code snippet at the specified location in ARM Template using VSCode and could not visibly make out anything. VSCode is not highlighting any issues at all (have ARM Toolkit extension installed). The fact that this is just a template that I'm directly exporting from functional source environment, indicates that ARM cannot be invalid. Moreover, the specific code snippet passes validation online at https://jsonlint.com/

Can someone please point me in the right direction - what to look for, any know issues etc.?

Thanks

Taranjeet Singh

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,760 questions
{count} votes

Accepted answer
  1. Ben Gimblett 3,410 Reputation points Microsoft Employee
    2024-04-08T08:19:48.23+00:00

    That's great news. Whilst you can export templates direct from resources they do occasionally need fixing up. For APIM specifically this page goes into some advice, including how to use apiops toolkit that may be useful to you going forward https://learn.microsoft.com/en-us/azure/api-management/devops-api-development-templates


0 additional answers

Sort by: Most helpful