Skip to content

Commit 89aa775

Browse files
authored
Merge pull request #14 from fwickert/Redis-cache
Redis cache
2 parents 60318b9 + cb43f1d commit 89aa775

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

.github/workflows/Iac.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Azure Bicep
2+
3+
on:
4+
workflow_dispatch
5+
6+
env:
7+
targetEnv: dev
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
steps:
17+
# Checkout code
18+
- uses: actions/checkout@main
19+
20+
# Log into Azure
21+
- uses: azure/[email protected]
22+
with:
23+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
24+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
25+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
26+
enable-AzPSSession: true
27+
28+
# Deploy ARM template
29+
- name: Run ARM deploy
30+
uses: azure/arm-deploy@v1
31+
with:
32+
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33+
resourceGroupName: ${{ secrets.AZURE_RG }}
34+
template: ./src/InfrastructureAsCode/main.bicep
35+
parameters: environment=${{ env.targetEnv }}

.github/workflows/dotnet.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
name: .NET
55

66
on:
7-
push:
8-
branches: [ "main" ]
9-
paths: src/Application/**
10-
pull_request:
11-
branches: [ "main" ]
12-
paths: src/Application/**
7+
138

149
workflow_dispatch:
1510
jobs:

src/InfrastructureAsCode/main.bicep

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12
2929
}
3030
}
3131

32+
resource redisCache 'Microsoft.Cache/Redis@2020-06-01' = {
33+
name: 'myRedisCachefw' // Replace with your Redis cache name
34+
location: resourceGroup().location
35+
sku: {
36+
name: 'Basic'
37+
family: 'C'
38+
capacity: 0
39+
}
40+
properties: {
41+
enableNonSslPort: false
42+
}
43+
}
44+
45+
3246
resource appInsights 'Microsoft.Insights/components@2020-02-02-preview' = {
3347
name: appInsightsName
3448
location: location

0 commit comments

Comments
 (0)