Jump to content

Static IP of Logic App Standard using NAT Gateway


Recommended Posts

Posted

Scenario

 

 

 

 

Route Logic App Standard traffic through your Virtual Network through specified static public IP address(es).

 

This approach will not work with Logic App Consumption

 

 

 

References

 

 

 

 

 

 

 

Services Used

 

 

 

 

  • Azure Logic Apps (Standard)
  • Azure Virtual Network
  • Azure NAT Gateway

 

 

 

Steps

 

 

 

 

1. Create Virtual Network

 

 

 

largevv2px999.thumb.png.79b5bb0ee61957b55e1b6a0bbc9d4f3d.png

 

 

 

 

 

2. Create Logic App Standard

 

 

 

largevv2px999.thumb.png.bd2d4e28b4faedc6f67b717fb0da78ea.png

 

 

 

 

 

3. Create a workflow within the Logic App and set up an outbound HTTP action.

 

 

This external website returns the IP address of the caller. This step mimics the HTTP trigger function mentioned here:

 

Control Azure Functions outbound IP with an Azure virtual network NAT gateway | Microsoft Learn

 

 

 

largevv2px999.png.962dd0e849515b446603f062292449e2.png

 

 

 

4. Integrate the Virtual Network Integration on the Logic App and select the VNET/subnet that was created in Step 1.

 

 

 

largevv2px999.thumb.png.c03d2c95b6f2a445d8bd761333867c98.png

 

 

 

 

 

 

 

5. (Optional) Test without the NAT Gateway Linked

 

  • Invoke the workflow first and make the outbound call before configuring the NAT Gateway for testing/checking which IP address is returned.
  • In this case, the IP address that was returned by the service is 20.88.178.231
  • The IP address is part of the range of outbound IP addresses of the Logic App on the Networking page.

 

 

 

largevv2px999.thumb.png.ae17568dbf1fd12319e69ec8efb25854.png

 

 

 

Navigate to the Networking blade of the Logic App and click on the list of Outbound IP addresses to view the full set. The IP address returned is part of the list.

 

 

 

largevv2px999.thumb.png.28090cff6a0a200aa9e473d416ef1b57.png

 

 

 

 

 

 

 

6. Create NAT Gateway and integrate it to the Virtual Network

 

 

 

These below steps can be done during or after creation:

 

  1. Link the NAT Gateway to the Virtual Network and subnet that is configured on the Logic App.
  2. Create a Public IP Address, which will act as the outbound IP address.

 

 

 

largevv2px999.thumb.png.9bf03f9dca6955f05a3d383c6d72018f.png

 

 

 

 

 

Check to see what the IP address has been created. The Outbound IP address is this case is 20.115.24.20. This is the static IP address. You can also create more IP addresses.

 

 

 

largevv2px999.thumb.png.7f405a27e1ac3301dbc6015956696c54.png

 

 

 

 

 

7. Test with the NAT Gateway Linked

 

  • Invoke the workflow first and make the outbound call after configuring the NAT Gateway for testing/checking which IP address is returned.
  • In this case, the IP address that was returned by the service is 20.114.24.20
  • The IP address is the Public IP address configured on the NAT Gateway, so the traffic has been routed through that.

 

 

 

largevv2px999.thumb.png.b1134efec0ec8c9b04edd8c8c521a4af.png

 

 

 

 

 

Conclusion

 

 

 

 

Logic Apps Standard can be integrated with a Virtual Network, which in turn can be integrated with a NAT Gateway. This helps with routing traffic on built-in connectors through the NAT Gateway, using the static IP(s) defined as the outbound IP. In this tutorial, I have created only 1 static IP, but it is possible to create more on the NAT Gateway, which will allow the Logic App's traffic to route through either one.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...