arcus-azure/arcus.scripting

Unnecessary logging in Get-AzKeyVaultAccessPolicies.ps1

Closed this issue · 2 comments

I was looking at some logs of a devops pipeline where I use the Get-AzKeyVaultAccessPolicies script to retrieve existing access policies, and I noticed a log-entry which doesn't bring any value to the table.

More specifically, I saw this:

Current access policies: @{list=System.Object[]}

Which doesn't really give any added value imho. This is just outputting the type of the variable that contains the access policies, but not the access policies themselves. Additionally, I wonder if we should even output the existing access policies here, as it can be quite a long list which contains a lot of information. (For every access policy, the name of the object that has access + their rights).

I think we should just remove this line of code from the Powershell script.

Yeah, I saw that too some time ago. We could definitely remove it, as it indeed doesn't add much value. We could, though, still log that we successfully retrieved the access policies. Or something like that. 👍

Assigned to me, but https://github.com/pimentacodit888 will be working on this 👍🏻