Development edition · 16 November 2026. Commands using repository paths, Make targets or sample projects require access to the Quinzee source checkout. No public installer is available. Examples use disposable local environments.
5. Deploy your application's resources with Bicep
Bicep describes the resources your application needs. Microsoft's compiler turns it into an ARM JSON template; the deployment SDK sends that template to Quinzee. Resource creation and readiness can take time, so the example waits for the deployment to finish before reading its outputs.
Step 1: copy and compile the complete example
On the host, from the repository root:
cp test/application.bicep .local/book/application.bicep
python3 scripts/deps/bicep.py build .local/book/application.bicep \
--outfile .local/book/project/application.json
The helper downloads and verifies the repository's recorded official Bicep compiler if necessary. No Azure CLI login is needed. Edit your copy when experimenting, then compile it again.
The copied file is shown here in full. It creates the application's storage,
secret/configuration services, SQL/cache engines and monitoring resources.
stem normalizes the supplied prefix into service-compatible resource names.
@secure() protects the database input from deployment history; it is still a
secret in your private input file. Resource references create dependency order.
targetScope = 'resourceGroup'
@minLength(3)
@maxLength(24)
param prefix string
var stem = take(toLower(replace(prefix, '-', '')), 12)
param tenantId string
param location string = resourceGroup().location
resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: '${stem}store'
location: location
kind: 'StorageV2'
sku: { name: 'Standard_LRS' }
}
resource vault 'Microsoft.KeyVault/vaults@2023-07-01' = {
name: '${stem}-vault'
location: location
properties: {
tenantId: tenantId
sku: { family: 'A', name: 'standard' }
enableRbacAuthorization: true
accessPolicies: []
}
dependsOn: [storage]
}
resource configuration 'Microsoft.AppConfiguration/configurationStores@2024-05-01' = {
name: '${stem}-config'
location: location
sku: { name: 'standard' }
dependsOn: [vault]
}
resource container 'Microsoft.Storage/storageAccounts/blobServices/containers@2023-05-01' = {
name: '${storage.name}/default/documents'
properties: { publicAccess: 'None' }
}
resource queue 'Microsoft.Storage/storageAccounts/queueServices/queues@2023-05-01' = {
name: '${storage.name}/default/documents'
properties: { metadata: { application: 'quinzee-test' } }
}
output storageName string = storage.name
output queueEndpoint string = storage.properties.primaryEndpoints.queue
output blobEndpoint string = storage.properties.primaryEndpoints.blob
output vaultEndpoint string = vault.properties.vaultUri
output configurationEndpoint string = configuration.properties.endpoint
param administrator string = 'appadmin'
@secure()
param password string
resource postgres 'Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01' = {
name: '${stem}-postgres'
location: location
properties: {
administratorLogin: administrator
administratorLoginPassword: password
version: '18'
}
}
resource pgDatabase 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2024-08-01' = {
parent: postgres
name: 'application'
properties: {}
}
resource mysql 'Microsoft.DBforMySQL/flexibleServers@2023-12-30' = {
name: '${stem}-mysql'
location: location
properties: {
administratorLogin: administrator
administratorLoginPassword: password
version: '8.4'
}
}
resource myDatabase 'Microsoft.DBforMySQL/flexibleServers/databases@2023-12-30' = {
parent: mysql
name: 'application'
properties: {}
}
resource cache 'Microsoft.Cache/redisEnterprise@2025-04-01' = {
name: '${stem}-cache'
location: location
sku: { name: 'Balanced_B0' }
properties: { minimumTlsVersion: '1.2' }
}
resource cacheDatabase 'Microsoft.Cache/redisEnterprise/databases@2025-04-01' = {
parent: cache
name: 'default'
properties: {
clientProtocol: 'Encrypted'
clusteringPolicy: 'NoCluster'
evictionPolicy: 'NoEviction'
}
}
output postgresHost string = postgres.properties.fullyQualifiedDomainName
output mysqlHost string = mysql.properties.fullyQualifiedDomainName
output cacheHost string = cache.properties.hostName
resource workspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: '${stem}-logs'
location: location
properties: {
sku: { name: 'PerGB2018' }
retentionInDays: 30
}
}
resource insights 'Microsoft.Insights/components@2020-02-02' = {
name: '${stem}-insights'
location: location
kind: 'web'
properties: {
Application_Type: 'web'
WorkspaceResourceId: workspace.id
DisableLocalAuth: true
}
}
output workspaceId string = workspace.properties.customerId
output insightsResourceId string = insights.id
output insightsConnectionString string = insights.properties.ConnectionString
The later infrastructure workshop breaks this combined deployment into complete per-service lessons and explains the ARM JSON emitted by the compiler. Here the goal is to provision everything the C# application chapters will use.
Step 2: deploy with the Microsoft ARM SDK
Replace Program.cs with:
using Azure;
using Azure.Core;
using Azure.ResourceManager.Resources.Deployments;
using Azure.ResourceManager.Resources.Deployments.Models;
using System.Text.Json;
var book = BookContext.Load();
var group = book.Arm.GetResourceGroupResource(new ResourceIdentifier(book.GroupId));
var parameters = new Dictionary<string, object>
{
["prefix"] = new { value = book.Settings.Prefix },
["tenantId"] = new { value = book.Settings.TenantId },
["password"] = new { value = book.Settings.DatabasePassword }
};
var content = new ArmDeploymentContent(
new ArmDeploymentProperties(ArmDeploymentMode.Incremental)
{
Template = BinaryData.FromString(await File.ReadAllTextAsync("application.json")),
Parameters = BinaryData.FromObjectAsJson(parameters)
});
var deployment = (await ResourcesDeploymentsExtensions.GetArmDeployments(group)
.CreateOrUpdateAsync(WaitUntil.Completed, "book", content)).Value;
using var document = JsonDocument.Parse(deployment.Data.Properties.Outputs.ToString());
var outputs = document.RootElement.EnumerateObject().ToDictionary(
property => property.Name,
property => property.Value.GetProperty("value").GetString()!);
await File.WriteAllTextAsync("outputs.json", JsonSerializer.Serialize(outputs));
if (OperatingSystem.IsLinux())
File.SetUnixFileMode("outputs.json", UnixFileMode.UserRead | UnixFileMode.UserWrite);
Console.WriteLine($"Deployment ready; saved {outputs.Count} outputs.");
Run dotnet run --no-restore in the client container. Leave the application
environment terminal running: it operates the native-engine supervisor and the
certificate revocation service needed by database clients.
The result is outputs.json in the project directory. Subsequent chapters read
it instead of constructing service endpoints by hand. Treat it as local
configuration; do not publish telemetry connection strings unnecessarily.
The database password is not an output.
Step 3: inspect the result
In QHQ, connect to this application environment as described in
chapter 14. Open Resource Manager → Deployments, select your
subscription and group, and refresh. Inspect the book deployment's state,
outputs and per-resource operations. Use the individual service pages to inspect
the deployed resources; ARM also exposes inventory across providers.
A deployment can fail after some resources have succeeded. Fix the reported resource setting or unavailable engine supervisor, then rerun the same incremental deployment. It updates resources without intentionally deleting those omitted from the template. It does not promise transactional rollback.
Step 4: redeploy and understand deletion
Run the same program again. The existing Blob/SQL/Redis data should remain. Deletion of a completed deployment history entry leaves its resources in place. Deletion of the resource group removes resources and their data, including the labelled native database volumes. Cleanup is a separate exercise in chapter 15.
Supported deployments are resource-group, inline, incremental templates. Complete mode, linked/nested deployments, resource loops and arbitrary ARM expressions are not supported. Use the API versions in the supplied template; provider discovery reports the supported versions. An unsupported feature returns an error rather than pretending that it was applied.