I am deploying a Logic App Custom Connector via arm template. In the ARM template the type is Microsoft.Web/customApi.
We are also deploying the connector (Microsoft.Web/connections).
The items deploy OK but the Basic Authentication parameters are not linking properly between the customApi and the connection.
The display names of the params are being reflected in the connection though, and this seems all OK (note the password is supposed to be blank, the test REST API we are using just takes username):
If we add the display names in to the custom connector, and update the connection, it works. This is what the custom connector looks like after being updated:
So we want to get to this point purely from the ARM deployment without manual steps required. Is it possible? The documentation of Microsoft.Web/customApi doesn't give any detail about the connectionParameters you can supply.
ARM snippet for the customApi:
"type": "Microsoft.Web/customApis",
"name": "[variables('CustomConnectorName')]",
"apiVersion": "2016-06-01",
"location": "[variables('resourceGroupLocation')]",
"tags": {
"Environment": "[variables('environment')]"
},
"scale": null,
"properties": {
"capabilities": [
"gateway"
],
"connectionParameters": {
"username": {
"type": "string",
"uiDefinition": {
"displayName": "ConnectionUsername",
"description": "The UserName for this api",
"tooltip": "Provide the UserName",
"constraints": {
"tabIndex": 2,
"clearText": true,
"required": "true"
}
}
},
"password": {
"type": "string",
"uiDefinition": {
"displayName": "ConnectionPassword",
"description": "The Password for this api",
"tooltip": "Provide the Password",
"constraints": {
"tabIndex": 3,
"clearText": false,
"required": "false"
}
}
},
"authType": {
"type": "string",
"allowedValues": [
{
"value": "basic"
}
],
"uiDefinition": {
"displayName": "Authentication Type",
"description": "Authentication type to connect to your API",
"tooltip": "Authentication type to connect to your API",
"constraints": {
"tabIndex": 1,
"required": "true",
"allowedValues": [
{
"text": "basic",
"value": "basic"
}
]
}
}
},
"gateway": {
"type": "gatewaySetting",
"gatewaySettings": {
"dataSourceType": "CustomConnector",
"connectionDetails": []
},
"uiDefinition": {
"constraints": {
"tabIndex": 4,
"required": "true",
"capability": [
"gateway"
]
}
}
}
},
ARM snippet for the connection:
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"location": "[resourceGroup().location]",
"name": "MyCustomConnector",
"properties": {
"api": {
"id": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name,'/providers/Microsoft.Web/customApis/MyCustomConnector')]"
},
"displayName": "MyCustomConnector",
"parameterValues": {
"username": "[variables('UserName')]",
"password": "[variables('Password')]",
"authType": "basic",
"gateway": {
"id": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',variables('coreResourceGroupName'),'/providers/Microsoft.Web/connectionGateways/',variables('onPremiseGatewayName'))]"
}
}
}
}
I'd be grateful for any suggestions about how we can get the customApi to deploy with the correct parameter names saved to negate the need for the manual step.
Thanks