BlockBlob Storage Bicep Code:
@minLength(3)
@maxLength(24)
param storageAccName string = uniqueString(resourceGroup().id)
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: storageAccName
location: resourceGroup().location
sku: {
name: 'Premium_LRS'
}
kind: 'BlockBlobStorage'
}
PowerShell Code:
PS C:\Windows\System32> New-AzResourceGroupDeployment -Name 'BlockBlobStorageDeployment' -TemplateFile 'D:\LearnBicep\uniquestringdemo.bicep' -ResourceGroupName 'vivekchak-rg' -Mode Incremental
New-AzResourceGroupDeployment
: 5:01:43 PM - The deployment 'BlockBlobStorageDeployment' failed with error(s). Showing 1 out of 1 error(s).
Status Message: Values for request parameters are invalid: kind, sku. For more information, see - https://aka.ms/storageaccounttypes (Code:InvalidValuesForRequestParameters)
CorrelationId:
DeploymentName : BlockBlobStorageDeployment
ResourceGroupName : vivekchak-rg
ProvisioningState : Failed
Timestamp : 12/29/2024 11:31:39 AM
Mode : Incremental
TemplateLink :
Parameters :
Name Type Value
================ ========================= ==========
storageAccName String "rr5rrwknkv5nc"
Outputs :
DeploymentDebugLogLevel :
While deploying the BlockBlobStorage
also, I'm getting the above error here.
Where the issue is happening on?
The deployment 'BlockBlobStorageDeployment' failed with error(s) while using Premium_LRS for BlockBlobStorage
Issue seems to with the use of Premium_LRS
with the BlockBlobStorage
kind which is not supportive.
Here for the mentioned kind the supportive sku is Premium_ZRS
for BlockBlobStorage
.
Sample bicep:
@minLength(3)
@maxLength(24)
param storageAccName string = uniqueString(resourceGroup().id)
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: storageAccName
location: resourceGroup().location
sku: {
name: 'Premium_ZRS'
}
kind: 'BlockBlobStorage'
}
Deployement:
New-AzResourceGroupDeployment -Name 'BlockBlobStorageDeployment' -TemplateFile '/home/main.bicep' -ResourceGroupName 'vinay-rg' -Mode Incremental
Refer: