Search code examples
azureazure-cliazure-rm-template

Azure Template Validation


This error is not helpful. Is it possible to produce a validation error? And furthermore, an ARM validation tool? More specifically, an Azure CLI tool would be most helpful in addition to the below answer.

Deployment failed. Correlation ID: 81d0e44d-0393-4f05-b9b9-4236f90c087f. {
  "Code": "BadRequest",
  "Message": "Requested feature is not available in resource group GasSchedulingApiTest-Linux. Please try using a different resource group or create a new one.",
  "Target": null,
  "Details": [
    {
      "Message": "Requested feature is not available in resource group GasSchedulingApiTest-Linux. Please try using a different resource group or create a new one."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "59324",
        "MessageTemplate": "Requested feature is not available in resource group {0}. Please try using a different resource group or create a new one.",
        "Parameters": [
          "GasSchedulingApiTest-Linux"
        ],
        "Code": "BadRequest",
        "Message": "Requested feature is not available in resource group GasSchedulingApiTest-Linux. Please try using a different resource group or create a new one."
      }
    }
  ],
  "Innererror": null
}

Solution

  • You can use the Validate command from within a Visual Studio Resource Group project type or you can use the api: https://learn.microsoft.com/en-us/rest/api/resources/deployments/validate