Azure / Azure/bicep-types-az

Microsoft.Storage/storageAccounts: Read-Only property set in the documentation

Open
#2,017 1 comment 0 reactions 0 assignees View on GitHub
inaccuracy Service Attention Storage
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

### Resource Type

Microsoft.Storage/storageAccounts

### Api Version

2023-01-01

### Issue Type

Property(s) inaccurately marked read-only/write-only

### Other Notes

I'm currently following the `Advanced Bicep` learning path, and in the `Extend Bicep and ARM templates using deployment scripts` module unit 3 (Exercise - Add a deployment script to an ARM template), when using `Bicep + CLI`, there's a little error on the template.
I'm not quite sure if it will block the deployment or not, but the VSCode extension spits out the following error:
`The property "tier" is read-only. Expressions cannot be assigned to read-only properties.`

I was working with the example template given at step 4 of the exercise here: [Exercise - Add Deployment Scripts](https://learn.microsoft.com/en-us/training/modules/extend-resource-manager-template-deployment-scripts/3-exercise-add-deployment-script?pivots=bicepcli)

### Bicep Repro

```bicep
var storageAccountName = 'storage${uniqueString(resourceGroup().id)}'
var storageBlobContainerName = 'config'

param location string = resourceGroup().location

resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: storageAccountName
tags: {
displayName: storageAccountName
}
location: location
kind: 'StorageV2'
sku: {
name: 'Standard_LRS'
tier: 'Standard'
}
properties: {
encryption: {
services: {
blob:{
enabled: true
}
}
keySource: 'Microsoft.Storage'
}
supportsHttpsTrafficOnly: true
}

resource blobService 'blobServices' existing = {
name: 'default'
}
}

```

### Confirm

- [X] I have read the troubleshooting guide and looked for duplicates.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the VS Code diagnostic with the Bicep template from the linked deployment-scripts exercise, focusing on Microsoft.Storage/storageAccounts@2023-01-01 and sku.tier. Locate the corresponding resource type definition in this repository and correct its read-only metadata, then verify that the diagnostic no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.