简体   繁体   中英

Deploy on premise data gateway on Azure VM via ARM

We have successfully configured a On Premise data gateway on an Azure VM, using this gateway as trigger in a logic app works. All this is done manually.

Is there a way to achieve this with ARM? Is there a sample ARM template available for this?

If you want to create on-premise data gateway with ARM template. Please have a try to use the following ARM template, it works correctly on my side.

Deploy.json

{
    "$schema": "https://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "gatewayApiVersion": {
        "type": "String"
      },
        "gatewayName": {
            "type": "String"
        },
        "gatewayLocation": {
            "type": "String"
        },
        "gatewayInstallationId": {
            "type": "String"
        }
    },
    "resources": [
        {
            "type": "Microsoft.Web/connectionGateways",
            "name": "[parameters('gatewayName')]",
            "apiVersion": "[parameters('gatewayApiVersion')]",
            "location": "[parameters('gatewayLocation')]",
            "properties": {
                "connectionGatewayInstallation": {
                    "Id": "[parameters('gatewayInstallationId')]"
                }
            }
        }
    ]
}

Parameters.json

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
  "parameters": {
    "gatewayApiVersion": {
      "value": "2015-08-01-preview"
    },
    "gatewayName": {
      "value": "gatewayName"
    },
    "gatewayLocation": {
      "value": "location"
    },
    "gatewayInstallationId": {
      "value": "/subscriptions/{subscriotionId}/providers/Microsoft.Web/locations/{location}/connectionGatewayInstallations/xxxxxxxxxx"
    }
  }
}

Before that we need to Install the on-premises data gateway manually on the machine, more details about how install on-premises data gateway please refer to the azure document.

For gatewayLocation value, please make sure that the same with on-premises data gateway.

在此处输入图片说明

For gatewayInstallationId value, if we try to create it from azure we could get value from the portal.

在此处输入图片说明

Test result:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM