Skip to content

Instantly share code, notes, and snippets.

View andrewmatveychuk's full-sized avatar
☁️

Andrew Matveychuk andrewmatveychuk

☁️
View GitHub Profile
@andrewmatveychuk
andrewmatveychuk / variables.bicep
Last active May 14, 2026 18:10
Bicep snippet for configuring Container App variables
// ...
var containerVariables = [
// ...
{
name: 'database__client'
value: 'mysql'
}
@andrewmatveychuk
andrewmatveychuk / privateLinkFrontDoor.bicep
Created May 14, 2026 18:05
Bicep snippet for configuring Private Link from Azure Front Door
resource frontDoorOrigin 'Microsoft.Cdn/profiles/originGroups/origins@2025-09-01-preview' = {
name: frontDoorOriginName
parent: frontDoorOriginGroup
properties: {
hostName: frontDoorOriginHostName
httpPort: 80
httpsPort: 443
originHostHeader: frontDoorOriginHostName
priority: 1
weight: 1000
@andrewmatveychuk
andrewmatveychuk / containerSecrets.bicep
Created May 14, 2026 17:51
Bicep snippet for configuring Container App secrets
// ...
containerSecrets: [
{
name: 'database-password' // This should be lower case alphanumeric characters, '-', and must start and end with an alphanumeric character
keyVaultUrl: keyVault.outputs.secretUri // Your secret URI
identity: managedIdentity.outputs.id // The identity to use to access the secret
}
]
@andrewmatveychuk
andrewmatveychuk / contanerAppVolumeConfig.bicep
Created May 14, 2026 17:47
Bicep snippet for configuring Container App volumes and mounts
// ...
containerVolumes: [
{
name: ghostContentFileShareName // A folder name in your file share to use
storageName: containerAppEnvironmentStorageName
storageType: 'nfsAzureFile' // This must be the same type as the Azure File share you are connecting to
}
]
containerVolumeMounts: [
@andrewmatveychuk
andrewmatveychuk / containerProbes,bicep
Created May 14, 2026 17:41
Sample container probes in a Container App
var containerProbes = [
{
type: 'Liveness'
httpGet: { // There are different types of probes with different configuration parameters
path: '/'
port: containerPort
}
initialDelaySeconds: 10
periodSeconds: 5
}
@andrewmatveychuk
andrewmatveychuk / containerApp.bicep
Created May 14, 2026 17:38
Sample Container App template
resource containerApp 'Microsoft.App/containerApps@2026-01-01' = {
name: containerAppName
location: location
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${managedIdentityId}': {}
}
}
properties: {
@andrewmatveychuk
andrewmatveychuk / containerEnvironmentStorage.bicep
Created May 14, 2026 17:31
Configuring Azure File shares as external storage for Container App Environments
resource environmentStorage 'Microsoft.App/managedEnvironments/storages@2026-01-01' = {
parent: containerEnvironment
name: containerAppEnvironmentStorageName
properties: {
// SMB file share as an example
/* azureFile: {
accessMode: 'ReadWrite'
accountName: storageAccountName
accountKey: existingStorageAccount.listKeys().keys[0].value
@andrewmatveychuk
andrewmatveychuk / containerAppEnvironment.bicep
Created May 14, 2026 17:26
Container App Environment template
resource containerEnvironment 'Microsoft.App/managedEnvironments@2026-01-01' = {
name: containerAppEnvironmentName
location: location
properties: {
appLogsConfiguration: {
destination: 'log-analytics'
logAnalyticsConfiguration: {
customerId: existingWorkspace.properties.customerId
sharedKey: existingWorkspace.listKeys().primarySharedKey
}
@andrewmatveychuk
andrewmatveychuk / wordpress-basic.bicep
Created June 25, 2025 15:06
A basic WordPress application definition on Radius platform
extension radius
extension radiusResources
@description('The Radius Application ID. Injected automatically by the rad CLI.')
param application string
@description('The env ID of your Radius Environment. Set automatically by the rad CLI.')
param environment string
@description('Tag to pull for the WordPress container image.')
@andrewmatveychuk
andrewmatveychuk / mysql.bicep
Created June 25, 2025 15:04
A sample Radius recipe to provision a MySQL database as a container
@description('Information about what resource is calling this Recipe. Generated by Radius.')
param context object
@description('MySQL database name')
param database string = context.application.name
@description('MySQL username')
param user string = '${context.application.name}-user'
@description('MySQL password')