diff --git a/modules/Microsoft.Storage/storageAccounts/deploy.bicep b/modules/Microsoft.Storage/storageAccounts/deploy.bicep index c5983e0c6e..15ef20f9ab 100644 --- a/modules/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/modules/Microsoft.Storage/storageAccounts/deploy.bicep @@ -54,6 +54,12 @@ param largeFileSharesState string = 'Disabled' @description('Optional. Provides the identity based authentication settings for Azure Files.') param azureFilesIdentityBasedAuthentication object = {} +@description('Optional. A boolean flag which indicates whether the default authentication is OAuth or not.') +param defaultToOAuthAuthentication bool = false + +@description('Optional. Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.') +param allowSharedKeyAccess bool = true + @description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.') param privateEndpoints array = [] @@ -66,6 +72,23 @@ param networkAcls object = {} @description('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.') param requireInfrastructureEncryption bool = true +@description('Optional. Allow or disallow cross AAD tenant object replication.') +param allowCrossTenantReplication bool = true + +@description('Optional. Sets the custom domain name assigned to the storage account. Name is the CNAME source.') +param customDomainName string = '' + +@description('Optional. Indicates whether indirect CName validation is enabled. This should only be set on updates.') +param customDomainUseSubDomainName bool = false + +@description('Optional. Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.') +@allowed([ + '' + 'AzureDnsZone' + 'Standard' +]) +param dnsEndpointType string = '' + @description('Optional. Blob service and containers to deploy.') param blobServices object = {} @@ -98,6 +121,9 @@ param enableSftp bool = false @description('Optional. Local users to deploy for SFTP authentication.') param localUsers array = [] +@description('Optional. Enables local users feature, if set to true.') +param isLocalUserEnabled bool = false + @description('Optional. If true, enables NFS 3.0 support for the storage account. Requires enableHierarchicalNamespace to be true.') param enableNfsV3 bool = false @@ -132,6 +158,14 @@ param tags object = {} @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true +@description('Optional. Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.') +@allowed([ + '' + 'AAD' + 'PrivateLink' +]) +param allowedCopyScope string = '' + @description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set.') @allowed([ '' @@ -204,7 +238,7 @@ resource keyVault 'Microsoft.KeyVault/vaults@2021-06-01-preview' existing = if ( scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4]) } -resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { +resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { name: name location: location kind: storageAccountKind @@ -214,6 +248,16 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { identity: identity tags: tags properties: { + allowSharedKeyAccess: allowSharedKeyAccess + defaultToOAuthAuthentication: defaultToOAuthAuthentication + allowCrossTenantReplication: allowCrossTenantReplication + allowedCopyScope: !empty(allowedCopyScope) ? allowedCopyScope : null + customDomain: { + name: customDomainName + useSubDomainName: customDomainUseSubDomainName + } + dnsEndpointType: !empty(dnsEndpointType) ? dnsEndpointType : null + isLocalUserEnabled: isLocalUserEnabled encryption: { keySource: !empty(cMKKeyName) ? 'Microsoft.Keyvault' : 'Microsoft.Storage' services: { diff --git a/modules/Microsoft.Storage/storageAccounts/readme.md b/modules/Microsoft.Storage/storageAccounts/readme.md index a937696d38..05918834f8 100644 --- a/modules/Microsoft.Storage/storageAccounts/readme.md +++ b/modules/Microsoft.Storage/storageAccounts/readme.md @@ -20,7 +20,7 @@ This module is used to deploy a storage account, with the ability to deploy 1 or | `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) | | `Microsoft.Network/privateEndpoints` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints) | | `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints/privateDnsZoneGroups) | -| `Microsoft.Storage/storageAccounts` | [2021-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Storage/2021-09-01/storageAccounts) | +| `Microsoft.Storage/storageAccounts` | [2022-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts) | | `Microsoft.Storage/storageAccounts/blobServices` | [2021-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Storage/2021-09-01/storageAccounts/blobServices) | | `Microsoft.Storage/storageAccounts/blobServices/containers` | [2021-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Storage/2021-09-01/storageAccounts/blobServices/containers) | | `Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies` | [2021-09-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Storage/2021-09-01/storageAccounts/blobServices/containers/immutabilityPolicies) | @@ -54,10 +54,16 @@ This module is used to deploy a storage account, with the ability to deploy 1 or | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | | `allowBlobPublicAccess` | bool | `False` | | 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. | +| `allowCrossTenantReplication` | bool | `True` | | Allow or disallow cross AAD tenant object replication. | +| `allowedCopyScope` | string | `''` | `['', AAD, PrivateLink]` | Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. | +| `allowSharedKeyAccess` | bool | `True` | | Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. | | `azureFilesIdentityBasedAuthentication` | object | `{object}` | | Provides the identity based authentication settings for Azure Files. | | `blobServices` | _[blobServices](blobServices/readme.md)_ object | `{object}` | | Blob service and containers to deploy. | | `cMKKeyName` | string | `''` | | The name of the customer managed key to use for encryption. Cannot be deployed together with the parameter 'systemAssignedIdentity' enabled. | | `cMKKeyVersion` | string | `''` | | The version of the customer managed key to reference for encryption. If not provided, latest is used. | +| `customDomainName` | string | `''` | | Sets the custom domain name assigned to the storage account. Name is the CNAME source. | +| `customDomainUseSubDomainName` | bool | `False` | | Indicates whether indirect CName validation is enabled. This should only be set on updates. | +| `defaultToOAuthAuthentication` | bool | `False` | | A boolean flag which indicates whether the default authentication is OAuth or not. | | `diagnosticEventHubAuthorizationRuleId` | string | `''` | | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. | | `diagnosticEventHubName` | string | `''` | | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. | | `diagnosticLogsRetentionInDays` | int | `365` | | Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely. | @@ -65,10 +71,12 @@ This module is used to deploy a storage account, with the ability to deploy 1 or | `diagnosticSettingsName` | string | `[format('{0}-diagnosticSettings', parameters('name'))]` | | The name of the diagnostic setting, if deployed. | | `diagnosticStorageAccountId` | string | `''` | | Resource ID of the diagnostic storage account. | | `diagnosticWorkspaceId` | string | `''` | | Resource ID of the diagnostic log analytics workspace. | +| `dnsEndpointType` | string | `''` | `['', AzureDnsZone, Standard]` | Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. | | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via a Globally Unique Identifier (GUID). | | `enableNfsV3` | bool | `False` | | If true, enables NFS 3.0 support for the storage account. Requires enableHierarchicalNamespace to be true. | | `enableSftp` | bool | `False` | | If true, enables Secure File Transfer Protocol for the storage account. Requires enableHierarchicalNamespace to be true. | | `fileServices` | _[fileServices](fileServices/readme.md)_ object | `{object}` | | File service and shares to deploy. | +| `isLocalUserEnabled` | bool | `False` | | Enables local users feature, if set to true. | | `largeFileSharesState` | string | `'Disabled'` | `[Disabled, Enabled]` | Allow large file shares if sets to 'Enabled'. It cannot be disabled once it is enabled. Only supported on locally redundant and zone redundant file shares. It cannot be set on FileStorage storage accounts (storage accounts for premium file shares). | | `localUsers` | _[localUsers](localUsers/readme.md)_ array | `[]` | | Local users to deploy for SFTP authentication. | | `location` | string | `[resourceGroup().location]` | | Location for all resources. |