Skip to content

fix: support NetApp multi-day snapshot schedules and volume LDAP - #7549

Open
Felipe Binotto (fbinotto) wants to merge 4 commits into
Azure:mainfrom
fbinotto:avm-res-net-app-net-app-account-7335
Open

Felipe Binotto (fbinotto) wants to merge 4 commits into
Azure:mainfrom
fbinotto:avm-res-net-app-net-app-account-7335

Conversation

@fbinotto

Copy link
Copy Markdown
Contributor

Description

Fixes #7335.

The NetApp snapshot-policy input restricted weeklySchedule.day to a single weekday even though the service supports comma-separated weekday names. Change the input to a string and document values such as 'Monday,Tuesday', retaining support for existing single-day inputs.

Also expose the missing ldapEnabled volume property requested in the issue discussion. The nullable boolean is forwarded through the capacity-pool volume input to the volume resource, preserving explicit false and leaving existing behavior unchanged when omitted.

  • Regenerated the parent and affected child ARM templates and READMEs with Set-AVMModule; added patch changelog entries without changing MAJOR or MINOR versions.
  • Extended the maximum-configuration deployment scenario with a multi-day weekly schedule and ldapEnabled: false.
  • Added eight regression tests covering single-day, multiple-day and all-week schedules, LDAP true/false/omitted inputs, and generated ARM contracts and forwarding.
  • Reused the independently committed CI-only CMK test fix from fix: Add Active Directory site support to NetApp account module AD configuration #7032: replace the sleep-only Azure deploymentScript with opt-in OIDC-authenticated runner-side dependency preparation and the same 15-second propagation wait. Preserve the full CMK deployment, shared subscription/location inputs and cleanup tracking for both phases; no Azure security controls are relaxed. The Active Directory site production changes from that PR are not included.
  • The CI-only prerequisite intentionally overlaps the still-open fix: Add Active Directory site support to NetApp account module AD configuration #7032; the issue-specific production fixes do not overlap that PR.
  • A live ldapEnabled: true integration requires an Active Directory environment and is not claimed by the deployment scenario.

Local validation:

  • Set-AVMModule -ModuleFolderPath $modulePath -SkipFileAndFolderSetup -SkipVersionCheck - passed for the account, snapshot-policy, capacity-pool and volume modules.
  • Invoke-Pester -Configuration $configuration with Run.Path = '.\avm\res\net-app\net-app-account\tests\unit\custom.tests.ps1' and repository-managed Pester 5.7.1 - 8 passed, 0 failed.
  • Invoke-Pester -Configuration $configuration with the repository module.tests.ps1 compliance container targeting those four module folders and tags Template, ARM, UDT, Readme, Changelog, Versioning, TestTemplate - 231 passed, 0 failed, 29 skipped, 62 outside the selected tags. Existing role-documentation and untyped-tag warnings remain.
  • bicep format $path --stdout compared with each of the five changed Bicep source files - all matched.
  • git diff --check - passed.
  • Invoke-Pester -Configuration $configuration across the dependency-preparation, CI-parameter, deployment-cleanup, deployment-retry, validation-retry and NetApp regression suites initially reported 1,327 passed and 57 failed. All failures were in the cleanup test harness, which needed to resolve the new optional action input. After adding that substitution, rerunning Invoke-Pester -Configuration $configuration for DeploymentCleanupWorkflow.Tests.ps1 passed all 313 tests with zero failures; the other five suites had already passed.
  • bicep build .\avm\res\net-app\net-app-account\tests\e2e\cmk-uami\main.test.bicep --stdout - passed after the CI preparation change.

Pipeline Reference

Pipeline
NetApp module validation - successful fork run for f4329fba0

Static validation, all required and optional PSRule jobs, and all five enabled deployment scenarios (defaults, max, nfs3, waf-aligned, cmk-uami) passed with deployment cleanup enabled. The pre-existing cmk-hsm-uami deployment exclusion remains unchanged. Existing documentation/UDT warnings mean the warning-free checklist item below remains unchecked despite the successful workflow.

Type of Change

  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
    • 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
  • Update to CI Environment or utilities (Non-module affecting changes)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • I have updated the module's CHANGELOG.md file with an entry for the next version

Allow comma-separated weekdays for weekly snapshot policies and expose nullable ldapEnabled through volume inputs. Add regression coverage and regenerate module artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7440d54c-504e-4b76-be4e-a68aea10e61e
Rename the compile-only input fixture so static validation does not mistake it for a publishable child module. Keep the regression test pointed at the renamed fixture.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7440d54c-504e-4b76-be4e-a68aea10e61e
Replace the sleep-only deployment script with opt-in runner-side dependency preparation while preserving the full CMK deployment and cleanup tracking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7440d54c-504e-4b76-be4e-a68aea10e61e
(cherry picked from commit 5e557f1)
Keep the existing cleanup integration harness aligned with the opt-in dependency preparation action input. All 313 cleanup tests pass; no deployment behavior changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7440d54c-504e-4b76-be4e-a68aea10e61e
@fbinotto
Felipe Binotto (fbinotto) requested a review from a team as a code owner October 19, 2026 00:36
@fbinotto Felipe Binotto (fbinotto) added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Oct 19, 2026
@azure-verified-modules
azure-verified-modules Bot requested a review from a team October 19, 2026 00:57
Comment on lines +26 to +27
@description('Optional. Prepare the dependencies without deploying the account so the CI runner can wait for role assignment propagation.')
param dependenciesOnly bool = false

@AlexanderSehr Alexander Sehr (AlexanderSehr) Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hola Felipe Binotto (@fbinotto),
while I appreciate the idea, CI updates should be handled independently of individual modules and tested across several instances.
In this case specifically I'm not sure I understand the need for it in the first place. Did you want to replace the logic because the 15 second timer was sometimes not enough? If so, I'd argue that using the retry operator for the actual deployment may go a long way as its retry time increases for every iteration.
I'd appreciate if we could avoid changing the CI unless absolutely necessary. In this case specifically a large amount of code is added that subsequently needs to be maintained in various locations.

cc: Erika Gressi (@eriqua) as the PR links to another one you set yourself as the reviewer for and has the same logic implemented. Feel free to share your thoughts if you want :)

removeDeployment: "${{ fromJson(inputs.workflowInput).removeDeployment }}"
customLocation: "${{ fromJson(inputs.workflowInput).customLocation }}"
e2eIgnore: "${{ fromJson(inputs.testCase).e2eIgnore }}"
dependencyPreparationParameter: "${{ inputs.modulePath == 'avm/res/net-app/net-app-account' && fromJson(inputs.testCase).name == 'cmk-uami' && 'dependenciesOnly' || '' }}"

@AlexanderSehr Alexander Sehr (AlexanderSehr) Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a very very module specific change for a file that is used by every single module deployment and should hence be as generic as possible.

Also please note that Jared Holgate (@jaredfholgate) is currently refactoring the CI on a larger scale.

@azure-verified-modules
azure-verified-modules Bot requested a review from a team November 21, 2026 22:56
@azure-verified-modules

Copy link
Copy Markdown
Contributor

E2E tests cannot run from a fork pull request because it cannot access upstream credentials. When this contribution is ready for E2E testing, an authorized Microsoft FTE must review the current PR head and follow the release-branch handoff process. A same-repository follow-up PR can then run the credentialed tests.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue label Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AVM Module Issue]: AVM NetApp Account Snapshot Policy Does Not Support Multiple Days in weeklySchedule.day

3 participants