Skip to content

Commit ee6c627

Browse files
authored
Merge pull request #294075 from sdwheeler/sdw-w368950-vnet-roles
Add new article about supporting multiple users in a VNet deployment
2 parents 6159995 + d6c3616 commit ee6c627

File tree

3 files changed

+143
-45
lines changed

3 files changed

+143
-45
lines changed

articles/cloud-shell/TOC.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ items:
77
href: features.md
88
- name: Release notes
99
href: release-notes.md
10-
- name: Get started with Cloud Shell
10+
- name: Get started with Azure Cloud Shell
1111
items:
1212
- name: Get started (Classic)
1313
href: get-started/classic.md
@@ -17,7 +17,7 @@ items:
1717
href: get-started/new-storage.md
1818
- name: Get started with existing storage account (New UI)
1919
href: get-started/existing-storage.md
20-
- name: How to use Cloud Shell
20+
- name: How to use Azure Cloud Shell
2121
items:
2222
- name: Use the window (Classic UI)
2323
href: using-the-shell-window.md
@@ -31,7 +31,7 @@ items:
3131
href: cloud-shell-predictive-intellisense.md
3232
- name: FAQ & Troubleshooting
3333
href: faq-troubleshooting.md
34-
- name: Deploy Cloud Shell in a virtual network
34+
- name: Deploy Azure Cloud Shell in a virtual network
3535
items:
3636
- name: Overview
3737
href: vnet/overview.md
@@ -41,16 +41,18 @@ items:
4141
href: vnet/how-to-use-private-endpoint-storage.md
4242
- name: Troubleshoot Azure Cloud Shell in a virtual network
4343
href: vnet/troubleshooting.md
44+
- name: Security
45+
items:
46+
- name: Allow multiple users to use a single storage account and file share
47+
href: security/how-to-support-multiple-users.md
48+
- name: Security baseline
49+
href: /security/benchmark/azure/baselines/cloud-shell-security-baseline?bc=%2fazure%2fbread%2ftoc.json&toc=%2fazure%2fcloud-shell%2ftoc.json
4450
- name: Pricing
4551
items:
46-
- name: Cloud Shell pricing
52+
- name: Azure Cloud Shell pricing
4753
href: pricing.md
4854
- name: Pricing calculator
4955
href: https://azure.microsoft.com/pricing/calculator/
50-
- name: Security
51-
items:
52-
- name: Security baseline
53-
href: /security/benchmark/azure/baselines/cloud-shell-security-baseline?bc=%2fazure%2fbread%2ftoc.json&toc=%2fazure%2fcloud-shell%2ftoc.json
5456
- name: Reference
5557
items:
5658
- name: Azure CLI
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Allow multiple users to use a single storage account and file share
3+
description: This article explains changes required to allow multiple Azure Cloud Shell users to use a single storage account and file share.
4+
ms.topic: how-to
5+
ms.date: 02/04/2025
6+
---
7+
# Allow multiple users to use a single storage account and file share
8+
9+
By default, the storage resources created by Azure Cloud Shell are intended for a single user. A
10+
single-user deployment is the most secure configuration because each user can only access their own
11+
file share. However, you might have a need to allow multiple users access to a single deployment. To
12+
support access for multiple users, you need to make the following changes:
13+
14+
- Increase the Azure File share quota
15+
- Assign roles to the users that allow access to the storage resources
16+
17+
> [!WARNING]
18+
> Using the configuration steps in this article grants each user you configure access to the all the
19+
> files in the file share. For the best security, create separate storage accounts and file shares
20+
> for each user.
21+
22+
## Increase File Share quota
23+
24+
The file share created by Cloud Shell has a 6-GiB quota limit. When a new user starts their first
25+
session, Cloud Shell creates a 5-GiB image (`*.img`) file in the file share. The first user uses up
26+
the quota limit. When a second user starts their session, they receive the 'ephemeral storage' error
27+
message because Cloud Shell is unable to create another 5-GiB image (`*.img`) file. Also, notice
28+
that Cloud Shell created a 0-byte image (`*.img`) file for the failed attempt.
29+
30+
To support multiple users, you need to increase the file share quota to accommodate the number of
31+
users that share the same storage account. Increase the quota by 5-GiB per user.
32+
33+
Use the following steps to change the file share quota:
34+
35+
1. Sign in to the Azure portal.
36+
1. Use the search bar to find your storage accounts
37+
1. On the **Storage accounts** page, select the storage account that you're using for the Azure
38+
Cloud Shell environment and view the details.
39+
1. From the left-hand menu, expand **Data storage** and select **File shares**.
40+
1. Locate the file share that you're using for the Azure Cloud Shell environment.
41+
1. On the file share for Cloud Shell, select the triple-dot menu.
42+
1. Select **Edit quota** from the menu.
43+
1. Change the **Quota** amount to the desired size.
44+
1. Select **OK** to save the change.
45+
46+
> [!NOTE]
47+
> There's a 100-TiB size limit for the file share.
48+
49+
## Assign roles to the users that allow access to the storage resources
50+
51+
To access the storage account and file share, each user needs to have the following role
52+
assignments:
53+
54+
- **Reader and Data Access** or **Storage Account Contributor**
55+
- **Storage File Data Privileged Contributor**
56+
57+
Apply the roles on the storage account. The file share inherits the role assignments from the
58+
storage account.
59+
60+
Use the following steps to assign roles:
61+
62+
1. Sign in to the Azure portal.
63+
1. Use the search bar to find your storage accounts
64+
1. On the **Storage accounts** page, select the storage account that you're using for the Azure
65+
Cloud Shell environment and view the details.
66+
1. From the left-hand menu, select **Access Control (IAM)**.
67+
1. In the details pane, select the **Role assignments** tab.
68+
1. In the header menu, select **+ Add** then select **Add role assignment** from the dropdown menu.
69+
1. Use the search field to search for **Reader and Data Access** and select it from the search
70+
results.
71+
1. Select **Next** on the bottom of the page to get to the **Members** tab.
72+
1. To add users to the role:
73+
1. Select **+ Select members**.
74+
1. In the **Select members** pane, search for the user
75+
1. Select the user then use **Select** button at the bottom to add the user.
76+
1. Repeat the process for each user.
77+
1. After adding the users, select **Next** to go to the **Review + assign** tab.
78+
1. Repeat the process for the **Storage File Data Privileged Contributor** role.
79+
80+
## Summary
81+
82+
In this article, you learned how to increase storage quotas for a file share and how to assign roles
83+
to users to allow access to storage resources in Azure.

