Azure / Azure/azure-quickstart-templates
Unable to pass array of certificates to ARM for point to site vpn.
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
I am having troubles passing an array of point to site certificates using a VSTS task to deploy the template.
This is my parameter:
```
"pointToSiteRootCertificates": {
"type": "array",
"defaultValue": [
{
"certificateName": "cert1",
"base64EncodedPublicCertData": "base64EncodedPublicCert"
},
{
"certificateName": "cert2",
"base64EncodedPublicCertData": "base64EncodedPublicCert"
}
]
},
```
This is my resource:
```
{
"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')]"
}
}
}
```
This is my overriden parameter:
`-pointToSiteRootCertificates [{"name": "root", "properties": {"PublicCertData": "$(public-cert-root)"}}, {"certificateName": "root-prod-sub", "properties": {"PublicCertData":"$(public-cert-root-sub)"}}]`
I am getting the following error:
{
"error": {
"code": "InvalidRequestFormat",
"message": "Cannot parse the request.",
"details": []
}
}
I have tried many things, but was not able to get this working. Any ideas?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the pointToSiteRootCertificates parameter definition, the virtualNetworkGateways resource's vpnClientConfiguration, and the VSTS override value shown in the issue. Check the Azure ARM template schema and the generated deployment request to identify the expected certificate shape; done means the template deploys successfully with multiple certificates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100