Storage Account with SSE and blob deletion retention policy

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Bicep Version

Deploy To Azure Deploy To Azure US Gov Visualize

This template creates an Azure Storage account with Storage Service Encryption and a blob deletion retention policy.

Usage

Example 1 - Storage account with encryption enabled

param deploymentName string = 'storage${utcNow()}'

module storage './main.bicep' = {
  name: deploymentName
  params: {
    storageAccountName: 'mystorageaccount'
    storageSku: 'Standard_LRS'
    storageKind: 'StorageV2'
    storageTier: 'Hot'
    deleteRetentionPolicy: 7
  }
}

Example 2 - Storage account without encryption enabled

param deploymentName string = 'storage${utcNow()}'

module storage './main.bicep' = {
  name: deploymentName
  params: {
    storageAccountName: 'mystorageaccount'
    storageSku: 'Standard_LRS'
    storageKind: 'StorageV2'
    storageTier: 'Hot'
    deleteRetentionPolicy: 7
    blobEncryptionEnabled: false
  }
}

Tags: bicep, storage, blob, Microsoft.Storage/storageAccounts, Microsoft.Storage/storageAccounts/blobServices