-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.36 KB
/
deploy-storage-account.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy Azure Resources
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create Resource Group
run: |
az group create --name rrblobtest --location "UK South"
- name: Deploy Storage Account
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: Associate Log Analytics Workspace
run: |
az monitor diagnostic-settings create \
--name "storageAccountDiagnostics" \
--resource /subscriptions/929d7635-207a-4b22-8d24-34e2ae29092b/resourceGroups/rrblobtest/providers/Microsoft.Storage/storageAccounts/teststorage20241229 \
--metrics '[{"category": "Transaction", "enabled": true}, {"category": "Capacity", "enabled": true}]' \
--workspace /subscriptions/929d7635-207a-4b22-8d24-34e2ae29092b/resourceGroups/rrblobtest/providers/Microsoft.OperationalInsights/workspaces/rrlogtest