articles/cloud-shell/vnet/deployment.md

Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
description: This article provides step-by-step instructions to deploy Azure Cloud Shell in a private virtual network.
33
ms.contributor: jahelmic
4-
ms.date: 01/28/2025
4+
ms.date: 02/05/2025
55
ms.topic: how-to
66
ms.custom: devx-track-arm-template
77
title: Deploy Azure Cloud Shell in a virtual network with quickstart templates
88
---
99

10-
# Deploy Cloud Shell in a virtual network by using quickstart templates
10+
# Deploy Azure Cloud Shell in a virtual network by using quickstart templates
1111

1212
Before you run quickstart templates to deploy Azure Cloud Shell in a virtual network (VNet), there
1313
are several prerequisites to complete. You must have the **Owner** role assignment on the
14-
subscription. To view and assign roles, see [List Owners of a Subscription][10].
14+
subscription. To view and assign roles, see [List Owners of a Subscription][05].
1515

1616
This article walks you through the following steps to configure and deploy Cloud Shell in a virtual
1717
network:
@@ -37,7 +37,7 @@ Depending on when your tenant was created, some of these providers might already
3737

3838
To see all resource providers and the registration status for your subscription:
3939

40-
1. Sign in to the [Azure portal][11].
40+
1. Sign in to the [Azure portal][14].
4141
1. On the Azure portal menu, search for **Subscriptions**. Select it from the available options.
4242
1. Select the subscription that you want to view.
4343
1. On the left menu, under **Settings**, select **Resource providers**.
@@ -80,57 +80,61 @@ Fill in the following values:
8080
You can create the resource group by using the Azure portal, the Azure CLI, or Azure PowerShell. For
8181
more information, see the following articles:
8282

83-
- [Manage Azure resource groups by using the Azure portal][02]
84-
- [Manage Azure resource groups by using Azure CLI][01]
85-
- [Manage Azure resource groups by using Azure PowerShell][03]
83+
- [Manage Azure resource groups by using the Azure portal][03]
84+
- [Manage Azure resource groups by using Azure CLI][02]
85+
- [Manage Azure resource groups by using Azure PowerShell][04]
8686

8787
### Create a virtual network
8888

8989
You can create the virtual network by using the Azure portal, the Azure CLI, or Azure PowerShell.
9090
For more information, see the following articles:
9191

92-
- [Use the Azure portal to create a virtual network][05]
93-
- [Use Azure PowerShell to create a virtual network][06]
94-
- [Use Azure CLI to create a virtual network][04]
92+
- [Use the Azure portal to create a virtual network][07]
93+
- [Use Azure PowerShell to create a virtual network][08]
94+
- [Use Azure CLI to create a virtual network][06]
9595

9696
> [!NOTE]
9797
> When you're setting the container subnet address prefix for the Cloud Shell subnet, it's important
9898
> to consider the number of Cloud Shell sessions that you need to run concurrently. If the number of
9999
> Cloud Shell sessions exceeds the available IP addresses in the container subnet, users of those
100100
> sessions can't connect to Cloud Shell. Increase the container subnet range to accommodate your
101101
> specific needs. For more information, see the "Change subnet settings" section of
102-
> [Add, change, or delete a virtual network subnet][07].
102+
> [Add, change, or delete a virtual network subnet][09].
103103
104104
### Get the Azure container instance ID
105105

106106
The Azure container instance ID is a unique value for every tenant. You use this identifier in the
107-
[quickstart templates][08] to configure a virtual network for Cloud Shell. To get the Id from the
108-
command line, see [Alternate way to get the Azure Container Instance ID][12].
107+
[quickstart templates][12] to configure a virtual network for Cloud Shell. To get the ID from the
108+
command line, see [Alternate way to get the Azure Container Instance ID][10].
109109

110-
1. Sign in to the [Azure portal][11]. From the home page, select **Microsoft Entra ID**. If the icon
110+
1. Sign in to the [Azure portal][14]. From the home page, select **Microsoft Entra ID**. If the icon
111111
isn't displayed, enter `Microsoft Entra ID` in the top search bar.
112112
1. On the left menu, select **Overview**. Then enter `azure container instance service` in the
113113
search bar.
114114

115115
[![Screenshot of searching for Azure Container Instance Service.][95a]][95b]
116116

117117
1. In the results, under **Enterprise applications**, select **Azure Container Instance Service**.
118-
1. On the **Overview** page for **Azure Container Instance Service**, find the **Object ID** value
119-
that's listed as a property.
118+
1. On the **Overview** page for **Azure Container Instance Service**, locate the **Object ID** value
119+
listed under **Properties**.
120120

121121
You use this ID in the quickstart template for the virtual network.
122122

123123
[![Screenshot of Azure Container Instance Service details.][96a]][96b]
124124

125125
## 3. Create the required network resources by using the ARM template
126126

127-
Use the [Azure Cloud Shell - VNet][08] template to create Cloud Shell resources in a virtual
128-
network. The template creates three subnets under the virtual network that you created earlier. You
129-
might choose to change the supplied names of the subnets or use the defaults.
127+
To create Cloud Shell resources in a virtual network, use the ARM template named
128+
[Azure Cloud Shell - VNet][12]. The template creates three subnets under the virtual network that
129+
you created earlier. You might choose to change the supplied names of the subnets or use the
130+
defaults.
130131

