-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,29 @@ | ||
name: Deploy Storage Account with Log Analytics | ||
name: Deploy Azure Resources | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
location: | ||
description: "Azure Region" | ||
required: true | ||
default: "UK South" | ||
resourceGroupName: | ||
description: "Resource Group Name" | ||
required: true | ||
default: "rrblobtest" | ||
logAnalyticsWorkspaceName: | ||
description: "Log Analytics Workspace Name" | ||
required: true | ||
default: "rrlogtest" | ||
storageAccountName: | ||
description: "Storage Account Name" | ||
required: true | ||
default: "test123434" | ||
containerName: | ||
description: "Blob Container Name" | ||
required: true | ||
default: "images" | ||
allowedIP: | ||
description: "Allowed IP Address" | ||
required: true | ||
default: "92.16.42.251" | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Create Resource Group | ||
run: | | ||
az group create \ | ||
--name ${{ github.event.inputs.resourceGroupName }} \ | ||
--location "${{ github.event.inputs.location }}" | ||
- name: Deploy Bicep Template | ||
run: | | ||
az deployment group create \ | ||
--resource-group ${{ github.event.inputs.resourceGroupName }} \ | ||
--template-file bicep/main.bicep \ | ||
--parameters location="${{ github.event.inputs.location }}" \ | ||
logAnalyticsWorkspaceName="${{ github.event.inputs.logAnalyticsWorkspaceName }}" \ | ||
storageAccountName="${{ github.event.inputs.storageAccountName }}" \ | ||
containerName="${{ github.event.inputs.containerName }}" \ | ||
allowedIP="${{ github.event.inputs.allowedIP }}" | ||
- name: Deploy Bicep File | ||
run: | | ||
az deployment group create \ | ||
--resource-group rrblobtest \ | ||
--template-file bicep/main.bicep \ | ||
--parameters location="UK South" \ | ||
storageAccountName="test123434" \ | ||
containerName="images" \ | ||
allowedIP="92.16.42.251" \ | ||
logAnalyticsWorkspaceName="rrlogtest" |