Skip to content

Add Redis Cache resource to Bicep template #15

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 1 commit into from
Oct 30, 2024
Merged
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
30 changes: 18 additions & 12 deletions src/InfrastructureAsCode/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,25 @@ var registryName = '${uniqueString(resourceGroup().id)}mpnpreg'
var registrySku = 'Standard'
var imageName = 'techexcel/dotnetcoreapp'
var startupCommand = ''
var redisCacheName = '${uniqueString(resourceGroup().id)}-mpnp-redis'
var redisCacheSku = 'Basic'

resource redisCache 'Microsoft.Cache/Redis@2023-08-01' = {
name: redisCacheName
location: location
properties: {
sku: {
name: redisCacheSku
family: 'C'
capacity: 0
}
enableNonSslPort: false
minimumTlsVersion: '1.2'
redisConfiguration: {
'maxmemory-policy': 'volatile-lru'
}
}
}

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
name: logAnalyticsName
Expand All @@ -29,18 +47,6 @@ 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' = {
Expand Down