quinzee.cloud

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.

Developer’s guide

25. Provision storage, secrets and configuration

Run the infrastructure workshop first. Each file below is complete and deploys at resource-group scope. Use a separate deployment name for each lesson so its operation history is easy to find.

Give each kind of application data a home

A storage account supplies three different services. Put file content in Blob Storage, work notifications in Queue Storage and keyed records in Table Storage. The child service name is default; it is not your container, queue or table name.

Step 1: save the Bicep

The repository copy is examples/book-iac/storage.bicep. To experiment, save this complete sample to .local/book-iac/storage.bicep:

targetScope = 'resourceGroup'
param prefix string = 'booklab'
param location string = resourceGroup().location

resource account 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: '${prefix}store'
  location: location
  kind: 'StorageV2'
  sku: { name: 'Standard_LRS' }
}
resource blobs 'Microsoft.Storage/storageAccounts/blobServices@2023-05-01' = {
  parent: account
  name: 'default'
}
resource documents 'Microsoft.Storage/storageAccounts/blobServices/containers@2023-05-01' = {
  parent: blobs
  name: 'documents'
  properties: { publicAccess: 'None' }
}
resource queues 'Microsoft.Storage/storageAccounts/queueServices@2023-05-01' = {
  parent: account
  name: 'default'
}
resource jobs 'Microsoft.Storage/storageAccounts/queueServices/queues@2023-05-01' = {
  parent: queues
  name: 'jobs'
}
resource tables 'Microsoft.Storage/storageAccounts/tableServices@2023-05-01' = {
  parent: account
  name: 'default'
}
resource orders 'Microsoft.Storage/storageAccounts/tableServices/tables@2023-05-01' = {
  parent: tables
  name: 'Orders'
}
output blobEndpoint string = account.properties.primaryEndpoints.blob
output queueEndpoint string = account.properties.primaryEndpoints.queue
output tableEndpoint string = account.properties.primaryEndpoints.table

Step 2: inspect the ARM equivalent

The compiler emits these resource objects. The surrounding template also contains the parameters and outputs declared above. Expressions in square brackets are evaluated by the deployment engine, not by your shell.

[
  {
    "type": "Microsoft.Storage/storageAccounts",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}store', parameters('prefix'))]",
    "location": "[parameters('location')]",
    "kind": "StorageV2",
    "sku": {
      "name": "Standard_LRS"
    }
  },
  {
    "type": "Microsoft.Storage/storageAccounts/blobServices",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}', format('{0}store', parameters('prefix')), 'default')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts', format('{0}store', parameters('prefix')))]"
    ]
  },
  {
    "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}/{2}', format('{0}store', parameters('prefix')), 'default', 'documents')]",
    "properties": {
      "publicAccess": "None"
    },
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts/blobServices', format('{0}store', parameters('prefix')), 'default')]"
    ]
  },
  {
    "type": "Microsoft.Storage/storageAccounts/queueServices",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}', format('{0}store', parameters('prefix')), 'default')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts', format('{0}store', parameters('prefix')))]"
    ]
  },
  {
    "type": "Microsoft.Storage/storageAccounts/queueServices/queues",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}/{2}', format('{0}store', parameters('prefix')), 'default', 'jobs')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts/queueServices', format('{0}store', parameters('prefix')), 'default')]"
    ]
  },
  {
    "type": "Microsoft.Storage/storageAccounts/tableServices",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}', format('{0}store', parameters('prefix')), 'default')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts', format('{0}store', parameters('prefix')))]"
    ]
  },
  {
    "type": "Microsoft.Storage/storageAccounts/tableServices/tables",
    "apiVersion": "2023-05-01",
    "name": "[format('{0}/{1}/{2}', format('{0}store', parameters('prefix')), 'default', 'Orders')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts/tableServices', format('{0}store', parameters('prefix')), 'default')]"
    ]
  }
]

Step 3: compile, deploy and check

python3 scripts/deps/bicep.py build .local/book-iac/storage.bicep \
  --outfile .local/book-iac/storage.json

This file has defaults for every parameter. Run the deployment command from the workshop with --name storage, --template .local/book-iac/storage.json and a distinct outputs filename. Add --parameters when supplying inputs. Select the same deployment in QHQ and wait for Succeeded.

