From 44fa65ccdbf789d0fcab3ca54668f77e71e2762f Mon Sep 17 00:00:00 2001 From: Julien Homer Date: Fri, 6 Oct 2023 15:23:41 +0200 Subject: [PATCH] Add Azure deployment template & Deployment button --- .../Log Analytics Workspace/azuredeploy.json | 117 ++++++++++++++++++ README.md | 3 +- 2 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 AzureTemplates/Log Analytics Workspace/azuredeploy.json diff --git a/AzureTemplates/Log Analytics Workspace/azuredeploy.json b/AzureTemplates/Log Analytics Workspace/azuredeploy.json new file mode 100644 index 0000000..cc7b5c3 --- /dev/null +++ b/AzureTemplates/Log Analytics Workspace/azuredeploy.json @@ -0,0 +1,117 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "Name": { + "type": "String", + "defaultValue": "dashlane-audit-logs-law", + "allowedValues": ["dashlane-audit-logs-law"] + }, + "location": { + "type": "string", + "metadata": { + "description": "Location of the container. We recommend to use the same value as the \"Region\" parameter." + } + }, + "Dashlane team UUID": { + "type": "secureString", + "metadata": { + "description": "Dashlane's team UUID" + }, + "minLength": 36, + "maxLength": 36 + }, + "Dashlane team access key": { + "type": "secureString", + "metadata": { + "description": "Dashlane's team access key" + }, + "minLength": 16, + "maxLength": 16 + }, + "Dashlane team secret key": { + "type": "secureString", + "metadata": { + "description": "Dashlane's team secret key" + }, + "minLength": 64, + "maxLength": 64 + }, + "Workspace ID": { + "type": "string", + "metadata": { + "description": "Log analytics Workspace ID" + }, + "minLength": 36, + "maxLength": 36 + }, + "Shared key": { + "type": "string", + "metadata": { + "description": "Log analytics shared key" + }, + "minLength": 88, + "maxLength": 88 + } + + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2023-05-01", + "name": "[parameters('Name')]", + "location": "[parameters('location')]", + "properties": { + "sku": "Standard", + "containers": [ + { + "name": "[parameters('Name')]", + "properties": { + "image": "dashlane/audit-logs:latest", + "ports": [], + "environmentVariables": [ + { + "name": "DASHLANE_TEAM_UUID", + "value": "[parameters('Dashlane team UUID')]" + }, + { + "name": "DASHLANE_TEAM_ACCESS_KEY", + "value": "[parameters('Dashlane team access key')]" + }, + { + "name": "DASHLANE_TEAM_SECRET_KEY", + "value": "[parameters('Dashlane team secret key')]" + }, + { + "name": "WORKSPACE_ID", + "value": "[parameters('Workspace ID')]" + }, + { + "name": "SHARED_KEY", + "value": "[parameters('Shared key')]" + } + + ], + "resources": { + "requests": { + "memoryInGB": 1.5, + "cpu": 1 + } + } + } + } + ], + "diagnostics": { + "logAnalytics": { + "logType": "ContainerInstanceLogs", + "workspaceId": "[parameters('Workspace ID')]", + "workspaceKey": "[parameters('Shared key')]" + } + }, + "restartPolicy": "Always", + "osType": "Linux" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index a8cce5a..c70a3e4 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,7 @@ To send your Dashlane audit logs on Azure in a Log Analytics Workspace, you can >**Click on the button to start the deployment** > ->![Deploy to Azure](https://aka.ms/deploytoazurebutton) - +> [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FDashlane%2Fdashlane-audit-logs%2Fmain%2FAzureTemplates%2FLog%20Analytics%20Workspace%2Fazuredeploy.json) ### Azure blob storage