4

我如何知道要提供哪些参数以及在 Azure 资源中覆盖哪些参数?

我遇到了这些错误并且浪费了大量时间来确定我需要哪些参数

我应该从参数文件中的参数开始并将默认值粘贴到模板中吗?(如果是这样,他们为什么不这样做?)

有没有办法读取正在运行的系统的实际参数。就像我在 azure 中使用自动化脚本部分时一样,值为 null

在此处输入图像描述

“$schema”:“ https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json# ”,“contentVersion”:“1.0.0.0”,“参数”:{“virtualMachineScaleSets_Services_name” :{ “价值”:空 },

当我粘贴旧配置中的参数时出现错误

14:01:16 - InvalidTemplate: Deployment template validation failed: 'The template parameters 'loadBalancers_LB_xwxservices_MainNode_name, loadBalancers_LB_xwxservices_MainNode_id, loadBalancers_LB_xwxservices_MainNode_id_1, clusters_xwxservices_name, loadBalancers_LB_xwxservices_MainNode_id_5, loadBalancers_LB_xwxservices_MainNode_id_6, loadBalancers_LB_xwxservices_MainNode_id_7, virtualMachineScaleSets_MainNode_name, loadBalancers_LB_xwxservices_MainNode_id_2, loadBalancers_LB_xwxservices_MainNode_id_3, loadBalancers_LB_xwxservices_MainNode_id_4' in the parameters file are not valid;

新 AzureRmResourceGroupDeployment:下午 12:27:25 - 错误:代码=无效模板;Message=Deployment template validation failed: 'The template parameters 'nt1applicationStartPort, nt2applicationEndPort, nt0ephemeralEndPort, clusterName, nt2ephemeralEndPort, nt2InstanceCount, nt0applicationStartPort, nt1fabricHttpGatewayPort, virtualNetworkName, certificateThumbprint, nt0fabricHttpGatewayPort, nt1InstanceCount, adminUserName, applicationDiagnosticsStorageAccountName, nt1ephemeralEndPort, vmNodeType0Size, nt1applicationEndPort, dnsTAName, lbTAIPName, nt0fabricTcpGatewayPort, lbName, dnsName, adminPassword, nicName, nt2fabricTcpGatewayPort, nt1fabricTcpGatewayPort, secondaryCertificateUrlValue, vmNodeType2Size, clusterLocation, nt1ephemeralStartPort, supportLogStorageAccountName, nt2applicationStartPort,参数文件中的无效;它们不存在于原始模板中,因此无法在部署时提供。此模板唯一支持的参数是 'virtualMachineScaleSets_Services_name、 virtualMachineScaleSets_Stateful_name、

4

1 回答 1

3

你需要放松。

自动生成的手臂模板并不意味着可以用于生产,它们需要改进。这是意料之中的。Azure 不能代替您推断任何单个参数值。通常大多数参数都被填充,但有时 - 不是。您对此无能为力,请手动填写。

于 2017-06-23T13:11:44.027 回答