The documents container is private, jobs is an empty queue and Orders is an empty table. ARM creates their infrastructure; upload blobs, send messages and insert entities with the data-plane clients from the earlier chapters. Change a queue name and redeploy: the old queue remains until explicitly deleted.

Create a vault before storing a secret

Supply your local tenant ID in a parameters file. The vault is infrastructure; its secret values belong in the authenticated secret API after deployment. enableRbacAuthorization is accepted metadata in this local subset and does not implement Azure Key Vault data-plane RBAC.

Step 1: save the Bicep

The repository copy is examples/book-iac/key-vault.bicep. To experiment, save this complete sample to .local/book-iac/key-vault.bicep:

targetScope = 'resourceGroup'
param prefix string = 'booklab'
param location string = resourceGroup().location

param tenantId string
resource vault 'Microsoft.KeyVault/vaults@2023-07-01' = {
  name: '${prefix}-vault'
  location: location
  properties: {
    tenantId: tenantId
    sku: { family: 'A', name: 'standard' }
    enableRbacAuthorization: true
    accessPolicies: []
  }
}
output endpoint string = vault.properties.vaultUri

Step 2: inspect the ARM equivalent

The compiler emits these resource objects. The surrounding template also contains the parameters and outputs declared above. Expressions in square brackets are evaluated by the deployment engine, not by your shell.

[
  {
    "type": "Microsoft.KeyVault/vaults",
    "apiVersion": "2023-07-01",
    "name": "[format('{0}-vault', parameters('prefix'))]",
    "location": "[parameters('location')]",
    "properties": {
      "tenantId": "[parameters('tenantId')]",
      "sku": {
        "family": "A",
        "name": "standard"
      },
      "enableRbacAuthorization": true,
      "accessPolicies": []
    }
  }
]

Step 3: compile, deploy and check

python3 scripts/deps/bicep.py build .local/book-iac/key-vault.bicep \
  --outfile .local/book-iac/key-vault.json

Supply these required parameters: tenantId. Run the deployment command from the workshop with --name key-vault, --template .local/book-iac/key-vault.json and a distinct outputs filename. Add --parameters when supplying inputs. Select the same deployment in QHQ and wait for Succeeded.

QHQ should show the vault and its endpoint. Use the Key Vault chapter to store and retrieve a synthetic secret. Redeploy the same vault and confirm the secret version still exists. Never output a secret from your ARM template.

Separate deployable settings from source code

Create a named configuration store, then use the App Configuration client to write key-values and labels. Keep ordinary feature settings here and credentials in a secret store. The store declaration is separate from individual runtime key-values.

Step 1: save the Bicep

The repository copy is examples/book-iac/app-configuration.bicep. To experiment, save this complete sample to .local/book-iac/app-configuration.bicep:

targetScope = 'resourceGroup'
param prefix string = 'booklab'
param location string = resourceGroup().location

resource settings 'Microsoft.AppConfiguration/configurationStores@2024-05-01' = {
  name: '${prefix}-config'
  location: location
  sku: { name: 'standard' }
}
output endpoint string = settings.properties.endpoint

Step 2: inspect the ARM equivalent

The compiler emits these resource objects. The surrounding template also contains the parameters and outputs declared above. Expressions in square brackets are evaluated by the deployment engine, not by your shell.

[
  {
    "type": "Microsoft.AppConfiguration/configurationStores",
    "apiVersion": "2024-05-01",
    "name": "[format('{0}-config', parameters('prefix'))]",
    "location": "[parameters('location')]",
    "sku": {
      "name": "standard"
    }
  }
]

Step 3: compile, deploy and check

python3 scripts/deps/bicep.py build .local/book-iac/app-configuration.bicep \
  --outfile .local/book-iac/app-configuration.json

This file has defaults for every parameter. Run the deployment command from the workshop with --name app-configuration, --template .local/book-iac/app-configuration.json and a distinct outputs filename. Add --parameters when supplying inputs. Select the same deployment in QHQ and wait for Succeeded.

QHQ should show the store and endpoint. Write app:color=blue, redeploy, and read it again. The setting should survive because redeploying the store does not reset its data.