Skip to content

Commit

Permalink
adding diag to st account (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
krnese authored Feb 1, 2024
1 parent cef195b commit 8a0d76e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions fsi/solutions/generativeAi/storageAccount.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,22 @@
"Yes",
"No"
]
},
"stMonCreate": {
"type": "string",
"defaultValue": "No",
"allowedValues": [
"Yes",
"No"
]
}
},
"variables": {
"name-compliant-storage": "[toLower(take(concat(replace(replace(parameters('prefix'), '-', ''), '_', ''), parameters('location'), uniqueString(deployment().name)), 23))]",
"name-compliant-keyvault": "[concat(parameters('prefix'), '-', parameters('location'), '-kv')]",
"name-compliant-storage-asg": "[concat(parameters('prefix'), '-storage-asg')]",
"name-compliant-storage-pe": "[concat(parameters('prefix'), '-storage-pe')]",
"name-compliant-azMon": "[concat(parameters('prefix'), '-', parameters('location'), '-azmon')]",
"cmk": {
"requireInfrastructureEncryption": true,
"identity": {
Expand Down Expand Up @@ -183,6 +192,39 @@
}
}
},
{
"condition": "[equals(parameters('stMonCreate'), 'Yes')]",
"type": "Microsoft.Storage/storageAccounts/blobServices/providers/diagnosticSettings",
"apiVersion": "2021-05-01-preview",
"name": "[concat(variables('name-compliant-storage'), '/default/', 'Microsoft.Insights/', 'diag')]",
"location": "[parameters('location')]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('name-compliant-storage'))]"
],
"properties": {
"workspaceId": "[concat(subscription().id, '/resourceGroups/', parameters('rgName'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('name-compliant-azMon'))]",
"metrics": [
{
"category": "AllMetrics",
"enabled": true
}
],
"logs": [
{
"category": "StorageRead",
"enabled": true
},
{
"category": "StorageWrite",
"enabled": true
},
{
"category": "StorageDelete",
"enabled": true
}
]
}
},
{
"condition": "[and(equals(parameters('stDisableNetworkAccess'), 'Yes'), not(empty(parameters('stSubnetId'))))]",
"type": "Microsoft.Network/applicationSecurityGroups",
Expand Down

0 comments on commit 8a0d76e

Please sign in to comment.