File tree 2 files changed +8
-3
lines changed
templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/terraform
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
Remove-Item - LiteralPath " C:\AzureData" - Force - Recurse
2
2
$ErrorActionPreference = " Stop"
3
3
4
- if ( ${SharedStorageAccess} -eq 1 )
4
+ if ( ${SharedStorageAccess} -eq 1 -And ${StorageAccountKey1} -match " / " )
5
5
{
6
- $Command = " net use z: \\${StorageAccountFileHost} \${FileShareName} /u:AZURE\${StorageAccountName} ${StorageAccountKey} "
6
+ $Command = " net use z: \\${StorageAccountFileHost} \${FileShareName} /u:AZURE\${StorageAccountName} ${StorageAccountKey2} "
7
+ $Command | Out-File " C:\ProgramData\Start Menu\Programs\StartUp\attach_storage.cmd" - encoding ascii
8
+ } else
9
+ {
10
+ $Command = " net use z: \\${StorageAccountFileHost} \${FileShareName} /u:AZURE\${StorageAccountName} ${StorageAccountKey1} "
7
11
$Command | Out-File " C:\ProgramData\Start Menu\Programs\StartUp\attach_storage.cmd" - encoding ascii
8
12
}
9
13
Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ resource "azurerm_windows_virtual_machine" "windowsvm" {
52
52
nexus_proxy_url = local.nexus_proxy_url
53
53
SharedStorageAccess = var.shared_storage_access ? 1 : 0
54
54
StorageAccountName = data.azurerm_storage_account.stg.name
55
- StorageAccountKey = data.azurerm_storage_account.stg.primary_access_key
55
+ StorageAccountKey1 = data.azurerm_storage_account.stg.primary_access_key
56
+ StorageAccountkey2 = data.azurerm_storage_account.stg.secondary_access_key
56
57
StorageAccountFileHost = data.azurerm_storage_account.stg.primary_file_host
57
58
FileShareName = var.shared_storage_access ? data.azurerm_storage_share.shared_storage[0 ].name : " "
58
59
CondaConfig = local.selected_image.conda_config ? 1 : 0
You can’t perform that action at this time.
0 commit comments