Create diagrams #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |