No more storage accounts? (Azure Cloud Shell ephemeral sessions)
- joe parr
- Jun 16, 2024
- 2 min read
In ancient times, logging into the Azure portal and running a line or two of Azure CLI in the cloud shell required you to have some form of storage mounted to save your session.
Usually a storage account.
A storage account costs money (granted, not a lot of money in this case, but still...) and if, like me, you work within multiple environments, then the need for more storage accounts is exponential.
Not anymore.
Please welcome to the stage, a new feature release, Azure Cloud Shell Ephemeral Sessions.
With this new feature, no more will you need to mount a storage account to run CLI commands in the cloud shell.
I demoed this, and it is pretty straight forward to use.
The Steps:
First, you need to enable the "CloudShell" resource provider. There are few options to do this.
Through the Portal:
Through PowerShell:
set-azcontext -SubscriptionId <subscriptionID>
$resourceprovider = Get-azresourceProvider | Where-Object {$_.ProviderNamespace -like "*CloudShell" }
Get-AzProviderFeature -ProviderNamespace $resourceprovider.ProviderNamespace
register-azresourceprovider -providername $resourceprovider.ProviderNamespace
Check it's enabled:
And once you have ran through either method, you can check to if it is registered in the portal or re-run the following command in PowerShell.
$resourceprovider = Get-azresourceProvider | Where-Object {$_.ProviderNamespace -like "*CloudShell" }
Get-AzProviderFeature -ProviderNamespace $resourceprovider.ProviderNamespace
So, what does this look like in practice, well.. let's navigate to the Azure Portal and find out.
In Practice:
Open up the cloud shell and you will be presented with this new option.
No storage account required?!
Select that option and then the subscription you wish to run a command on, hit apply and you are golden.
You will be presented with this message when in the cloud shell to just reaffirm that your session will be ephemeral.
And there you have it. A short-ish blog, but showcasing a tidy little new feature.
Thanks for reading!
{
“SignOff”: {
“Cheers”: “THF”
}
}
Comments