Azure / avdaccelerator

AVD Accelerator deployment automation to simplify the setup of AVD (Azure Virtual Desktop) based on best practices
MIT License
308 stars 201 forks source link

The SAS Token variable is defined but never used #525

Closed randomnote1 closed 6 months ago

randomnote1 commented 8 months ago

The variable _ArtifactsLocationSasToken is defined but never used. This prevents referencing the scripts in an environment where the scripts have been customized, networking is locked down, or is air gapped.

Arm version: https://github.com/Azure/avdaccelerator/blob/99fc60f1b7d978bbf712d6a8830f02cac1fa397e/workload/arm/brownfield/deployAlerts.json#L19C6-L19C32

Bicep version: https://github.com/Azure/avdaccelerator/blob/99fc60f1b7d978bbf712d6a8830f02cac1fa397e/workload/bicep/brownfield/alerts/deploy.bicep#L13C23-L13C23

randomnote1 commented 8 months ago

Workaround

ARM

Append the SAS token to the end of the .ps1 file names in deployAlerts.json

...
    "RunbookScriptGetStorage": "Get-StorAcctInfov2.ps1?<sas token here>",
    "RunbookScriptGetHostPool": "Get-HostPoolInfo.ps1?<sas token here>",
...

Bicep

Append the SAS token to the end of the .ps file names in deploy.bicep

...
var RunbookScriptGetStorage = 'Get-StorAcctInfov2.ps1?<sas token here>'
var RunbookScriptGetHostPool = 'Get-HostPoolInfo.ps1?<sas token here>'
...
danycontre commented 8 months ago

@randomnote1 thank you for submitting the issue, we are reviewing.

cc: @JCoreMS

JCoreMS commented 8 months ago

I'll look at incorporating this change and updating the docs and possibly implementing an option within the UI definition.

JCoreMS commented 8 months ago

This is definitely a need for air gapped clouds and on my list of things to address as soon as I can. ;)

JCoreMS commented 7 months ago

This was completed in 2.1.4 per request! Updated the UI or Deployment Button as well to reflect this change and allow for this as an option.