Skip to content

Instantly share code, notes, and snippets.

@chrisreddington
Last active July 13, 2019 22:55
Show Gist options
  • Save chrisreddington/ab8758676f5e89ee8df3fa783f665cc5 to your computer and use it in GitHub Desktop.
Save chrisreddington/ab8758676f5e89ee8df3fa783f665cc5 to your computer and use it in GitHub Desktop.
ARM Template for Core Resource Group Deployments
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"templateContainerUri": {
"type": "string",
"metadata": {
"description": "URI of the Blob Storage Container containing the ARM Templates"
}
},
"templateContainerSasToken": {
"type": "string",
"metadata": {
"description": "The SAS token of the container containing the ARM Templates"
}
},
"namingPrefix": {
"type": "string",
"metadata": {
"description": "Storage Account Name of the Origin"
}
}
},
"variables": {
"apimServiceName": "[concat(parameters('namingPrefix'), '-apim')]",
"appInsightsName": "[concat(parameters('namingPrefix'), '-ai')]",
"cogSvcAccountName": "[concat(parameters('namingPrefix'), '-search')]",
"prefixNameWithoutDashes": "[replace(parameters('namingPrefix'), '-', '')]"
},
"resources": [
{
"apiVersion": "2017-05-10",
"name": "storageAccountDeployment",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(parameters('templateContainerUri'), '/storageAccount.json', parameters('templateContainerSasToken'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"accountName": {
"value": "[concat(variables('prefixNameWithoutDashes'), 'stg')]"
}
}
}
},
{
"apiVersion": "2017-05-10",
"name": "apimDeployment",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(parameters('templateContainerUri'), '/apim.json', parameters('templateContainerSasToken'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"namePrefix": {
"value": "[concat(parameters('namingPrefix'))]"
}
}
}
},
{
"apiVersion": "2017-05-10",
"name": "apiLoggerDeployment",
"type": "Microsoft.Resources/deployments",
"dependsOn": [
"apimDeployment"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(parameters('templateContainerUri'), '/apim-backend-logger.json', parameters('templateContainerSasToken'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"apimServiceName": {
"value": "[variables('apimServiceName')]"
},
"appinsightsName": {
"value": "[variables('appInsightsName')]"
}
}
},
"comments": "Downstream template to deploy the logger for an API Microservice"
},
{
"apiVersion": "2017-05-10",
"name": "appInsightsDeployment",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(parameters('templateContainerUri'), '/applicationInsights.json', parameters('templateContainerSasToken'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"appinsightsName": {
"value": "[variables('appInsightsName')]"
}
}
},
"comments": "Downstream template to deploy an Azure Function (Function App, App Serivce Plan) and Storage Account, by using the Theatreers Azure Function Building Block."
}
],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment