Skip to content

Commit

Permalink
Update deploy-storage-account.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rrichley authored Dec 30, 2024
1 parent 62c5a1f commit 066321d
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/deploy-storage-account.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Azure Storage Account and Log Analytics Workspace
name: Deploy Azure Storage Account and Associate Log Analytics Workspace

on:
push:
Expand All @@ -22,29 +22,22 @@ jobs:
run: |
az group create --name rrblobtest --location "UK South"
- name: Deploy Storage Account
- name: Deploy Storage Account and Log Analytics Workspace
run: |
az deployment group create \
--resource-group rrblobtest \
--template-file bicep/storage-account.bicep \
--parameters location="UK South" \
storageAccountName="teststorage20241229" \
containerName="images" \
allowedIP="92.16.42.251"
- name: Deploy Log Analytics Workspace
run: |
az deployment group create \
--resource-group rrblobtest \
--template-file bicep/log-analytics.bicep \
--parameters location="UK South" \
allowedIP="92.16.42.251" \
logAnalyticsWorkspaceName="rrlogtest"
- name: Associate Log Analytics Workspace with Storage Account
run: |
az monitor diagnostic-settings create \
--resource "/subscriptions/${{ secrets.SUBSCRIPTION_ID }}/resourceGroups/rrblobtest/providers/Microsoft.Storage/storageAccounts/teststorage20241229" \
--name "storageAccountDiagnostics" \
--resource "/subscriptions/${{ secrets.SUBSCRIPTION_ID }}/resourceGroups/rrblobtest/providers/Microsoft.Storage/storageAccounts/teststorage20241229" \
--workspace "/subscriptions/${{ secrets.SUBSCRIPTION_ID }}/resourceGroups/rrblobtest/providers/Microsoft.OperationalInsights/workspaces/rrlogtest" \
--logs '[{"category": "StorageRead", "enabled": true},{"category": "StorageWrite", "enabled": true},{"category": "StorageDelete", "enabled": true}]' \
--metrics '[{"category": "AllMetrics", "enabled": true}]'

0 comments on commit 066321d

Please sign in to comment.