Skip to content

Commit

Permalink
Parameterized support for HTTPs (#1052)
Browse files Browse the repository at this point in the history
Added supportsHttpsTrafficOnly as an optional parameter, was hardcoded. This should be optional as when you are using NFS file shares, it cannot be enabled.
  • Loading branch information
Marius Storhaug authored Feb 28, 2022
1 parent fa7e4a7 commit 1e662cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion arm/Microsoft.Storage/storageAccounts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ param cuaId string = ''
@description('Generated. Do not provide a value! This date value is used to generate a SAS token to access the modules.')
param basetime string = utcNow('u')

@description('Optional. Allows https traffic only to storage service if sets to true.')
param supportsHttpsTrafficOnly bool = true

@description('Optional. The name of metrics that will be streamed.')
@allowed([
'Transaction'
Expand Down Expand Up @@ -164,7 +167,7 @@ var saBaseProperties = {
}
}
accessTier: (storageAccountKind == 'Storage') ? null : storageAccountAccessTier
supportsHttpsTrafficOnly: true
supportsHttpsTrafficOnly: supportsHttpsTrafficOnly
isHnsEnabled: ((!enableHierarchicalNamespace) ? null : enableHierarchicalNamespace)
minimumTlsVersion: minimumTlsVersion
networkAcls: (empty(networkAcls) ? null : networkAcls_var)
Expand Down
11 changes: 6 additions & 5 deletions arm/Microsoft.Storage/storageAccounts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ This module is used to deploy a storage account, with the ability to deploy 1 or
| Parameter Name | Type | Default Value | Possible Values | Description |
| :-- | :-- | :-- | :-- | :-- |
| `allowBlobPublicAccess` | bool | `False` | | Optional. Indicates whether public access is enabled for all blobs or containers in the storage account. For security reasons, it is recommended to set it to false. |
| `requireInfrastructureEncryption` | boolean | `True` | | Optional. 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. |
| `azureFilesIdentityBasedAuthentication` | object | `{object}` | | Optional. Provides the identity based authentication settings for Azure Files. |
| `basetime` | string | `[utcNow('u')]` | | Generated. Do not provide a value! This date value is used to generate a SAS token to access the modules. |
| `blobServices` | _[blobServices](blobServices/readme.md)_ object | `{object}` | | Optional. Blob service and containers to deploy |
Expand All @@ -38,22 +37,24 @@ This module is used to deploy a storage account, with the ability to deploy 1 or
| `diagnosticLogsRetentionInDays` | int | `365` | | Optional. Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely. |
| `diagnosticStorageAccountId` | string | | | Optional. Resource ID of the diagnostic storage account. |
| `diagnosticWorkspaceId` | string | | | Optional. Resource ID of the diagnostic log analytics workspace. |
| `enableHierarchicalNamespace` | bool | | | Optional. If true, enables Hierarchical Namespace for the storage account |
| `enableHierarchicalNamespace` | bool | `False` | | Optional. If true, enables Hierarchical Namespace for the storage account |
| `fileServices` | _[fileServices](fileServices/readme.md)_ object | `{object}` | | Optional. File service and shares to deploy |
| `location` | string | `[resourceGroup().location]` | | Optional. Location for all resources. |
| `lock` | string | `NotSpecified` | `[CanNotDelete, NotSpecified, ReadOnly]` | Optional. Specify the type of lock. |
| `managementPolicyRules` | array | `[]` | | Optional. The Storage Account ManagementPolicies Rules. |
| `metricsToEnable` | array | `[Transaction]` | `[Transaction]` | Optional. The name of metrics that will be streamed. |
| `minimumTlsVersion` | string | `TLS1_2` | `[TLS1_0, TLS1_1, TLS1_2]` | Optional. Set the minimum TLS version on request to storage. |
| `name` | string | | | Optional. Name of the Storage Account. |
| `networkAcls` | object | `{object}` | | Optional. Networks ACLs, this value contains IPs to whitelist and/or Subnet information. |
| `privateEndpoints` | array | `[]` | | Optional. Configuration Details for private endpoints. |
| `networkAcls` | object | `{object}` | | Optional. Networks ACLs, this value contains IPs to whitelist and/or Subnet information. For security reasons, it is recommended to set the DefaultAction Deny |
| `privateEndpoints` | array | `[]` | | Optional. Configuration Details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible |
| `queueServices` | _[queueServices](queueServices/readme.md)_ object | `{object}` | | Optional. Queue service and queues to create. |
| `requireInfrastructureEncryption` | bool | `True` | | Optional. 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 | `[]` | | Optional. 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` | `[Hot, Cool]` | Optional. Storage Account Access Tier. |
| `storageAccountKind` | string | `StorageV2` | `[Storage, StorageV2, BlobStorage, FileStorage, BlockBlobStorage]` | Optional. Type of Storage Account to create. |
| `storageAccountSku` | string | `Standard_GRS` | `[Standard_LRS, Standard_GRS, Standard_RAGRS, Standard_ZRS, Premium_LRS, Premium_ZRS, Standard_GZRS, Standard_RAGZRS]` | Optional. Storage Account Sku Name. |
| `systemAssignedIdentity` | bool | | | Optional. Enables system assigned managed identity on the resource. |
| `supportsHttpsTrafficOnly` | bool | `True` | | Optional. Allows https traffic only to storage service if sets to true. |
| `systemAssignedIdentity` | bool | `False` | | Optional. Enables system assigned managed identity on the resource. |
| `tableServices` | _[tableServices](tableServices/readme.md)_ object | `{object}` | | Optional. Table service and tables to create. |
| `tags` | object | `{object}` | | Optional. Tags of the resource. |
| `userAssignedIdentities` | object | `{object}` | | Optional. The ID(s) to assign to the resource. |
Expand Down

0 comments on commit 1e662cf

Please # to comment.