Azure 资源管理器模板
Azure resource manager template
我正在尝试使用我的 ARM 代码构建多个 SQL 虚拟机。但是,在绑定创建网络对等互连时,我遇到了以下错误。
[ERROR] New-AzureRmResourceGroupDeployment : 08:40:20 - Error: Code=InvalidTemplate;
[ERROR] Message=Deployment template validation failed: 'The template resource
[ERROR] 'DI_SQLSERVER_VNETag5w7jqj6vp3a_TO_DI_DT_VN' for type
[ERROR] 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings' at line '488' and
[ERROR] column '9' has incorrect segment lengths. A nested resource type must have
[ERROR] identical number of segments as its resource name. A root resource type must
[ERROR] have segment length one greater than its resource name. Please see
[ERROR] https://aka.ms/arm-template/#resources for usage details.'.
[ERROR]
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeplo
[ERROR] yment], Exception
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
[ERROR] New-AzureRmResourceGroupDeployment : The deployment validation failed
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeploym
[ERROR] ent], InvalidOperationException
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
请参阅下面的 link 代码。希望有人可以阐明以下 arm 模板错误。
https://drive.google.com/open?id=1Iltf_Qlg9GLPmOKTVDpP2KjrQcLvVZDg
谢谢
你的对等名称应该是这样的:vnet_name/peering_name
,因为对等不能单独存在(如果你不提供 vnet 名称,它就无法确定自己属于哪个 vnet),它是一个子vnet 资源的资源。
我正在尝试使用我的 ARM 代码构建多个 SQL 虚拟机。但是,在绑定创建网络对等互连时,我遇到了以下错误。
[ERROR] New-AzureRmResourceGroupDeployment : 08:40:20 - Error: Code=InvalidTemplate;
[ERROR] Message=Deployment template validation failed: 'The template resource
[ERROR] 'DI_SQLSERVER_VNETag5w7jqj6vp3a_TO_DI_DT_VN' for type
[ERROR] 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings' at line '488' and
[ERROR] column '9' has incorrect segment lengths. A nested resource type must have
[ERROR] identical number of segments as its resource name. A root resource type must
[ERROR] have segment length one greater than its resource name. Please see
[ERROR] https://aka.ms/arm-template/#resources for usage details.'.
[ERROR]
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeplo
[ERROR] yment], Exception
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
[ERROR] New-AzureRmResourceGroupDeployment : The deployment validation failed
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeploym
[ERROR] ent], InvalidOperationException
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
请参阅下面的 link 代码。希望有人可以阐明以下 arm 模板错误。
https://drive.google.com/open?id=1Iltf_Qlg9GLPmOKTVDpP2KjrQcLvVZDg
谢谢
你的对等名称应该是这样的:vnet_name/peering_name
,因为对等不能单独存在(如果你不提供 vnet 名称,它就无法确定自己属于哪个 vnet),它是一个子vnet 资源的资源。