Hello @Ofek Waiz
Happy to help.
To create a service connector for a Function App and MySQL Flexible Server in a Virtual Network, you can follow these 4 steps:
- Ensure that your Function App has a System Assigned Managed Identity enabled.
- Grant the Function App's managed identity access to the Virtual Network where the MySQL Flexible Server resides.
- Create a service endpoint for the Virtual Network.
- Create a service connection between the Function App and the MySQL Flexible Server using the service endpoint.
To grant the Function App's managed identity access to the Virtual Network, you can follow these 6 steps:
- Go to the Virtual Network where the MySQL Flexible Server resides.
- Go to the "Access control (IAM)" tab.
- Click on "Add" and select "Add role assignment".
- In the "Add role assignment" pane, select the "Virtual Network Contributor" role.
- In the "Select" pane, search for the Function App's managed identity and select it.
- Click on "Save" to add the role assignment.
To create a service endpoint for the Virtual Network, you can follow these 4 steps:
- Go to the Virtual Network where the MySQL Flexible Server resides.
- Go to the "Service endpoints" tab.
- Click on "Add" and select "Microsoft.DBforMySQL".
- Click on "Add" to add the service endpoint.
To create a service connection between the Function App and the MySQL Flexible Server using the service endpoint, you can follow these 14 steps:
- Go to the Function App.
- Go to the "Platform features" tab.
- Click on "Networking".
- Click on "Add inbound IP rule".
- In the "Add inbound IP rule" pane, select the "Service tag" option.
- In the "Service tag" field, select "AzureDBforMySQL".
- Click on "Add" to add the inbound IP rule.
- Go to the "Platform features" tab.
- Click on "Connections".
- Click on "Add".
- In the "Add connection" pane, select "Azure Database for MySQL".
- Enter the required information, including the server name, database name, and credentials.
- Select the "Use a system-assigned managed identity" option.
- Click on "Create" to create the service connection.
This should get you started.