Skip to content

Latest commit

 

History

History

storage-blob-encryption-and-retention

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
description page_type products urlFragment languages
This template creates a Storage Account with Storage Service Encryption and a blob deletion retention policy
sample
azure
azure-resource-manager
storage-blob-encryption-and-retention
json
bicep

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