Skip to content

Commit

Permalink
Add tags to all resources with some useful defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemonteith committed Apr 6, 2020
1 parent c8273ce commit df5749b
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions AzureResourceGroup/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,31 @@
},
"disableCORS": {
"type": "Bool"
},
"buildTag": {
"type": "String"
},
"expiresTag": {
"type": "String",
"defaultValue": "Never"
},
"ownerTag": {
"type": "String"
}
},
"variables": {
"locationAbbreviation": "[substring(parameters('location'), 0, 3)]",
"storageAccountName": "[concat('nhsukfeedback', parameters('environment'), variables('locationAbbreviation'))]",
"hostingPlanName": "[concat('nhsuk-user-feedback-plan-', parameters('environment'), '-', variables('locationAbbreviation'))]",
"appInsightsName": "[parameters('functionAppName')]",
"databaseName": "[concat('nhsuk-user-feedback-db-', parameters('environment'))]"
"databaseName": "[concat('nhsuk-user-feedback-db-', parameters('environment'))]",
"tags": {
"Owner": "[parameters('ownerTag')]",
"Product": "User Feedback",
"Build": "[parameters('buildTag')]",
"Expires": "[parameters('expiresTag')]",
"Environment": "[parameters('environment')]"
}
},
"resources": [
{
Expand All @@ -45,9 +62,7 @@
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[concat('Microsoft.DocumentDB/databaseAccounts/', variables('databaseName'))]"
],
"tags": {
"Owner": "Mike Monteith"
},
"tags": "[variables('tags')]",
"properties": {
"name": "[parameters('functionAppName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
Expand Down Expand Up @@ -104,6 +119,7 @@
"apiVersion": "2019-06-01",
"name": "[variables('storageAccountName')]",
"location": "[parameters('location')]",
"tags": "[variables('tags')]",
"sku": {
"name": "Standard_LRS"
},
Expand All @@ -116,10 +132,7 @@
"apiVersion": "2019-08-01",
"name": "[variables('hostingPlanName')]",
"location": "[parameters('location')]",
"dependsOn": [],
"tags": {
"Owner": "Mike Monteith"
},
"tags": "[variables('tags')]",
"sku": {
"Tier": "[parameters('hostingPlanSkuTier')]",
"Name": "[parameters('hostingPlanSkuName')]"
Expand All @@ -134,9 +147,7 @@
"apiVersion": "2015-05-01",
"name": "[variables('appInsightsName')]",
"location": "[parameters('location')]",
"tags": {
"Owner": "Mike Monteith"
},
"tags": "[variables('tags')]",
"kind": "web",
"properties": {
"Request_Source": "rest",
Expand All @@ -148,9 +159,7 @@
"apiVersion": "2020-03-01",
"name": "[variables('databaseName')]",
"location": "[parameters('location')]",
"tags": {
"Owner": "Mike Monteith"
},
"tags": "[variables('tags')]",
"kind": "MongoDB",
"properties": {
"locations": [{
Expand Down

0 comments on commit df5749b

Please sign in to comment.