Azure MSSQL Connector
An overview on how to configure Form.io SQL Connector on a managed Azure App Service connected to an Azure SQL Server instance and mount the configuration to volume mounted storage.
Last updated
An overview on how to configure Form.io SQL Connector on a managed Azure App Service connected to an Azure SQL Server instance and mount the configuration to volume mounted storage.
Last updated
Create to the App Services from your dashboard then click + Create to create a new App Service.
On the Basics Tab enter these settings.
Under Project Details choose a Subscription
Under Project Details choose a Resource Group
Under Instance Details enter an App Service Name.
Under Instance Details select Docker Container as the Publish method.
Under Instance Details choose Linux as the Operating System.
Under Instance Details select a Region of you choice.
Under Pricing Plans choose a Linux Plan which is dependent on the chosen region.
On the Docker Tab enter these settings.
For Options select Docker Compose (Preview).
For Image Source choose Docker Hub.
Under Docker hub options for Access Type choose Public
For your Configuration File select the connector.docker-compose.yml
from the downloaded zip at the top of this page.
On the Review + create tab review the App Service settings then press the Create button.
From the left panel in Azure, under the Development Tools section select Advanced Tools blade, once on the page press the Go -> link.
The Go -> link with redirect to the Azure App Service admin page. From here click on the Bash tab at the top of the page.
Once have been directed to the DebugConsole page, run the following commands to use Vim to add the .sqlconnectorrc
where it can be reached from the container.
Upon completion this should be all you need to configure on the App Service side for the connector to work. From here you will continue by configuring the SQL Connector from the Integration Settings in your project stage.
Now that we've mounted the .sqlconnectorrc
file to the container we will want to configure the SQL Connector from the portal so that the API server can make calls to the Connector for Form Submissions.
To get to the SQL Connector settings follow this steps, select the Settings option from left drawer -> Select Integrations -> Data Connections -> SQL Connector.
Enter the Default Domain from your Azure App Service Overview page for SQL Connector HOST URL
Select Microsoft SQL from the Type dropdown.
Enter a Basic Auth username and password that will be used for the API server to create submissions against the SQL database.
In this section we will be validating that our configuration works with either an existing form or by creating a new form and configurating it with the SQL Connector Action.
In my demo I created a simple Customer Resource that has 2 Text Fields (First Name, and Email).
Once you've selected or created a form to use will want to click on the Actions tab for that form. Here's you will be shown a Form Actions card.
From the Select an Action dropdown choose SQL Connector (Premium).
You will be shown are form for configuring the field mappings that Form.io will use for creating records against an SQL database.
After configuring the field mappings you can now test the connection works by navigating to the Use tab and creating a form submission.
The last step is to validate in from a GUI connected to your SQL server instance to verify that the record has been propagated to our SQL database.