Deploy Azure Logic App + SQL Database Using ARM Template
Overview
This guide provides a complete, copy-paste-ready ARM template to deploy an Azure Logic App integrated with a SQL Database. It includes dynamic parameters, environment-specific settings, and API key management for secure deployments.
ARM Template Deployment Steps
- Step 1: Define Parameters: Include environment, location, SQL server name, database name, Logic App name, and API keys.
- Step 2: Configure Resources: Add Logic App workflow definition and SQL Database resource in the template.
- Step 3: Use Dynamic Values: Use parameters for environment, SKU, location, and credentials.
- Step 4: Deploy Template: Use Azure CLI or PowerShell to deploy the ARM template.
- Step 5: Validate Deployment: Check Logic App and SQL Database status in the Azure Portal.
🔥 Logic App Deployment FAQs – Brutally Honest Answers 🔥
1. What the heck is an ARM template?
It’s a JSON file that automates Azure deployments. Stop clicking manually — let the machine do the work!
2. Can I actually use dynamic parameters?
YES. Variables, parameters, expressions — all the power. Stop hardcoding things like it’s 2010.
3. How do I deploy without screwing up?
Use Azure CLI or PowerShell. Validate before deploying. Blind clicks = disaster.
4. How do I protect my API keys?
Stop putting them in plain JSON. Use
securestring and Key Vault. Don’t leak secrets.5. Can I deploy SQL DB and Logic App together?
Absolutely. ARM templates handle dependencies. Deploying separately = chaos.
6. How to handle dev/test/prod configs?
Use parameters and environment variables. Stop copying templates manually.
7. Can I validate the template first?
Yes! Run
az deployment group validate. Don’t deploy blind.8. Can I import a Logic App workflow JSON?
Yes. Inject it into
definition. Reuse, don’t reinvent.9. Why bother with ARM templates anyway?
Automation, repeatability, fewer errors, version control. Stop doing it manually.
10. How do I update deployed resources?
Update your template and redeploy. Azure handles the heavy lifting.
ARM Template Example
Below is a fully copy-paste-ready ARM template to deploy an Azure Logic App integrated with a SQL Database. This example uses dynamic parameters, secure API key management, and environment-specific configurations.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": { "type": "string", "metadata": { "description": "Logic App Name" } },
"sqlServerName": { "type": "string", "metadata": { "description": "SQL Server Name" } },
"sqlDatabaseName": { "type": "string", "metadata": { "description": "SQL Database Name" } },
"location": { "type": "string", "defaultValue": "[resourceGroup().location]" },
"environment": { "type": "string", "allowedValues": ["dev","test","prod"], "defaultValue": "dev" },
"apiKey": { "type": "securestring" }
},
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2022-02-01-preview",
"name": "[parameters('sqlServerName')]",
"location": "[parameters('location')]",
"properties": { "administratorLogin": "sqladmin", "administratorLoginPassword": "[parameters('apiKey')]" },
"resources": [
{
"type": "databases",
"apiVersion": "2022-02-01-preview",
"name": "[parameters('sqlDatabaseName')]",
"properties": { "collation": "SQL_Latin1_General_CP1_CI_AS", "maxSizeBytes": 2147483648 }
}
]
},
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2019-05-01",
"name": "[parameters('logicAppName')]",
"location": "[parameters('location')]",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {},
"triggers": { "manual": { "type": "Request", "kind": "Http", "inputs": { "schema": {} } } }
},
"parameters": { "environment": { "value": "[parameters('environment')]" } }
}
}
]
}




