Azure / CanadaPubSecALZ

This reference implementation is based on Cloud Adoption Framework for Azure and provides an opinionated implementation that enables ITSG-33 regulatory compliance by using NIST SP 800-53 Rev. 4 and Canada Federal PBMM Regulatory Compliance Policy Sets.
MIT License
121 stars 87 forks source link

Removed "#Requires -Modules" from the PS scripts #393

Closed aporodnov closed 8 months ago

aporodnov commented 8 months ago

Overview/Summary

The PowerShell scripts fail when trying to execute "#Requires" line in RunWorkflows.ps1 and EnvironmentContext.ps1 after the recent Az module update.

Additionally #Requires statement exists in other onboarding scripts like: scripts/configuration/Get-AlzConfiguration.ps1 scripts/configuration/New-AlzCredential.ps1 scripts/configuration/Remove-AlzCredential.ps1 scripts/configuration/New-AlzDeployment.ps1 scripts/configuration/New-AlzConfiguration.ps1 scripts/configuration/Test-AlzCredential.ps1

This change simply removes the statement from the scripts, since prerequisites are already installed for the script execution.

This PR fixes/adds/changes/removes

  1. Fixed #392

Breaking Changes

  1. N/A

Testing Evidence

Please provide any testing evidence to show that your Pull Request works/fixes as described and planned (include screenshots, if appropriate).

I tested the GitHub Actions after the #Requires statement removal in my own environment and GitHub actions were able to successfully execute the PowerShell scripts (tested with the "Management Groups" pipeline).

As part of this Pull Request I have