131-
The virtual network, along with the subnets, requires valid IP address assignments. You need at
132-
least one IP address for the Relay subnet and enough IP addresses in the container subnet to support
133-
the number of concurrent sessions that you expect to use.
132+
The virtual network and the subnets require valid IP address assignments. You need enough addresses
133+
to support the following resources:
134+
135+
- At least one IP address for the Relay subnet
136+
- Enough IP addresses in the container subnet to support the number of concurrent sessions that you
137+
expect to use
134138

135139
The ARM template requires specific information about the resources that you created earlier, along
136140
with naming information for new resources. This information is filled out along with the prefilled
@@ -176,8 +180,9 @@ subscription.
176180

177181
## 4. Create the virtual network storage by using the ARM template
178182

179-
Use the [Azure Cloud Shell - VNet storage][09] template to create Cloud Shell resources in a virtual
180-
network. The template creates the storage account and assigns it to the private virtual network.
183+
To create Cloud Shell resources in a virtual network, use the ARM template named
184+
[Azure Cloud Shell - VNet storage][13]. The template creates the storage account and assigns it to
185+
the private virtual network.
181186

182187
The ARM template requires specific information about the resources that you created earlier, along
183188
with naming information for new resources.
@@ -275,21 +280,29 @@ az ad sp list --display-name 'Azure Container Instance' --query "[].id"
275280
## Next steps
276281

277282
You must complete the Cloud Shell configuration steps for each user who needs to use the new private
278-
Cloud Shell instance.
283+
Cloud Shell instance. Alternatively, you can configure your Cloud Shell instance to allow multiple
284+
users to use the same storage resources. For more information, see
285+
[Allow multiple users to use a single storage account and file share][01].
286+
287+
For improved security, you can configure your storage account to use a private endpoint. For more
288+
information, see [Connect to a storage account using an Azure private endpoint][11].
279289

280290
<!-- link references -->
281-
[01]: /azure/azure-resource-manager/management/manage-resource-groups-cli
282-
[02]: /azure/azure-resource-manager/management/manage-resource-groups-portal
283-
[03]: /azure/azure-resource-manager/management/manage-resource-groups-powershell
284-
[04]: /azure/virtual-network/quick-create-cli
285-
[05]: /azure/virtual-network/quick-create-portal
286-
[06]: /azure/virtual-network/quick-create-powershell
287-
[07]: /azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#change-subnet-settings
288-
[08]: https://aka.ms/cloudshell/docs/vnet/template
289-
[09]: https://azure.microsoft.com/resources/templates/cloud-shell-vnet-storage/
290-
[10]: /azure/role-based-access-control/role-assignments-list-portal#list-owners-of-a-subscription
291-
[11]: https://portal.azure.com
292-
[12]: #alternate-way-to-get-the-azure-container-instance-id
291+
[01]: ../security/how-to-support-multiple-users.md
292+
[02]: /azure/azure-resource-manager/management/manage-resource-groups-cli
293+
[03]: /azure/azure-resource-manager/management/manage-resource-groups-portal
294+
[04]: /azure/azure-resource-manager/management/manage-resource-groups-powershell
295+
[05]: /azure/role-based-access-control/role-assignments-list-portal#list-owners-of-a-subscription
296+
[06]: /azure/virtual-network/quick-create-cli
297+
[07]: /azure/virtual-network/quick-create-portal
298+
[08]: /azure/virtual-network/quick-create-powershell
299+
[09]: /azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#change-subnet-settings
300+
[10]: #alternate-way-to-get-the-azure-container-instance-id
301+
[11]: how-to-use-private-endpoint-storage.md
302+
[12]: https://aka.ms/cloudshell/docs/vnet/template
303+
[13]: https://azure.microsoft.com/resources/templates/cloud-shell-vnet-storage/
304+
[14]: https://portal.azure.com
305+
293306
[95a]: media/deployment/container-service-search.png
294307
[95b]: media/deployment/container-service-search.png#lightbox
295308
[96a]: media/deployment/container-service-details.png

0 commit comments

Comments
 (0)