I have an ARM (azure resource manager) template that defines an SQL Connection.The SQL Connection needs to use an On-Premises Data Gateway resource.
My Question: What is the resource schema for configuring a SQL Connection resource to use an On-Premises Data gateway resource?
Here is the current resource JSON:
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"name": "sql",
"location": "southcentralus",
"kind": "V1",
"properties": {
"displayName": "OnPremSqlConn",
"parameterValues": {
"server": "XXXXXXXXXX",
"database": "XXXXXXXXXX",
"authType": "windows",
"userName": "XXXXXXXXXX",
"password": "XXXXXXXXXX"
},
"customParameterValues": {},
"api": {
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/providers/Microsoft.Web/locations/southcentralus/managedApis/sql"
}
}
}
I searched for "arm template sql connection use gateway" and this was the first result.
The pertinent part being:
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Web/connectionGateways/{{On-Premise DatagatewayName}}"
This ID will also be available in the URL bar if you navigate to the resource within the Azure portal, or you could setup the gateway against an existing Azure SQL DB and then use the export template functionality to get an ARM template from this resource.