Skip to content

Redis cache #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/Iac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Azure Bicep

on:
workflow_dispatch

env:
targetEnv: dev

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
# Checkout code
- uses: actions/checkout@main

# Log into Azure
- uses: azure/[email protected]
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true

# Deploy ARM template
- name: Run ARM deploy
uses: azure/arm-deploy@v1
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./src/InfrastructureAsCode/main.bicep
parameters: environment=${{ env.targetEnv }}
7 changes: 1 addition & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
name: .NET

on:
push:
branches: [ "main" ]
paths: src/Application/**
pull_request:
branches: [ "main" ]
paths: src/Application/**


workflow_dispatch:
jobs:
Expand Down
14 changes: 14 additions & 0 deletions src/InfrastructureAsCode/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12
}
}

resource redisCache 'Microsoft.Cache/Redis@2020-06-01' = {
name: 'myRedisCachefw' // Replace with your Redis cache name
location: resourceGroup().location
sku: {
name: 'Basic'
family: 'C'
capacity: 0
}
properties: {
enableNonSslPort: false
}
}


resource appInsights 'Microsoft.Insights/components@2020-02-02-preview' = {
name: appInsightsName
location: location
Expand Down