Skip to content

Commit 08a3faf

Browse files
msmbaldwinCopilot
andcommitted
Replace inline resource group sections with includes in MHSM quickstarts
Replace inline 'Create a resource group' and 'Clean up resources' sections with existing reusable includes in quick-create-cli.md and quick-create-powershell.md. Update placeholders to use concrete example values (myResourceGroup, EastUS) for consistency. Co-authored-by: Copilot <[email protected]>
1 parent 13344f0 commit 08a3faf

2 files changed

Lines changed: 17 additions & 26 deletions

File tree

articles/key-vault/managed-hsm/quick-create-cli.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: msmbaldwin
66
ms.service: azure-key-vault
77
ms.subservice: managed-hsm
88
ms.topic: quickstart
9-
ms.date: 03/30/2026
9+
ms.date: 04/14/2026
1010
ms.author: mbaldwin
1111
ms.custom: mode-api, devx-track-azurecli
1212
ms.devlang: azurecli
@@ -31,11 +31,7 @@ You also need:
3131

3232
## Create a resource group
3333

34-
A resource group is a logical container into which you deploy and manage Azure resources. The following example creates a resource group named `<resource-group>` in the `<location>` location.
35-
36-
```azurecli-interactive
37-
az group create --name "<resource-group>" --location <location>
38-
```
34+
[!INCLUDE [Create a resource group](~/reusable-content/ce-skilling/azure/includes/create-resource-group-cli.md)]
3935

4036
## Create a Managed HSM
4137

@@ -48,15 +44,20 @@ Creating a Managed HSM is a two-step process:
4844
Use the `az keyvault create` command to create a Managed HSM. This script has three mandatory parameters: a resource group name, an HSM name, and the geographic location.
4945

5046
To create a Managed HSM resource, provide the following inputs:
51-
- A resource group where you place the Managed HSM in your subscription.
52-
- An Azure location.
47+
- Managed HSM name: A string of 3 to 24 characters that can contain only numbers (0-9), letters (a-z, A-Z), and hyphens (-).
48+
49+
> [!Important]
50+
> Each Managed HSM must have a unique name. Replace `<hsm-name>` with your own unique Managed HSM name in the following examples.
51+
52+
- Resource group name: **myResourceGroup**.
53+
- Location: **EastUS**.
5354
- A list of initial administrators.
5455

55-
The following example creates an HSM named `<hsm-name>` in the resource group `<resource-group>`, residing in the specified location, with **the current signed in user** as the only administrator, and a **7-day retention period** for soft-delete. You continue to pay for the Managed HSM until it's purged in a **soft-delete period**. For more information, see [Managed HSM soft-delete and purge protection](recovery.md#what-are-soft-delete-and-purge-protection) and read more about [Managed HSM soft-delete](soft-delete-overview.md).
56+
The following example creates an HSM named `<hsm-name>` in the resource group *myResourceGroup*, residing in the *EastUS* location, with **the current signed in user** as the only administrator, and a **7-day retention period** for soft-delete. You continue to pay for the Managed HSM until it's purged in a **soft-delete period**. For more information, see [Managed HSM soft-delete and purge protection](recovery.md#what-are-soft-delete-and-purge-protection) and read more about [Managed HSM soft-delete](soft-delete-overview.md).
5657

5758
```azurecli-interactive
5859
oid=$(az ad signed-in-user show --query id -o tsv)
59-
az keyvault create --hsm-name "<hsm-name>" --resource-group "<resource-group>" --location "<location>" --administrators $oid --retention-days 7
60+
az keyvault create --hsm-name "<hsm-name>" --resource-group "myResourceGroup" --location "EastUS" --administrators $oid --retention-days 7
6061
```
6162

6263
> [!NOTE]
@@ -90,13 +91,7 @@ az keyvault security-domain download --hsm-name <hsm-name> --sd-wrapping-keys ./
9091

9192
## Clean up resources
9293

93-
Other quickstarts and tutorials in this collection build upon this quickstart. If you plan to continue on to work with subsequent quickstarts and tutorials, you may wish to leave these resources in place.
94-
95-
When no longer needed, you can use the [az group delete](/cli/azure/group) command to remove the resource group, and all related resources. You can delete the resources as follows:
96-
97-
```azurecli-interactive
98-
az group delete --name <resource-group>
99-
```
94+
[!INCLUDE [Delete resource group](~/reusable-content/ce-skilling/azure/includes/delete-resource-group-cli.md)]
10095
[!INCLUDE [Managed HSM cleanup warning](~/reusable-content/ce-skilling/azure/includes/managed-hsm/cleanup-warning.md)]
10196

10297
## Next steps

articles/key-vault/managed-hsm/quick-create-powershell.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create and retrieve attributes of a managed key in Azure Key Vault – Az
33
description: Quickstart showing how to set and retrieve a managed key from Azure Key Vault using Azure PowerShell
44
author: msmbaldwin
55
ms.author: mbaldwin
6-
ms.date: 03/30/2026
6+
ms.date: 04/14/2026
77
ms.topic: quickstart
88
ms.service: azure-key-vault
99
ms.subservice: keys
@@ -22,11 +22,7 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2222

2323
## Create a resource group
2424

25-
A resource group is a logical container into which you deploy and manage Azure resources. Use the Azure PowerShell [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) cmdlet to create a resource group named `<resource-group>` in the `<location>` location.
26-
27-
```azurepowershell-interactive
28-
New-AzResourceGroup -Name "<resource-group>" -Location "<location>"
29-
```
25+
[!INCLUDE [Create a resource group](~/reusable-content/ce-skilling/azure/includes/create-resource-group-powershell.md)]
3026

3127
## Get your principal ID
3228

@@ -53,12 +49,12 @@ Use the Azure PowerShell [New-AzKeyVaultManagedHsm](/powershell/module/az.keyvau
5349
> [!Important]
5450
> Each Managed HSM must have a unique name. Replace `<hsm-name>` with your own unique Managed HSM name in the following examples.
5551
56-
- Resource group name: `<resource-group>`.
57-
- Location: Your selected location.
52+
- Resource group name: *myResourceGroup*.
53+
- Location: *EastUS* (or your selected location).
5854
- Your principal ID: Pass the Microsoft Entra principal ID that you obtained in the last section to the "Administrator" parameter.
5955

6056
```azurepowershell-interactive
61-
New-AzKeyVaultManagedHsm -Name "<hsm-name>" -ResourceGroupName "<resource-group>" -Location "<location>" -Administrator "<principal-id>" -SoftDeleteRetentionInDays "<retention-days>"
57+
New-AzKeyVaultManagedHsm -Name "<hsm-name>" -ResourceGroupName "myResourceGroup" -Location "EastUS" -Administrator "<principal-id>" -SoftDeleteRetentionInDays "<retention-days>"
6258
```
6359
> [!NOTE]
6460
> The create command can take a few minutes. When it returns successfully, you're ready to activate your HSM.

0 commit comments

Comments
 (0)