The api-version '2016-07-01' used to deploy the template does not support 'SubscriptionId' property

8/14/2018

Am working on ARM Templates and using VSTS for to deploy them. Here using ARM Templates, I want to deploy Azure Kubernete Service in to my portal. The deployment is successfully while deploying them in local using PowerShell, but when am tried to do same thing using VSTS CD pipeline, then am getting issue like:

failed: 'The template resource 'SolutionDeployment' at line '315' and column '9' is invalid. The api-version '2016-07-01' used to deploy the template does not support 'SubscriptionId' property. Please use api-version '2017-05-10' or later to deploy the template.

But, am using latest version as my API version to Solution Deployment and here it is:

{
      "type": "Microsoft.Resources/deployments",
      "name": "SolutionDeployment",
      "apiVersion": "2017-05-10",
      "resourceGroup": "[split(variables('omsWorkspaceId'),'/')[4]]",
      "subscriptionId": "[split(variables('omsWorkspaceId'),'/')[2]]",
      "properties": {
        "mode": "Incremental",
        "template": {
          "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
          "contentVersion": "1.0.0.0",
          "parameters": {},
          "variables": {},
          "resources": [
            {
              "apiVersion": "2017-03-15-preview",
              "type": "Microsoft.OperationsManagement/solutions",
              "location": "[parameters('workspaceRegion')]",
              "name": "[concat('ContainerInsights', '(', split(variables('omsWorkspaceId'),'/')[8], ')')]",
              "properties": {
                "workspaceResourceId": "[variables('omsWorkspaceId')]"
              },
              "plan": {
                "name": "[concat('ContainerInsights', '(', split(variables('omsWorkspaceId'),'/')[8], ')')]",
                "product": "[concat('OMSGallery/', 'ContainerInsights')]",
                "promotionCode": "",
                "publisher": "Microsoft"
              }
            }
          ]
        }
      },
      "dependsOn": [ "[concat('Microsoft.Resources/deployments/', 'WorkspaceDeployment')]" ]
    }

Can anyone suggest me to "How to get out of this issue?"

-- Mani
arm-template
azure-kubernetes
azure-log-analytics
azure-pipelines-release-pipeline

0 Answers