diff --git a/modules/Microsoft.Storage/storageAccounts/.test/minPrem/deploy.test.bicep b/modules/Microsoft.Storage/storageAccounts/.test/minPrem/deploy.test.bicep new file mode 100644 index 0000000000..21fd731fb1 --- /dev/null +++ b/modules/Microsoft.Storage/storageAccounts/.test/minPrem/deploy.test.bicep @@ -0,0 +1,44 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.storage.storageaccounts-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'ssaminprem' + +@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') +param enableDefaultTelemetry bool = true + +// ============ // +// Dependencies // +// ============ // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + params: { + enableDefaultTelemetry: enableDefaultTelemetry + name: '<>${serviceShort}001' + allowBlobPublicAccess: false + storageAccountAccessTier: 'Premium' + } +} diff --git a/modules/Microsoft.Storage/storageAccounts/deploy.bicep b/modules/Microsoft.Storage/storageAccounts/deploy.bicep index 15ef20f9ab..9a05b78792 100644 --- a/modules/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/modules/Microsoft.Storage/storageAccounts/deploy.bicep @@ -38,6 +38,7 @@ param storageAccountKind string = 'StorageV2' param storageAccountSku string = 'Standard_GRS' @allowed([ + 'Premium' 'Hot' 'Cool' ]) diff --git a/modules/Microsoft.Storage/storageAccounts/readme.md b/modules/Microsoft.Storage/storageAccounts/readme.md index 05918834f8..3dffb13ea2 100644 --- a/modules/Microsoft.Storage/storageAccounts/readme.md +++ b/modules/Microsoft.Storage/storageAccounts/readme.md @@ -89,7 +89,7 @@ This module is used to deploy a storage account, with the ability to deploy 1 or | `queueServices` | _[queueServices](queueServices/readme.md)_ object | `{object}` | | Queue service and queues to create. | | `requireInfrastructureEncryption` | bool | `True` | | A Boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. For security reasons, it is recommended to set it to true. | | `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| `storageAccountAccessTier` | string | `'Hot'` | `[Cool, Hot]` | Storage Account Access Tier. | +| `storageAccountAccessTier` | string | `'Hot'` | `[Cool, Hot, Premium]` | Storage Account Access Tier. | | `storageAccountKind` | string | `'StorageV2'` | `[BlobStorage, BlockBlobStorage, FileStorage, Storage, StorageV2]` | Type of Storage Account to create. | | `storageAccountSku` | string | `'Standard_GRS'` | `[Premium_LRS, Premium_ZRS, Standard_GRS, Standard_GZRS, Standard_LRS, Standard_RAGRS, Standard_RAGZRS, Standard_ZRS]` | Storage Account Sku Name. | | `supportsHttpsTrafficOnly` | bool | `True` | | Allows HTTPS traffic only to storage service if sets to true. | @@ -1011,7 +1011,60 @@ module storageAccounts './Microsoft.Storage/storageAccounts/deploy.bicep' = {

-

Example 4: Nfs

+

Example 4: Minprem

+ +
+ +via Bicep module + +```bicep +module storageAccounts './Microsoft.Storage/storageAccounts/deploy.bicep' = { + name: '${uniqueString(deployment().name, location)}-test-ssaminprem' + params: { + // Required parameters + name: '<>ssaminprem001' + // Non-required parameters + allowBlobPublicAccess: false + enableDefaultTelemetry: '' + storageAccountAccessTier: 'Premium' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "name": { + "value": "<>ssaminprem001" + }, + // Non-required parameters + "allowBlobPublicAccess": { + "value": false + }, + "enableDefaultTelemetry": { + "value": "" + }, + "storageAccountAccessTier": { + "value": "Premium" + } + } +} +``` + +
+

+ +

Example 5: Nfs

@@ -1146,7 +1199,7 @@ module storageAccounts './Microsoft.Storage/storageAccounts/deploy.bicep' = {

-

Example 5: V1

+

Example 6: V1