Skip to content
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

4-WVD-Scaling-Tool Get-AzAutomationVariable can no longer retrieve values of encrypted variables #682

Closed
SvenAelterman opened this issue Apr 7, 2022 · 2 comments
Assignees

Comments

@SvenAelterman
Copy link

I don't know in which release of the Az modules this changed, but I had leveraged the scripts from this repo to build my own single script to deploy the scaling tool.

Previously, Get-AzAutomationVariable would correctly retrieve the value of the WebhookURI variable, but it no longer does. It must be related to either a change in the PS modules or a change to these scripts that marked the variable as Encrypted where it previously didn't.

I don't know a solution to the problem. For me, the Webhook URI is shown on the screen after running the CreateOrUpdateAzAutoAccount.ps1 script in one place instead of two. But it's problematic for a downstream script that needs that URI.

Perhaps the script can return the value using return $WebhookURI as the last line?

@SvenAelterman SvenAelterman changed the title 4-WVD-ScalingTool Get-AzAutomationVariable can no longer retrieve values of encrypted variables 4-WVD-Scaling-Tool Get-AzAutomationVariable can no longer retrieve values of encrypted variables Apr 7, 2022
@SvenAelterman
Copy link
Author

I just realize that the cause is in fact that the script now treats the variable as Encrypted: #670

This was a breaking change unfortunately.

@nakranimohit0
Copy link
Member

@SvenAelterman Thanks for bringing this up. Yes, this is a breaking change and documentation was updated to address this: https://aka.ms/wvdscale. It was an Azure Security Center that advised to make the variable value encrypted for security reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants