-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[BUG]: "##[warning]You're using AzureRM which will be retired soon, please schedule an update." in AzurePowerShell@5 #19843
Comments
We have exactly the same issue! In our DevOps pipeline (classic), we use an "Azure PowerShell 5.*" task that uses a service principal. |
This actually started breaking our builds and PRs, because we use the Build Quality Checks extension to ensure no warnings are introduced by code changes. We do not use AzureRM (our scripts explicitly load recent versions of Az modules). |
Same problem. We are getting this warning but have absolutely no AzureRM that we can tell. Is it the task itself that is using AzureRM? |
Sounds like a bug in PowerShell task itself. Couldn't find any release notes related to task: AzurePowerShell@5 |
I found that the tasks themselves were last updated two weeks ago to migrate from AzureRM to Az powerShell, e.g.
to list two of the Pull Requests. I assume this is the reason somehow - but haven't looked into it more than this. |
Microsoft has an option to use compatability mode with Enable-AzureRMAlias. I tried this as the first line of the inline Powershell within the AzurePowershell@5 tasks, but we still get the warning that we use the AzureRM module. |
Also had this one suddenly appear. |
Can you please provide me with more info on this, like an example of yours. I am also facing the same issue with ps5.* |
It's one of the flags you can set on the inputs of the activity. |
Thank you, it helps. But my pipeline is classic one, so I think we will have to find how to set that value? |
got it now, I can see in advanced, Use Powershell Core check box, I will try to check that one and see if the warning goes. |
Hi , I have configured my task as below |
Thank you for raising this issue, right now our team is working on switching from AzureRM (which no longer supported from 29/02/2024) to Az. Since we can't check user's PowerShell scripts, we are displaying such warning to notify users to double check if their scripts are also using deprecated AzureRM, it will disappear after rollout of this migration is completed. Also, if you'd like to help our team and switch to the new Az you can add environment variable |
@kirill-ivlev do you mean something like this, the last line? - task: AzurePowerShell@5
displayName: 'Transform Configs and Deployment files'
inputs:
azureSubscription: $(PO_AzureCustSubscription)
ScriptType: 'FilePath'
ScriptPath: '$(System.DefaultWorkingDirectory)/Scripts/PS/cust-transform.ps1'
errorActionPreference: 'continue'
azurePowerShellVersion: 'LatestVersion'
env:
APPLICATION_INSIGHTS_CONNECTION_STRING: $(APPLICATION_INSIGHTS_CONNECTION_STRING)
RETIRE_AZURERM_POWERSHELL_MODULE: true |
You mentioned about this variable helping your team... does that mean by using this env var, it will provide your team access to our powershell scripts? Just want to confirm due to legal requirements. |
@shurick81 yes, right |
Looking at the code of VstsAzureHelpers, it seems that when |
Is there an option to only suppress the warning? We've completed migration from AzureRM to Az; no AzureRM-modules are installed. When we set However,
|
If this is the purpose of the warning, then the language used in the message is very misleading. |
Very odd to get warnings in our pipelines that have no real cause. Why display a warning , without a check if AzureRM modules are used in the scripts or installed at all? |
Exactly, then it should say "IF you are using [...]". And there should be a way to turn off the warning without actually running uninstall scripts and whatnot. |
Do you have an estimate of when this roll out will be completed? |
@kirill-ivlev I saw that the deprecation of AzureRM was already committed as version If I understand correctly, we need to set |
Microsoft, any real solution on this issue that is also not breaking our environments? |
Several months have passed since the deprecation of the AzureRM modules, yet we are still encountering the associated warning. Is there an expected timeline for the removal of this warning? |
Please run the pipeline by adding the variable "RETIRE_AZURERM_POWERSHELL_MODULE" as value "true". By using that flag it only suppresses warnings; it does not install the Az module or uninstall the AzureRM module automatically, so we are good to use that. We have created an repair item for this issue on classic pipelines and will be working on it. |
@florinangelescu is not this option provided? Have you tried using |
That option does not work for classical releases. I got an official answer from Microsoft through other channels that they do not have a timeline for fixing this. It seems that it is acceptable to have bugs in production... what can I say? |
New issue checklist
Task name
No response
Task version
No response
Issue Description
Every time I run any AzurePowerShell@5 step, I get the following in the Pipeline output:
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows Server 2022
Relevant log output
Full task logs with system.debug enabled
No response
Repro steps
No response
The text was updated successfully, but these errors were encountered: