Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storgae Account invalid Module #1888

Closed
1 task done
gsuttie opened this issue May 8, 2024 · 11 comments
Closed
1 task done

Storgae Account invalid Module #1888

gsuttie opened this issue May 8, 2024 · 11 comments
Assignees
Labels
Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Bug 🐛 Something isn't working

Comments

@gsuttie
Copy link

gsuttie commented May 8, 2024

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Bug

Module Name

avm/res/storage/storage-account

(Optional) Module Version

latest

Description

This setting appears as invalid out of the box

@description('Required. Networks ACLs, this value contains IPs to whitelist and/or Subnet information. If in use, bypass needs to be supplied. For security reasons, it is recommended to set the DefaultAction Deny.')
param networkAcls networkAclsType = {
bypass: 'AzureServices'
defaultAction: 'Deny'
}

(Optional) Correlation Id

No response

@gsuttie gsuttie added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue labels May 8, 2024

Important

The "Needs: Triage 🔍" label must be removed once the triage process is complete!

Tip

For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

Note

This label was added as per ITA06.

Note

The "Type: Bug 🐛" label was added as per ITA21.

@AlexanderSehr
Copy link
Contributor

AlexanderSehr commented May 8, 2024

Hey @gsuttie,
thanks for opening the issue and you're correct. There is already a Pull Request on the way (#1508) that I just linked to this issue.

@AlexanderSehr AlexanderSehr removed the Needs: Triage 🔍 Maintainers need to triage still label May 8, 2024
@gsuttie
Copy link
Author

gsuttie commented May 10, 2024

What do I need to do to be able to grab this fix in the mean time?

@AlexanderSehr
Copy link
Contributor

Hey @gsuttie,
that's not an easy question to answer. Uou could temporarily overwrite the default of the parameter which you said is invalid by default. Question is if you want to enable the Firewall, or disable it. If I'm not mistaken, if you set the default action to allow the Firewall is actually disabled.
Alternativly, you can always grab a local copy of the module and e.g. implement the fix as suggested here. But that's naturally not exactly a nice experience.

@gsuttie
Copy link
Author

gsuttie commented May 11, 2024

Will give that a go thank you

@AlexanderSehr
Copy link
Contributor

Let me know how it's going. As per my linked suggestion this should work. I tested the behavior before commenting on the PR. Fingers crossed - and sorry for the inconvenience :-/

@Agazoth
Copy link
Contributor

Agazoth commented May 13, 2024

Running the main pipeline without any changes (from the Azure source) produces this error:
image

Removing the custom test takes it away - obviously. It seems like PSRule has some sort of issue with the array of possilbe resources, judging by the System.String[] info - or it mighjt just not be a joined array in the log. I tried doing the complete string for Sku.name (Standard_ZRS and Standard_GRS) because there might be an issue finding an element in an array, if only part of the element was used, but that also complains.

The custom rule seems to be specific for the storage account module - after all there should not be other modules testing storage account specific rules.

@AlexanderSehr
Copy link
Contributor

Running the main pipeline without any changes (from the Azure source) produces this error: image

Removing the custom test takes it away - obviously. It seems like PSRule has some sort of issue with the array of possilbe resources, judging by the System.String[] info - or it mighjt just not be a joined array in the log. I tried doing the complete string for Sku.name (Standard_ZRS and Standard_GRS) because there might be an issue finding an element in an array, if only part of the element was used, but that also complains.

The custom rule seems to be specific for the storage account module - after all there should not be other modules testing storage account specific rules.

Ideally @fblix should resolve the issue in the linked PR #1508 . Reached out to him on the side and he should implement the fix shortly

@Agazoth
Copy link
Contributor

Agazoth commented May 14, 2024

Updating the sku name in the custom rule fixed the issue:
image

@ChrisSidebotham
Copy link
Contributor

Closing this issue as completed in #1987 (Missing from Closes List)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Bug 🐛 Something isn't working
Projects
None yet
5 participants