Closed lakovmartin closed 7 months ago
Hi @lakovmartin, this is an issue with the Azure PowerShell module version 11.3.1. Please see the Known Issues Wiki which I just published with the context and workaround until the fix is released.
Please re-open if you have any additional questions, and apologies for any frustration from this issue.
Hi @oZakari . Thanks for the info. I have updated the task to use 11.5.0 which is latest however it's still importing 11.3.1 when the pipeline runs (Using Ubuntu Latest MS Agents in ADO):
Generating script. /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command . '/home/vsts/work/_temp/80c5845e-48bf-4b7b-b562-3b3e55473e64.ps1' File saved! Import-Module -Name /usr/share/az_11.3.1/Az.Accounts/2.17.0/Az.Accounts.psd1 -Global Clear-AzContext -Scope Process Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Hey @lakovmartin, I added the wrong key value pair for the Azure DevOps instructions in the Wiki, sorry! Will update, but use this task structure as just retested and it worked without issues:
- task: AzurePowerShell@5
displayName: "Logging and Sentinel Resource Group Deployment"
inputs:
azureSubscription: ${{ variables.SERVICE_CONNECTION_NAME }}
azurePowerShellVersion: OtherVersion
preferredAzurePowerShellVersion: 11.5.0
pwsh: true
ScriptType: "InlineScript"
Inline: |
.\pipeline-scripts\Deploy-ALZLoggingAndSentinelResourceGroup.ps1
It will see that 11.5.0 is missing when running the task and then install it to be used in the same task.
What happened? Provide a clear and concise description of the bug, including deployment details.
I am using the Bicep templates for a Landing Zone Deployment (latest version 0.17.2) with the provided pipelines for Azure DevOps. I am getting an error when the PowerShell script tries to execute a what if analysis on the logging and sentinel resource group deployment. I have not modified the template and using the default values for the locks.
It seems the issue is with the code on line 50 in the resourceGroup.bicep module file.
Please provide the correlation id associated with your error or bug.
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
What was the expected outcome?
No response
Relevant log output
Check previous GitHub issues
Code of Conduct