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

Update storage acct creation to include storageInfrastructureEncyption property #2159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

janmallo
Copy link

@janmallo janmallo commented Nov 18, 2024

Purpose

Update storage acct creation to include storageInfrastructureEncyption property

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[x] No

Does this require changes to learn.microsoft.com docs?

This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.

[ ] Yes
[x] No

Type of change

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

  • The current tests all pass (python -m pytest).
  • I added tests that prove my fix is effective or that my feature works
  • I ran python -m pytest --cov to verify 100% coverage of added lines
  • I ran python -m mypy to check for type errors
  • I either used the pre-commit hooks or ran ruff and black manually on my code.

Copy link
Collaborator

@pamelafox pamelafox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonybaloney Could you review this one, since you've been working on porting this module to AVM? It looks like this does match the parameter for the avm module, which defaults to true?
https://github.com/Azure/bicep-registry-modules/blob/main/avm/res/storage/storage-account/main.bicep#L78C7-L78C38

@pamelafox
Copy link
Collaborator

@janmallo Could you agree to the CLA? See comment from bot above.

@cforce
Copy link
Contributor

cforce commented Jan 13, 2025

Please use
"resource storage 'Microsoft.Storage/storageAccounts@2023-01-01'"
instead of
"resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {"

@janmallo janmallo closed this Jan 14, 2025
@janmallo janmallo reopened this Jan 14, 2025
@janmallo
Copy link
Author

@microsoft-github-policy-service agree


var networkAcls = (publicNetworkAccess == 'Enabled') ? {
bypass: bypass
defaultAction: 'Allow'
} : { defaultAction: 'Deny' }

resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {
var encryption = (storageInfrastructureEncryption == 'Enabled') ? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's going to be mapped to this object anyway, would it be better to make it a boolean?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just looked up the avm module, which we'll eventually move to, and it uses a boolean:
https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/storage/storage-account#parameter-requireinfrastructureencryption

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants