Error: Code=InvalidTemplateDeployment; Message=The template deployment failed because of policy violation.

{tocify} $title={Table of Contents}



Issue


The issue is related to deployment, where I am deploying azure services(logic app, function app, service bus queue etc)  using yaml file.



InvalidTemplateDeployment


"Error: Code=InvalidTemplateDeployment; Message=The template deployment failed because of policy violation. Please see details for more information."

Why it happened


As the error says, there was something not correct in the template used for deployment - some policy violation.

But which policy is getting violated, no info about that.

So how to check on that? Where can we find those details?

For that, went ahead started looking into Azure policy , as the error had occurred at logic app deployment step - searched for policies related to logic app.

Validated the logic app template against all the policies and found the policy which was getting violated.

Logic app policy






What to do


Not everyone has policies, but it's good to have it, to bring in governance .

You need to follow the policy and make changes in the template used for deployment.

Here I had not mentioned the ISE env details in Logic app deployment template file, so added the ISE details and pipeline run was successful.


One more thing can help, looking into the Activity Logs - some details from it can be collected.


If you have questions or suggestions, feel free to do in comments section below !!!


Do share if you find this helpful .......
 
                          Knowledge Sharing is Caring !!!!!!


Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post