Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

The template parameters 'undefined' in the parameters file are not valid when using Create Azure DevTest Labs VM

未关闭
#773 22 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
azure
领域
cloud

调研方向

从任务入口 AzureDevTestLabsCreateVM@3 以及提供的 arm/vm.json 和 arm/vm.parameters.json 文件开始。重现 Create Azure DevTest Labs VM 的运行,并跟踪值为 undefined 时参数文件的处理方式。当任务不再提交无效的 undefined 参数,并且使用所示模板成功创建 VM 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug tasks

Hello,

I've just find out the ms-azuredevtestlabs.tasks.azure-dtl-task-createvm.AzureDevTestLabsCreateVM@3 stopped working, because of adding undefined parameter with same value.

steps:
- task: ms-azuredevtestlabs.tasks.azure-dtl-task-createvm.AzureDevTestLabsCreateVM@3
  displayName: 'Create Azure DevTest Labs VM'
  inputs:
    azureSubscription: '[REDACTED]'
    LabId: '[REDACTED]'
    VirtualMachineName: test
    TemplateFile: arm/vm.json
    ParametersFile: arm/vm.parameters.json
{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "newVMName": {
      "type": "string"
    },
    "labName": {
      "type": "string",
      "defaultValue": "devtest"
    },
    "size": {
      "type": "string",
      "defaultValue": "Standard_DS2_v2"
    },
    "userName": {
      "type": "string",
      "defaultValue": "[REDACTED]"
    },
    "password": {
      "type": "securestring",
      "defaultValue": "[[VmPassword]]"
     },
    "Azure_Pipelines_Deployment_Group_Agent_accountUrl": {
      "type": "string",
      "defaultValue": "[REDACTED]"
    },
    "Azure_Pipelines_Deployment_Group_Agent_projectName": {
      "type": "string",
      "defaultValue": "[REDACTED]"
    },
    "Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName": {
      "type": "string",
      "defaultValue": "[REDACTED]"
    },
    "Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken": {
      "type": "securestring",
      "defaultValue": "[[PAT]]"
    },
    "Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags": {
      "type": "string",
      "defaultValue": "WEB, DB"
    },
    "Azure_Pipelines_Deployment_Group_Agent_agentInstallPath": {
      "type": "string",
      "defaultValue": ""
    },
    "Azure_Pipelines_Deployment_Group_Agent_agentName": {
      "type": "string",
      "defaultValue": ""
    },
    "Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon": {
      "type": "bool",
      "defaultValue": false
    },
    "Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount": {
      "type": "string",
      "defaultValue": "NT AUTHORITY\\NetworkService"
    },
    "Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword": {
      "type": "securestring"
    }
  },
  "variables": {
    "labSubnetName": "[concat(variables('labVirtualNetworkName'), 'Subnet')]",
    "labVirtualNetworkId": "[resourceId('Microsoft.DevTestLab/labs/virtualnetworks', parameters('labName'), variables('labVirtualNetworkName'))]",
    "labVirtualNetworkName": "[concat('Dtl', parameters('labName'))]",
    "vmId": "[resourceId ('Microsoft.DevTestLab/labs/virtualmachines', parameters('labName'), parameters('newVMName'))]",
    "vmName": "[concat(parameters('labName'), '/', parameters('newVMName'))]"
  },
  "resources": [
    {
      "apiVersion": "2018-10-15-preview",
      "type": "Microsoft.DevTestLab/labs/virtualmachines",
      "name": "[variables('vmName')]",
      "location": "[resourceGroup().location]",
      "properties": {
        "labVirtualNetworkId": "[variables('labVirtualNetworkId')]",
        "notes": "s001ci",
        "customImageId": "[REDACTED]",
        "size": "[parameters('size')]",
        "userName": "[parameters('userName')]",
        "password": "[parameters('password')]",
        "isAuthenticationWithSshKey": false,
        "artifacts": [
          {
            "artifactId": "[resourceId('Microsoft.DevTestLab/labs/artifactSources/artifacts', parameters('labName'), 'public repo', 'windows-wsl')]"
          },
          {
            "artifactId": "[resourceId('Microsoft.DevTestLab/labs/artifactSources/artifacts', parameters('labName'), 'public repo', 'windows-deploymentgroup')]",
            "parameters": [
              {
                "name": "accountUrl",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_accountUrl')]"
              },
              {
                "name": "projectName",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_projectName')]"
              },
              {
                "name": "deploymentGroupName",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName')]"
              },
              {
                "name": "PersonalAccessToken",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken')]"
              },
              {
                "name": "deploymentAgentTags",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags')]"
              },
              {
                "name": "agentInstallPath",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_agentInstallPath')]"
              },
              {
                "name": "agentName",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_agentName')]"
              },
              {
                "name": "RunAsAutoLogon",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon')]"
              },
              {
                "name": "windowsLogonAccount",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount')]"
              },
              {
                "name": "windowsLogonPassword",
                "value": "[parameters('Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword')]"
              }
            ]
          }
        ],
        "labSubnetName": "[variables('labSubnetName')]",
        "disallowPublicIpAddress": false,
        "storageType": "Premium",
        "allowClaim": false
      }
    }
  ],
  "outputs": {
    "labVMId": {
      "type": "string",
      "value": "[variables('vmId')]"
    }
  }
}
2021-05-20T22:36:26.2295149Z ##[debug]Evaluating condition for step: 'Create Azure DevTest Labs VM'
2021-05-20T22:36:26.2297047Z ##[debug]Evaluating: succeeded()
2021-05-20T22:36:26.2297618Z ##[debug]Evaluating succeeded:
2021-05-20T22:36:26.2298689Z ##[debug]=> True
2021-05-20T22:36:26.2299309Z ##[debug]Result: True
2021-05-20T22:36:26.2299930Z ##[section]Starting: Create Azure DevTest Labs VM
2021-05-20T22:36:26.2412456Z ==============================================================================
2021-05-20T22:36:26.2412865Z Task         : Azure DevTest Labs Create VM
2021-05-20T22:36:26.2413169Z Description  : Create an Azure DevTest Labs VM
2021-05-20T22:36:26.2413444Z Version      : 3.0.16
2021-05-20T22:36:26.2413695Z Author       : Microsoft Corporation
2021-05-20T22:36:26.2414039Z Help         : Creates a virtual machine in the selected lab.
2021-05-20T22:36:26.2414397Z ==============================================================================
2021-05-20T22:36:26.2640380Z ##[debug]Using node path: C:\agents\2.186.1\externals\node10\bin\node.exe
2021-05-20T22:36:26.6623420Z ##[debug]agent.TempDirectory=D:\a\_temp
2021-05-20T22:36:26.6642539Z ##[debug]loading inputs and endpoints
2021-05-20T22:36:26.6660213Z ##[debug]loading ENDPOINT_AUTH_[REDACTED]
2021-05-20T22:36:26.6885860Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_[REDACTED]_AUTHENTICATIONTYPE
2021-05-20T22:36:26.6888045Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_[REDACTED]_SERVICEPRINCIPALID
2021-05-20T22:36:26.6889919Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_[REDACTED]_SERVICEPRINCIPALKEY
2021-05-20T22:36:26.6891691Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_[REDACTED]_TENANTID
2021-05-20T22:36:26.6893406Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2021-05-20T22:36:26.6895022Z ##[debug]loading ENDPOINT_AUTH_SCHEME_[REDACTED]
2021-05-20T22:36:26.6896583Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2021-05-20T22:36:26.6898097Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2021-05-20T22:36:26.6902543Z ##[debug]loading INPUT_APPENDRETRYNUMBERTOVMNAME
2021-05-20T22:36:26.6904124Z ##[debug]loading INPUT_CONNECTEDSERVICENAME
2021-05-20T22:36:26.6905883Z ##[debug]loading INPUT_DELETEFAILEDDEPLOYMENTBEFORERETRY
2021-05-20T22:36:26.6907517Z ##[debug]loading INPUT_DELETEFAILEDLABVMBEFORERETRY
2021-05-20T22:36:26.6909151Z ##[debug]loading INPUT_FAILONARTIFACTERROR
2021-05-20T22:36:26.6910712Z ##[debug]loading INPUT_LABID
2021-05-20T22:36:26.6913088Z ##[debug]loading INPUT_PARAMETERSFILE
2021-05-20T22:36:26.6914529Z ##[debug]loading INPUT_RETRYCOUNT
2021-05-20T22:36:26.6916090Z ##[debug]loading INPUT_RETRYONFAILURE
2021-05-20T22:36:26.6917678Z ##[debug]loading INPUT_TEMPLATEFILE
2021-05-20T22:36:26.6919260Z ##[debug]loading INPUT_VIRTUALMACHINENAME
2021-05-20T22:36:26.6920911Z ##[debug]loading INPUT_WAITMINUTESFORAPPLYARTIFACTS
2021-05-20T22:36:26.6931153Z ##[debug]loaded 21
2021-05-20T22:36:26.6936168Z ##[debug]Agent.ProxyUrl=undefined
2021-05-20T22:36:26.6937384Z ##[debug]Agent.CAInfo=undefined
2021-05-20T22:36:26.6938838Z ##[debug]Agent.ClientCert=undefined
2021-05-20T22:36:26.6940223Z ##[debug]Agent.SkipCertValidation=undefined
2021-05-20T22:36:26.9106044Z Starting Azure DevTest Labs Create VM Task
2021-05-20T22:36:26.9117037Z ##[debug]ConnectedServiceName=[REDACTED]
2021-05-20T22:36:26.9119258Z ##[debug]RetryOnFailure=false
2021-05-20T22:36:26.9120884Z ##[debug]AppendRetryNumberToVmName=false
2021-05-20T22:36:26.9122401Z ##[debug]DeleteFailedDeploymentBeforeRetry=false
2021-05-20T22:36:26.9123758Z ##[debug]DeleteFailedLabVMBeforeRetry=false
2021-05-20T22:36:26.9125111Z ##[debug]FailOnArtifactError=false
2021-05-20T22:36:26.9126694Z ##[debug]LabId=/subscriptions/[REDACTED]/resourceGroups/[REDACTED]/providers/Microsoft.DevTestLab/labs/devtest
2021-05-20T22:36:26.9127590Z ##[debug]ParameterOverrides=undefined
2021-05-20T22:36:26.9129570Z ##[debug]ParametersFile=D:\a\1\s\arm\vm.parameters.json
2021-05-20T22:36:26.9130643Z ##[debug][REDACTED] data SubscriptionId = [REDACTED]
2021-05-20T22:36:26.9131808Z ##[debug]TemplateFile=D:\a\1\s\arm\vm.json
2021-05-20T22:36:26.9132617Z ##[debug]VirtualMachineName=test
2021-05-20T22:36:26.9133371Z ##[debug]WaitMinutesForApplyArtifacts=0
2021-05-20T22:36:26.9134489Z ##[debug]ResourceUtil: Getting ARM client instance.
2021-05-20T22:36:26.9137828Z ##[debug]ConnectedServiceName=[REDACTED]
2021-05-20T22:36:26.9140696Z ##[debug][REDACTED] auth param ServicePrincipalId = ***
2021-05-20T22:36:26.9142148Z ##[debug][REDACTED] auth param ServicePrincipalKey = ***
2021-05-20T22:36:26.9143182Z ##[debug][REDACTED] auth param TenantId = ***
2021-05-20T22:36:26.9144156Z ##[debug]ResourceUtil: Login using ConnectedServiceName '[REDACTED]'.
2021-05-20T22:36:28.0097458Z ##[debug]ResourceUtil: Getting DTL client instance.
2021-05-20T22:36:28.0106855Z ##[debug]ConnectedServiceName=[REDACTED]
2021-05-20T22:36:28.0109143Z ##[debug][REDACTED] auth param ServicePrincipalId = ***
2021-05-20T22:36:28.0110855Z ##[debug][REDACTED] auth param ServicePrincipalKey = ***
2021-05-20T22:36:28.0112220Z ##[debug][REDACTED] auth param TenantId = ***
2021-05-20T22:36:28.0114027Z ##[debug]ResourceUtil: Login using ConnectedServiceName '[REDACTED]'.
2021-05-20T22:36:28.0115340Z Task called with the following parameters:
2021-05-20T22:36:28.0116078Z   ConnectedServiceName = [REDACTED]
2021-05-20T22:36:28.0117027Z   LabId = /subscriptions/[REDACTED]/resourceGroups/[REDACTED]/providers/Microsoft.DevTestLab/labs/devtest
2021-05-20T22:36:28.0117907Z   VirtualMachineName = test
2021-05-20T22:36:28.0118526Z   TemplateFile = D:\a\1\s\arm\vm.json
2021-05-20T22:36:28.0120264Z   ParametersFile = D:\a\1\s\arm\vm.parameters.json
2021-05-20T22:36:28.0120932Z   FailOnArtifactError = false
2021-05-20T22:36:28.0121504Z   RetryOnFailure = false
2021-05-20T22:36:28.0122035Z   RetryCount = 0
2021-05-20T22:36:28.0122593Z   DeleteFailedLabVMBeforeRetry = false
2021-05-20T22:36:28.0123234Z   DeleteFailedDeploymentBeforeRetry = false
2021-05-20T22:36:28.0123876Z   AppendRetryNumberToVMName = false
2021-05-20T22:36:28.0124533Z   WaitMinutesForApplyArtifacts = 0
2021-05-20T22:36:28.0125269Z Creating Virtual Machine in Lab '[REDACTED]' under Resource Group '[REDACTED]'.
2021-05-20T22:36:28.0126068Z Invoking deployment with the following parameters:
2021-05-20T22:36:28.0126754Z   DeploymentName = Dtlgr0yny9un
2021-05-20T22:36:28.0127325Z   ResourceGroupName = [REDACTED]
2021-05-20T22:36:28.0127879Z   LabName = [REDACTED]
2021-05-20T22:36:28.0128393Z   VmName = test
2021-05-20T22:36:28.0128971Z   TemplateFile = D:\a\1\s\arm\vm.json
2021-05-20T22:36:28.2507811Z { Error: Deployment template validation failed: 'The template parameters 'undefined' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.
2021-05-20T22:36:28.2513528Z     at new t (D:\a\_tasks\AzureDevTestLabsCreateVM_65b23b71-d518-4074-8370-cf84ebfc909b\3.0.16\task.js:2:369869)
2021-05-20T22:36:28.2516851Z     at D:\a\_tasks\AzureDevTestLabsCreateVM_65b23b71-d518-4074-8370-cf84ebfc909b\3.0.16\task.js:2:359495
2021-05-20T22:36:28.2518582Z     at process._tickCallback (internal/process/next_tick.js:68:7)
2021-05-20T22:36:28.2520924Z   code: 'InvalidTemplate',
2021-05-20T22:36:28.2522285Z   statusCode: 400,
2021-05-20T22:36:28.2524596Z   request:
2021-05-20T22:36:28.2525799Z    e {
2021-05-20T22:36:28.2527988Z      streamResponseBody: false,
2021-05-20T22:36:28.2529129Z      url:
2021-05-20T22:36:28.2531394Z       'https://management.azure.com/subscriptions/[REDACTED]/resourcegroups/[REDACTED]/providers/Microsoft.Resources/deployments/Dtlgr0yny9un?api-version=2020-06-01',
2021-05-20T22:36:28.2532827Z      method: 'PUT',
2021-05-20T22:36:28.2534703Z      headers: e { _headersMap: [Object] },
2021-05-20T22:36:28.2535725Z      body:
2021-05-20T22:36:28.2607056Z       '{"properties":{"template":{"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json","contentVersion":"1.0.0.0","parameters":{"newVMName":{"type":"string","defaultValue":"formula1"},"labName":{"type":"string","defaultValue":"devtest"},"size":{"type":"string","defaultValue":"Standard_DS2_v2"},"userName":{"type":"string","defaultValue":"adm0n"},"password":{"type":"securestring","defaultValue":"[[[VmPassword]]"},"Azure_Pipelines_Deployment_Group_Agent_accountUrl":{"type":"string","defaultValue":"[REDACTED]"},"Azure_Pipelines_Deployment_Group_Agent_projectName":{"type":"string","defaultValue":"[REDACTED]"},"Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName":{"type":"string","defaultValue":"dg"},"Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken":{"type":"securestring","defaultValue":"[[[PAT]]"},"Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags":{"type":"string","defaultValue":"WEB, DB"},"Azure_Pipelines_Deployment_Group_Agent_agentInstallPath":{"type":"string","defaultValue":""},"Azure_Pipelines_Deployment_Group_Agent_agentName":{"type":"string","defaultValue":""},"Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon":{"type":"bool","defaultValue":false},"Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount":{"type":"string","defaultValue":"NT AUTHORITY\\\\NetworkService"},"Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword":{"type":"securestring"}},"variables":{"labSubnetName":"[concat(variables(\'labVirtualNetworkName\'), \'Subnet\')]","labVirtualNetworkId":"[resourceId(\'Microsoft.DevTestLab/labs/virtualnetworks\', parameters(\'labName\'), variables(\'labVirtualNetworkName\'))]","labVirtualNetworkName":"[concat(\'Dtl\', parameters(\'labName\'))]","vmId":"[resourceId (\'Microsoft.DevTestLab/labs/virtualmachines\', parameters(\'labName\'), parameters(\'newVMName\'))]","vmName":"[concat(parameters(\'labName\'), \'/\', parameters(\'newVMName\'))]"},"resources":[{"apiVersion":"2018-10-15-preview","type":"Microsoft.DevTestLab/labs/virtualmachines","name":"[variables(\'vmName\')]","location":"[resourceGroup().location]","properties":{"labVirtualNetworkId":"[variables(\'labVirtualNetworkId\')]","notes":"s001ci","customImageId":"/subscriptions/[REDACTED]/resourcegroups/[REDACTED]/providers/microsoft.devtestlab/labs/[REDACTED]/customimages/s001ci","size":"[parameters(\'size\')]","userName":"[parameters(\'userName\')]","password":"[parameters(\'password\')]","isAuthenticationWithSshKey":false,"artifacts":[{"artifactId":"[resourceId(\'Microsoft.DevTestLab/labs/artifactSources/artifacts\', parameters(\'labName\'), \'public repo\', \'windows-wsl\')]"},{"artifactId":"[resourceId(\'Microsoft.DevTestLab/labs/artifactSources/artifacts\', parameters(\'labName\'), \'public repo\', \'windows-deploymentgroup\')]","parameters":[{"name":"accountUrl","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_accountUrl\')]"},{"name":"projectName","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_projectName\')]"},{"name":"deploymentGroupName","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName\')]"},{"name":"PersonalAccessToken","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken\')]"},{"name":"deploymentAgentTags","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags\')]"},{"name":"agentInstallPath","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_agentInstallPath\')]"},{"name":"agentName","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_agentName\')]"},{"name":"RunAsAutoLogon","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon\')]"},{"name":"windowsLogonAccount","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount\')]"},{"name":"windowsLogonPassword","value":"[parameters(\'Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword\')]"}]}],"labSubnetName":"[variables(\'labSubnetName\')]","disallowPublicIpAddress":false,"storageType":"Premium","allowClaim":false}}],"outputs":{"labVMId":{"type":"string","value":"[variables(\'vmId\')]"}}},"parameters":{"Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword":{"value":""},"Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount":{"value":"NT AUTHORITY\\\\NetworkService"},"Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon":{"value":"false"},"Azure_Pipelines_Deployment_Group_Agent_agentName":{"value":""},"Azure_Pipelines_Deployment_Group_Agent_agentInstallPath":{"value":""},"Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags":{"value":"WEB, DB"},"Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken":{"value":"[[[PAT]]"},"Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName":{"value":"dg"},"Azure_Pipelines_Deployment_Group_Agent_projectName":{"value":"[REDACTED]"},"Azure_Pipelines_Deployment_Group_Agent_accountUrl":{"value":"[REDACTED]"},"password":{"value":"[[[VmPassword]]"},"userName":{"value":"adm0n"},"size":{"value":"Standard_DS2_v2"},"labName":{"value":"[REDACTED]"},"newVMName":{"value":"test"},"undefined":{"value":"undefined"}},"mode":"Incremental"}}',
2021-05-20T22:36:28.2620142Z      query: undefined,
2021-05-20T22:36:28.2632268Z      formData: undefined,
2021-05-20T22:36:28.2633399Z      withCredentials: false,
2021-05-20T22:36:28.2770530Z      abortSignal: undefined,
2021-05-20T22:36:28.2771192Z      timeout: 0,
2021-05-20T22:36:28.2771812Z      onUploadProgress: undefined,
2021-05-20T22:36:28.2772489Z      onDownloadProgress: undefined,
2021-05-20T22:36:28.2773082Z      proxySettings: undefined,
2021-05-20T22:36:28.2773649Z      keepAlive: undefined,
2021-05-20T22:36:28.2774615Z      agentSettings: undefined,
2021-05-20T22:36:28.2775085Z      operationSpec:
2021-05-20T22:36:28.2775554Z       { httpMethod: 'PUT',
2021-05-20T22:36:28.2775911Z         path:
2021-05-20T22:36:28.2776405Z          'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}',
2021-05-20T22:36:28.2777061Z         urlParameters: [Array],
2021-05-20T22:36:28.2777417Z         queryParameters: [Array],
2021-05-20T22:36:28.2777764Z         headerParameters: [Array],
2021-05-20T22:36:28.2778118Z         requestBody: [Object],
2021-05-20T22:36:28.2778555Z         responses: [Object],
2021-05-20T22:36:28.2778883Z         serializer: [e] } },
2021-05-20T22:36:28.2779259Z   response:
2021-05-20T22:36:28.2779540Z    { body:
2021-05-20T22:36:28.2782117Z       '{"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: \'The template parameters \'undefined\' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are \'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword\'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.\'.","additionalInfo":[{"type":"TemplateViolation","info":{"lineNumber":0,"linePosition":0,"path":""}}]}}',
2021-05-20T22:36:28.2785005Z      headers: e { _headersMap: [Object] },
2021-05-20T22:36:28.2785368Z      status: 400 },
2021-05-20T22:36:28.2785656Z   body:
2021-05-20T22:36:28.2785938Z    { code: 'InvalidTemplate',
2021-05-20T22:36:28.2786247Z      message:
2021-05-20T22:36:28.2788320Z       'Deployment template validation failed: \'The template parameters \'undefined\' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are \'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword\'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.\'.',
2021-05-20T22:36:28.2790528Z      additionalInfo: { '0': [Object] } } }
2021-05-20T22:36:28.2792240Z ##[debug]task result: Failed
2021-05-20T22:36:28.2825056Z ##[error]Error => code: 'InvalidTemplate'; message = 'Deployment template validation failed: 'The template parameters 'undefined' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.'
2021-05-20T22:36:28.2838760Z ##[debug]Processed: ##vso[task.issue type=error;]Error => code: 'InvalidTemplate'; message = 'Deployment template validation failed: 'The template parameters 'undefined' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.'
2021-05-20T22:36:28.2850830Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error => code: 'InvalidTemplate'; message = 'Deployment template validation failed: 'The template parameters 'undefined' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'newVMName, labName, size, userName, password, Azure_Pipelines_Deployment_Group_Agent_accountUrl, Azure_Pipelines_Deployment_Group_Agent_projectName, Azure_Pipelines_Deployment_Group_Agent_deploymentGroupName, Azure_Pipelines_Deployment_Group_Agent_PersonalAccessToken, Azure_Pipelines_Deployment_Group_Agent_deploymentAgentTags, Azure_Pipelines_Deployment_Group_Agent_agentInstallPath, Azure_Pipelines_Deployment_Group_Agent_agentName, Azure_Pipelines_Deployment_Group_Agent_RunAsAutoLogon, Azure_Pipelines_Deployment_Group_Agent_windowsLogonAccount, Azure_Pipelines_Deployment_Group_Agent_windowsLogonPassword'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.'
2021-05-20T22:36:28.2862394Z ##[section]Finishing: Create Azure DevTest Labs VM

The ARM Template from powershell works flawless

As you can see, the task adds undefined parameter.

,"labName":{"value":"[REDACTED]"},"newVMName":{"value":"test"},"undefined":{"value":"undefined"}},"mode":"Incremental"}}',
主要语言
PowerShell
星标
465
派生
595
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/azure-devtestlab 的其他 Issue

查看 Azure/azure-devtestlab 的全部 Issue

相似的 Issue

更多 Cloud Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。