Skip to content

Commit

Permalink
fix: isHnsEnabled - avm/res/storage/storage-account (#3317)
Browse files Browse the repository at this point in the history
## Description

Fix Cannot redeploy if EnableHierargicalNamespace is false
Fixes #1522 


## Pipeline Reference



| Pipeline |
| -------- |
|
[![avm.res.storage.storage-account](https://github.com/Agazoth/bicep-registry-modules/actions/workflows/avm.res.storage.storage-account.yml/badge.svg?branch=Agazoth%2FFixRedeployWithisHnsEnabled)](https://github.com/Agazoth/bicep-registry-modules/actions/workflows/avm.res.storage.storage-account.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [x] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
Agazoth authored Oct 3, 2024
1 parent e549f47 commit bea4f7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion avm/res/storage/storage-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
}
: null
supportsHttpsTrafficOnly: supportsHttpsTrafficOnly
isHnsEnabled: enableHierarchicalNamespace ? enableHierarchicalNamespace : null
isHnsEnabled: enableHierarchicalNamespace
isSftpEnabled: enableSftp
isNfsV3Enabled: enableNfsV3 ? enableNfsV3 : any('')
largeFileSharesState: (skuName == 'Standard_LRS') || (skuName == 'Standard_ZRS') ? largeFileSharesState : null
Expand Down
2 changes: 1 addition & 1 deletion avm/res/storage/storage-account/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
"accessTier": "[if(and(not(equals(parameters('kind'), 'Storage')), not(equals(parameters('kind'), 'BlockBlobStorage'))), parameters('accessTier'), null())]",
"sasPolicy": "[if(not(empty(parameters('sasExpirationPeriod'))), createObject('expirationAction', 'Log', 'sasExpirationPeriod', parameters('sasExpirationPeriod')), null())]",
"supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]",
"isHnsEnabled": "[if(parameters('enableHierarchicalNamespace'), parameters('enableHierarchicalNamespace'), null())]",
"isHnsEnabled": "[parameters('enableHierarchicalNamespace')]",
"isSftpEnabled": "[parameters('enableSftp')]",
"isNfsV3Enabled": "[if(parameters('enableNfsV3'), parameters('enableNfsV3'), '')]",
"largeFileSharesState": "[if(or(equals(parameters('skuName'), 'Standard_LRS'), equals(parameters('skuName'), 'Standard_ZRS')), parameters('largeFileSharesState'), null())]",
Expand Down

0 comments on commit bea4f7e

Please sign in to comment.