Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jvenkat255/f19b46a036e8dd43c8c25be1cbd3bc29 to your computer and use it in GitHub Desktop.
Save jvenkat255/f19b46a036e8dd43c8c25be1cbd3bc29 to your computer and use it in GitHub Desktop.
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sendgridAccountName": {
"type": "string",
"metadata": {
"description": "The name of your new SendGrid account."
}
},
"sendgridPassword": {
"type": "securestring",
"metadata": {
"description": "The password to use for your new SendGrid account."
}
},
"toAddress": {
"type": "string",
"metadata": {
"description": "The email address to send the test message to."
}
},
"webAppName": {
"type": "string",
"metadata": {
"description": "The name of the web app to create."
},
"minLength": 1
},
"svcPlanName": {
"type": "string",
"metadata": {
"description": "The name of the App Service plan to create for hosting the logic app."
},
"minLength": 1
},
"sku": {
"type": "string",
"defaultValue": "Standard",
"allowedValues": [
"Free",
"Basic",
"Standard",
"Premium"
],
"metadata": {
"description": "The pricing tier for the app service plan."
}
},
"storageName": {
"type": "string",
"minLength": 1
},
"storageType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS"
]
}
},
"resources": [
{
"name": "[parameters('svcPlanName')]",
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2014-06-01",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('svcPlanName')]",
"sku": "[parameters('sku')]",
"workerSize": "0",
"numberOfWorkers": 1
}
},
{
"name": "[parameters('sendgridAccountName')]",
"type": "Sendgrid.Email/accounts",
"apiVersion": "2015-01-01",
"location": "[resourceGroup().location]",
"plan": {
"name": "free",
"publisher": "Sendgrid",
"product": "sendgrid_azure",
"promotionCode": ""
},
"properties": {
"password": "[parameters('sendgridPassword')]",
"acceptMarketingEmails": "0",
"email": ""
}
},
{
"name": "[parameters('storageName')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"apiVersion": "2015-05-01-preview",
"dependsOn": [ ],
"tags": {
"displayName": "[parameters('storageName')]"
},
"properties": {
"accountType": "[parameters('storageType')]"
}
},
{
"name": "[parameters('webAppName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"apiVersion": "2014-06-01",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('svcPlanName'))]"
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('svcPlanName'))]": "Resource",
"displayName": "[parameters('webAppName')]"
},
"properties": {
"name": "[parameters('webAppName')]",
"serverFarm": "[parameters('svcPlanName')]"
},
"resources": [
{
"type": "config",
"name": "appsettings",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/', parameters('webAppName'))]",
"[resourceId('Sendgrid.Email/accounts', parameters('sendgridAccountName'))]"
],
"properties": {
"toAddress": "[parameters('toAddress')]",
"sendgridSmtpServer": "[reference(resourceId('Sendgrid.Email/accounts', parameters('sendgridAccountName'))).smtpServer]",
"sendgridUsername": "[reference(resourceId('Sendgrid.Email/accounts', parameters('sendgridAccountName'))).username]",
"sendgridPassword": "[parameters('sendgridPassword')]"
}
},
{
"type": "config",
"name": "connectionstrings",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/', parameters('webAppName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageName'))]"
],
"properties": {
"AzureWebJobsDashboard": {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '2015-05-01-preview').key1)]",
"type": "Custom"
},
"AzureWebJobsStorage": {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '2015-05-01-preview').key1)]",
"type": "Custom"
}
}
}
]
}
],
"outputs": {
"SendGrid": {
"type": "object",
"value": "[reference(resourceId('Sendgrid.Email/accounts', parameters('sendgridAccountName')))]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment