File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -268,11 +268,11 @@ public static int hashForArtifact(String artifact)
268
268
$hash = Receive-Job $job
269
269
270
270
Write-Host " Initiating Artifact Creation for Appliance: " , $applianceName
271
+ $MigratePrefix = " migrate"
271
272
272
273
if ([string ]::IsNullOrEmpty($CacheStorageAccountId )) {
273
274
# Phase 1
274
275
# Storage account
275
- $MigratePrefix = " migrate"
276
276
$LogStorageAcName = $MigratePrefix + " lsa" + $hash
277
277
$GateWayStorageAcName = $MigratePrefix + " gwsa" + $hash
278
278
$StorageType = " Microsoft.Storage/storageAccounts"
Original file line number Diff line number Diff line change @@ -497,11 +497,17 @@ public static int hashForArtifact(String artifact)
497
497
}
498
498
"@
499
499
Add-Type - TypeDefinition $Source - Language CSharp
500
- $hash = [HashFunctions ]::hashForArtifact($HashCodeInput )
500
+ if ([string ]::IsNullOrEmpty($mappingObject.ProviderSpecificDetail.KeyVaultUri )) {
501
+ $LogStorageAccountID = $mappingObject.ProviderSpecificDetail.StorageAccountId
502
+ $LogStorageAccountSas = $LogStorageAccountID.Split (' /' )[-1 ] + ' -cacheSas'
503
+ }
504
+ else {
505
+ $hash = [HashFunctions ]::hashForArtifact($HashCodeInput )
506
+ $LogStorageAccountID = " /subscriptions/" + $SubscriptionId + " /resourceGroups/" +
507
+ $ResourceGroupName + " /providers/Microsoft.Storage/storageAccounts/migratelsa" + $hash
508
+ $LogStorageAccountSas = " migratelsa" + $hash + ' -cacheSas'
509
+ }
501
510
502
- $LogStorageAccountID = " /subscriptions/" + $SubscriptionId + " /resourceGroups/" +
503
- $ResourceGroupName + " /providers/Microsoft.Storage/storageAccounts/migratelsa" + $hash
504
- $LogStorageAccountSas = " migratelsa" + $hash + ' -cacheSas'
505
511
if (! $HasTargetBDStorage ) {
506
512
$TargetBootDiagnosticsStorageAccount = $LogStorageAccountID
507
513
}
You can’t perform that action at this time.
0 commit comments