Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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: '<<namePrefix>>${serviceShort}001'
allowBlobPublicAccess: false
storageAccountAccessTier: 'Premium'
}
}
1 change: 1 addition & 0 deletions modules/Microsoft.Storage/storageAccounts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ param storageAccountKind string = 'StorageV2'
param storageAccountSku string = 'Standard_GRS'

@allowed([
'Premium'
'Hot'
'Cool'
])
Expand Down
59 changes: 56 additions & 3 deletions modules/Microsoft.Storage/storageAccounts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down Expand Up @@ -1011,7 +1011,60 @@ module storageAccounts './Microsoft.Storage/storageAccounts/deploy.bicep' = {
</details>
<p>

<h3>Example 4: Nfs</h3>
<h3>Example 4: Minprem</h3>

<details>

<summary>via Bicep module</summary>

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

</details>
<p>

<details>

<summary>via JSON Parameter file</summary>

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

</details>
<p>

<h3>Example 5: Nfs</h3>

<details>

Expand Down Expand Up @@ -1146,7 +1199,7 @@ module storageAccounts './Microsoft.Storage/storageAccounts/deploy.bicep' = {
</details>
<p>

<h3>Example 5: V1</h3>
<h3>Example 6: V1</h3>

<details>

Expand Down