[Modules] storage account module : conditional nfsv3 parameter#3122
Conversation
|
tested this |
|
@robbertwortell I've done initial investigations on this, and would like to add the following: I've created a small ARM template with the following: Template{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "String"
},
"storageAccountName": {
"type": "String"
},
"accountType": {
"type": "String"
},
"kind": {
"type": "String"
},
"accessTier": {
"type": "String"
},
"publicNetworkAccess": {
"type": "String"
},
"networkAclsBypass": {
"type": "String"
},
"networkAclsDefaultAction": {
"type": "String"
},
"isHnsEnabled": {
"type": "Bool"
},
"isNfsV3Enabled": {
"type": "Bool"
},
"isSftpEnabled": {
"type": "Bool"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2022-05-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"dependsOn": [],
"tags": {},
"sku": {
"name": "[parameters('accountType')]"
},
"kind": "[parameters('kind')]",
"properties": {
"accessTier": "[parameters('accessTier')]",
"publicNetworkAccess": "[parameters('publicNetworkAccess')]",
"networkAcls": {
"bypass": "[parameters('networkAclsBypass')]",
"defaultAction": "[parameters('networkAclsDefaultAction')]",
"ipRules": []
},
"isHnsEnabled": "[parameters('isHnsEnabled')]",
"isNfsV3Enabled": "[parameters('isNfsV3Enabled')]",
"isSftpEnabled": "[parameters('isSftpEnabled')]"
}
}
],
"outputs": {}
}Parameters{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "westeurope"
},
"storageAccountName": {
"value": "teststoragecarmls"
},
"accountType": {
"value": "Standard_LRS"
},
"kind": {
"value": "StorageV2"
},
"accessTier": {
"value": "Hot"
},
"publicNetworkAccess": {
"value": "Enabled"
},
"networkAclsBypass": {
"value": "AzureServices"
},
"networkAclsDefaultAction": {
"value": "Deny"
},
"isHnsEnabled": {
"value": true
},
"isNfsV3Enabled": {
"value": true
},
"isSftpEnabled": {
"value": false
}
}
}I can deploy this template over and over without issues, meaning that the Is there something in our module that may cause this issue? Can you please help share more context on the error you are getting please? |
ahmadabdalla
left a comment
There was a problem hiding this comment.
Added a comment in the PR
|
The issue seems to be with an existing storage account created without sending the NFSv3 parameter. so the path is : scenario 2: scenario 3:
so: |
|
OK now I see where this is happening and my updated testing criteria Test Scenariosv1I've used the same template above but with NO NFS properties, and then stored it as v1 template spec. v2Updated that template to include NFS properties like our CARML pattern to set it to false if left default, then stored it as v2 template spec. isHnsEnabled: enableHierarchicalNamespace ? enableHierarchicalNamespace : null
isSftpEnabled: enableSftp
isNfsV3Enabled: enableNfsV3v3Updated that template to now set the NFS properties as isHnsEnabled: enableHierarchicalNamespace ? enableHierarchicalNamespace : null
isSftpEnabled: enableSftp ? enableSftp : null
isNfsV3Enabled: enableNfsV3 ? enableNfsV3 : nullObservations:
{
"code": "AccountPropertyCannotBeUpdated",
"message": "The property 'isNfsV3Enabled' was specified in the input, but it cannot be updated as it is read-only. For more information, see - https://aka.ms/storageaccountupdate"
}
This indicates we do not need to perform the What are your thoughts here? |
|
@ahmadabdalla i assumed (wrongly) that your V3 didn't work as the original was added differently then all the others. |
|
@robbertwortell how did you go with the tests? |
|
@robbertwortell there are new breaking changes to the CARML CI and module folder structure that has recently been merged. Can you please sync from main and re-apply your changes please. If you'd like me to support you please let me know :) :) |
|
@ahmadabdalla i moved to a personal account |
Azure Storage account : Only the NFSv3 parameter when set to true as this can only be added during storage account creation
Pipeline references
Type of Change
Please delete options that are not relevant.
Checklist