I am not aware that there is the required PowerShell modules/versions for the current Azure provider version. It's recommended to use the latest Azure PowerShell module version. If you're interested in the Azure provider's latest features, you could check out the changelog for version information and release notes.
For the error in your comment, it indicated that your existing PowerShell session is "locking" the module by loading possible elements from it. Since local-exec
provider invokes a process on the machine running Terraform, not on the resource. When you run it in terraform, it actually runs on local PowerShell. I don't think it will be related to the terraform version. This error might be due to your existing PowerShell session. You could exit it or open a new PowerShell session. Refer to this.
Hope it helps.