Skip to content

Commit f888e20

Browse files
committed
Update script storage new-azurermstorageaccount implementation to remove storage account from the output stream
1 parent de5e01a commit f888e20

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/AzureRM.Storage.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Get-AzureRmStorageAccount
1313
PROCESS {
1414
$getTask = $client.StorageAccounts.GetPropertiesAsync($ResourceGroupName, $name, [System.Threading.CancellationToken]::None)
1515
$sa = $getTask.Result
16-
$account = Get-StorageAccount $sa $ResourceGroupName
16+
$account = Get-StorageAccount $ResourceGroupName $Name
1717
Write-Output $account
1818
}
1919
END {}
@@ -38,8 +38,6 @@ function New-AzureRmStorageAccount
3838
$createParms.Location = $Location
3939
$getTask = $client.StorageAccounts.CreateAsync($ResourceGroupName, $name, $createParms, [System.Threading.CancellationToken]::None)
4040
$sa = $getTask.Result
41-
$account = Get-StorageAccount $ResourceGroupName $Name
42-
Write-Output $account
4341
}
4442
END {}
4543

@@ -88,6 +86,9 @@ function Get-StorageClient
8886

8987
function Get-StorageAccount {
9088
param([string] $resourceGroupName, [string] $name)
91-
$sa = New-Object PSObject -Property @{"Name" = $name; "ResourceGroupName" = $resourceGroupName}
89+
$endpoints = New-Object PSObject -Property @{"Blob" = "https://$name.blob.core.windows.net/"}
90+
$sa = New-Object PSObject -Property @{"Name" = $name; "ResourceGroupName" = $resourceGroupName;
91+
"PrimaryEndpoints" = $endpoints
92+
}
9293
return $sa
9394
}

0 commit comments

Comments
 (0)