使用VSTS任务部署模板时,我遇到了一系列点对站点证书的麻烦。
这是我的参数:
"pointToSiteRootCertificates": {
"type": "array",
"defaultValue": [
{
"name": "cert1",
"properties":{
"PublicCertdata" : "base64EncodedPublicCert"
}
},
{
"name": "cert2",
"properties":{
"PublicCertdata" : "base64EncodedPublicCert"
}
}
]
},
这是我的资源:
{
"apiVersion": "[variables('api-version')]",
"type": "Microsoft.Network/virtualNetworkGateways",
"name": "[variables('virtualGatewayName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('gatewayPublicIPName'))]",
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
],
"properties": {
"ipConfigurations": [
{
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[variables('gatewaySubnetRef')]"
},
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('gatewayPublicIPName'))]"
}
},
"name": "vnetGatewayConfig"
}
],
"sku": {
"name": "[parameters('gatewaySku')]",
"tier": "[parameters('gatewaySku')]"
},
"gatewayType": "Vpn",
"vpnType": "[parameters('vpnType')]",
"enableBgp": "false",
"vpnClientConfiguration": {
"vpnClientAddressPool": {
"addressPrefixes": [
"[parameters('vpnClientAddressPoolPrefix')]"
]
},
"vpnClientRootCertificates": "[parameters('pointToSiteRootCertificates')]"
}
}
}
这是我的覆盖参数:
-pointToSiteRootCertificates [{"name": "root", "properties": {"PublicCertData": "$(public-cert-root)"}}, {"certificateName": "root-prod-sub", "properties": {"PublicCertData":"$(public-cert-root-sub)"}}]
我收到以下错误:
{
"error": {
"code": "InvalidRequestFormat",
"message": "Cannot parse the request.",
"details": []
}
}
我尝试了很多东西,但却无法实现这一目标。有什么想法吗?