Skip to main content

Interconnecting Azure Function with DBAAS Opensearch

Introduction

By default, DBaas opensearch is accessible from anywhere, from any device. Of course, based on the security level of each project, DBaas opensearch is also compatible with other type of access to limit the exposure of application.The purpose of this documentation is to show how to interconnect an Azure Function with DBaas opensearch

Proposition

Interconnection

Tutorial

First we need to create the VNET in the same region as the Azure function. In the following exemple we've used an existing resource group but you can also create a new one.

Create_vnet_basic

  • Create a /24 network. From our observation, Azure function need at least 200 ips.

Create_vnet_ip

  • Security configuration(optional)

Create_vnet_security

  • Tagging(optional)

Create_vnet_tag

  • Create the subnet for the vnet.

Create_vnet_subnet

/subscriptions/<SubscriptionID>/resourceGroups/<resource_group_name>/providers/Microsoft.Network/virtualNetworks/<vnet_name>

  • you might have to add us as network contributor on the VNET.
  • Richard Bonnette
  • Loic Jardin
  • Romain Meunier
  • Jean-Francois Lelezec

If you already have an Azure function you can skip the steps

This part is subjective and only an example.

  • Creating a Function
    • Select your subscription
    • Select or create a resource group
    • Name your application
    • Select Publish type
    • Select your runtime stack and version
    • Be sure to use the same region as your vnet

create_function_basic

  • Configure the Hosting tab
    • Choose an existing Storage account or create a new one
    • Choose an Operating system
    • Choose a Plan, only Premium and App service plan can use vnet.
    • SKU and size can be change, Option are limited

Create_function_hosting

Create_function_spec_picker

  • Leave the Networking Injection to OFF, we will configure it later

Create_function_network

  • For this example we'll turn off the monitoring.

Create_function_monitoring

  • Add tags if needed (optional)

Create_function_tags

Linking Your Azure Function with a VNet

In your Azure Function, go to networking tab.

  • In outbound, click Vnet integration.
  • Add Vnet
  • Choose your Subscriptiong
  • Choose the Vnet you created earlier
  • Then select created Subnet

add_vnet_integration