0

I am trying to create a bicep deployment set up in VS Code so that I can automate the creation of:

  • Resource Group
  • Logic App (Standard)
  • Key Vault
  • Storage
  • Sql Connection
  • On Premises Data Gateway

I am having an issue with the creation of the On Premsis Data Gateway Resource.

From the documentation I know that before I can execute my bicep configuration I need to have the data gateway installed on a local machine. Which I have done.

The issue I have is that the bicep for Microsoft.Web/connectionGateways@2016-06-01 requires that I have the configuration for the connectionGatewayInstallation, (I.e. I need to point the resource at the actual installed Gateway).

I cannot figure out how to get the name of the installation, which expects a guid, without actually creating the resource via the portal, then viewing the ARM json.

 resource datagateway 'Microsoft.Web/connectionGateways@2016-06-01' = {
  name: name
  location: location
  properties: {
    connectionGatewayInstallation: {
      location: location
      name: '232234d1-7aac-4c3f-bed9-5d227891ce02'
      id: '/subscriptions/<subscription guid>/providers/Microsoft.Web/locations/australiaeast/connectionGatewayInstallations/232234d1-7aac-4c3f-bed9-5d227891ce02'
      type: 'Microsoft.Web/locations/connectionGatewayInstallations'
    }
    contactInformation: [
      'yolo@example.com'
    ]
    displayName: name
    machineName: machineName
    status: 'Installed'
  }
}

Any Ideas on how I can get the installation name of an On Premises Data Gateway from Azure via code (bicep, powershell, etc)?

Luke
  • 21
  • 2

0 Answers0