Closed SomilGanguly closed 1 year ago
The validation on create and update should be the same. Can you share ARM Template code for the initial create and a template with the removed properties that deploys successfully on update?
Sure Alex, I have attached the ARM template and Bicep Template (below for your reference) which I am using for the incremental deployment for updating the storage account. If you see in the ARM template I have no properties for "sku" and "kind" and it updates successfully as per expectation (mentioned in MS docs as well - https://docs.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts?tabs=bicep#sku). But while doing the same with Bicep it fails and it is expecting "sku" and "kind" as mandatory properties for incremental deployments.
StorageAccount_ARMTemplate.json.txt StorageAccount_Bicep.bicep.txt
I see. Can you share some more details about the scenario? What is the workflow that requires a partial update like this? Why not include sku and kind to have a complete definition for either create or update?
Hi SomilGanguly, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! :smile: :mechanical_arm:
Bicep version 0.4.1272
Describe the bug
For incremental deployments (updates) of storage account "sku" and "kind" are supposed to be optional (that is the behavior in ARM templates). But in bicep, for incremental deployments it scopes "sku" and "kind" as mandatory. This creates a gap in the existing behavior of ARM and Bicep.
To Reproduce
For an existing Storage account try doing an incremental deployment without "sku" and "kind" properties. It would fail with bicep where as it would successfully deploy with an ARM template.
Additional context