question

RaminderChima-9287 avatar image
0 Votes"
RaminderChima-9287 asked ·

VS Logic Apps: SQl conenction using Gateway not deployable

Hi,
I am using VS2019 to develop Logic Apps. I need to connect to On-Premise SQL server for SQL Task. I am using Gateway to configure the connection.
Whenever I deploy the Logic App to Azure, the connection does not work. I have to delete and recreate it. I have tried specifying connection details during deployment manually as well as using parameter file.

Currently, due to this issue, I am forced to design Logic Apps in Azure designer which is less then ideal.

Thanks for the help in advance.

azure-logic-apps
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RaminderChima-9287 Could you share details on the error that you see post deployment? Also, could you confirm the API Connection is deployed along with the Logic App?

Another option could be to simply re-authorize the API Connection which is just required once as you could just redeploy the Logic App alone the next time around.

0 Votes 0 ·

I can see that SQL connection get created in Azure through VS and is active when logic app is designed. It's only when logic app is deployed, the connection bit goes wrong. This does not happen with Azure database connection. I think, when Logic App is getting deployed, specifying connection details during deployment, may create an issue.
Can't Re-Authorize as the connection instance in Azure becomes unusable. So, I have to manually recreate the connection in azure and modify Logic App to use new instance.

0 Votes 0 ·

@RaminderChima-9287 Yes. I believe the deploy does try replacing all resources part of the template. You could ensure the parameters are set correctly locally as well to ensure deployments are clean OR you could just comment out the API Connection locally while developing.

0 Votes 0 ·
Show more comments

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered ·

@RaminderChima-9287 I've tried this out and looks like the ARM Template generated doesn't have the gateway and authType set for the API Connection resources.

As described in this blog, adding a value like this under parameterValues should do the trick

"authType": "basic",
"gateway": {
    "id": "/subscriptions/{
                 {subscriptionId}}/resourceGroups/{
                 {reosurceGroupName}}/providers/Microsoft.Web/connectionGateways/{
                 {On-Premise DatagatewayName}}"
}



· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
A quick query. How do we use this with Devops where the resourcegroup or subscription or gateway may vary?
defining resourcegroupname, Subscription and gatewayname in parameter file does not work during release pipeline config as it is not considered as part of template.

Thanks in advance.

Regards,

0 Votes 0 ·

Instead of a parameter file, these values should be passed from the release pipeline through variables.


1 Vote 1 ·

Yes, I managed with few hiccups initially.

0 Votes 0 ·