Skip to content

Commit c3aa06b

Browse files
Merge pull request #224377 from maud-lv/ml-aac-powershell
Powershell - create + delete App Config store
2 parents 7cc0e4a + 49cc086 commit c3aa06b

File tree

5 files changed

+113
-11
lines changed

5 files changed

+113
-11
lines changed

articles/azure-app-configuration/powershell-samples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: PowerShell samples
33
description: Learn about the Azure PowerShell sample scripts available for App Configuration.
44
ms.service: azure-app-configuration
55
ms.topic: sample
6-
ms.date: 12/14/2022
6+
ms.date: 01/19/2023
77
ms.author: malev
88
author: maud-lv
99
---
@@ -14,9 +14,9 @@ The following table includes links to PowerShell scripts built using the [Az.App
1414
| Script | Description |
1515
|-|-|
1616
|**Create store**||
17-
| [Create a configuration store with the specified parameters](/powershell/module/az.appconfiguration/New-AzAppConfigurationStore) | Creates an Azure App Configuration store with some specified parameters. |
17+
| [Create a configuration store with the specified parameters](scripts/powershell-create-service.md) | Creates an Azure App Configuration store with some specified parameters. |
1818
|**Delete store**||
19-
| [Delete a configuration store](/powershell/module/az.appconfiguration/Remove-AzAppConfigurationStore) | Deletes an Azure App Configuration store. |
19+
| [Delete a configuration store](scripts/powershell-delete-service.md) | Deletes an Azure App Configuration store. |
2020
| [Purge a deleted configuration store](/powershell/module/az.appconfiguration/Clear-AzAppConfigurationDeletedStore) | Purges a deleted Azure App Configuration store, permanently removing all data. |
2121
|**Get and list stores**||
2222
| [Get a deleted configuration store](/powershell/module/az.appconfiguration/Get-AzAppConfigurationDeletedStore) | Gets a deleted Azure App Configuration store. |

articles/azure-app-configuration/scripts/cli-create-service.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ author: maud-lv
77

88
ms.service: azure-app-configuration
99
ms.topic: sample
10-
ms.date: 01/24/2020
10+
ms.date: 01/18/2023
1111
ms.author: malev
1212
ms.custom: devx-track-azurecli
1313
---
1414

15-
# Create an Azure App Configuration Store
15+
# Create an Azure App Configuration store with the Azure CLI
1616

17-
This sample script creates a new instance of Azure App Configuration in a new resource group.
17+
This sample script creates a new instance of Azure App Configuration using the Azure CLI in a new resource group.
1818

1919
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
2020

2121
[!INCLUDE [azure-cli-prepare-your-environment.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
2222

23-
- This tutorial requires version 2.0 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
23+
- This tutorial requires version 2.0 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
2424

2525
## Sample script
2626

@@ -55,7 +55,7 @@ appConfigConnectionString=$(az appconfig credential list \
5555
echo "$appConfigConnectionString"
5656
```
5757

58-
Make a note of the actual name generated for the new resource group. You will use that resource group name when you want to delete all group resources.
58+
Make a note of the actual name generated for the new resource group. You'll use that resource group name when you want to delete all group resources.
5959

6060
[!INCLUDE [cli-script-cleanup](../../../includes/cli-script-clean-up.md)]
6161

@@ -73,4 +73,4 @@ This script uses the following commands to create a new resource group and an Ap
7373

7474
For more information on the Azure CLI, see [Azure CLI documentation](/cli/azure).
7575

76-
Additional App Configuration CLI script samples can be found in the [Azure App Configuration CLI samples](../cli-samples.md).
76+
More App Configuration CLI script samples can be found in the [Azure App Configuration CLI samples](../cli-samples.md).

articles/azure-app-configuration/scripts/cli-delete-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ms.author: malev
1313
ms.custom: devx-track-azurecli
1414
---
1515

16-
# Delete an Azure App Configuration store
16+
# Delete an Azure App Configuration store with the Azure CLI
1717

18-
This sample script deletes an instance of Azure App Configuration.
18+
This sample script deletes an instance of Azure App Configuration using the Azure CLI.
1919

2020
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
2121

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: PowerShell script sample - Create an Azure App Configuration store
3+
titleSuffix: Azure App Configuration
4+
description: Create an Azure App Configuration store using a sample PowerShell script. See reference article links to commands used in the script.
5+
services: azure-app-configuration
6+
author: maud-lv
7+
ms.service: azure-app-configuration
8+
ms.topic: sample
9+
ms.date: 02/12/2023
10+
ms.author: malev
11+
ms.custom: devx-track-azurepowershell
12+
---
13+
14+
# Create an Azure App Configuration store with PowerShell
15+
16+
This sample script creates a new instance of Azure App Configuration in a new resource group using PowerShell.
17+
18+
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
19+
20+
To execute the sample scripts, you need a functional setup of [Azure PowerShell](/powershell/azure/).
21+
22+
Open a PowerShell window with admin rights and run `Install-Module -Name Az` to install Azure PowerShell
23+
24+
## Sample script
25+
26+
```powershell
27+
# Create a resource group
28+
New-AzResourceGroup -Name <resource-group-name> -Location <location>
29+
30+
# Create an App Configuration store
31+
New-AzAppConfigurationStore -Name <store-name> -ResourceGroupName <resource-group-name> -Location <location> -Sku <sku>
32+
33+
# Get the App Configuration connection string
34+
Get-AzAppConfigurationStoreKey -Name <store-name> -ResourceGroupName <resource-group-name>
35+
```
36+
37+
## Clean up resources
38+
39+
Clean up the resources you deployed by deleting the resource group.
40+
41+
```powershell
42+
Remove-AzResourceGroup -Name <resource-group-name>
43+
```
44+
45+
## Script explanation
46+
47+
This script uses the following commands to create a new resource group and an App Configuration store. Each command in the table links to command specific documentation.
48+
49+
| Command | Notes |
50+
|---|---|
51+
| [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) | Creates a resource group in which all resources are stored. |
52+
| [New-AzAppConfigurationStore](/powershell/module/az.appconfiguration/new-azappconfigurationstore) | Creates an App Configuration store resource. |
53+
| [Get-AzAppConfigurationStoreKey](/powershell/module/az.appconfiguration/get-azappconfigurationstorekey) | Lists access keys for an App Configuration store. |
54+
55+
## Next steps
56+
57+
For more information about Azure PowerShell, check out the [Azure PowerShell documentation](/powershell/azure/).
58+
59+
More App Configuration script samples for PowerShell can be found in the [Azure App Configuration PowerShell samples](../powershell-samples.md).
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: PowerShell script sample - Delete an Azure App Configuration store
3+
titleSuffix: Azure App Configuration
4+
description: Delete an Azure App Configuration store using a sample PowerShell script. See reference article links to commands used in the script.
5+
services: azure-app-configuration
6+
author: maud-lv
7+
ms.service: azure-app-configuration
8+
ms.topic: sample
9+
ms.date: 02/02/2023
10+
ms.author: malev
11+
ms.custom: devx-track-azurepowershell
12+
---
13+
14+
# Delete an Azure App Configuration store with PowerShell
15+
16+
This sample script deletes an instance of Azure App Configuration using PowerShell.
17+
18+
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
19+
20+
To execute this sample script, you need a functional setup of [Azure PowerShell](/powershell/azure/).
21+
22+
Open a PowerShell window with admin rights and run `Install-Module -Name Az` to install Azure PowerShell
23+
24+
## Sample script
25+
26+
```powershell
27+
# Delete an App Configuration store
28+
Remove-AzAppConfigurationStore -Name <store-name> -ResourceGroupName <resource-group-name>
29+
```
30+
31+
## Script explanation
32+
33+
This script uses the following command to delete an App Configuration store. Each command in the table links to command specific documentation.
34+
35+
| Command | Notes |
36+
|---|---|
37+
| [Remove-AzAppConfigurationStore](/powershell/module/az.appconfiguration/Remove-AzAppConfigurationStore) | Deletes an App Configuration store. |
38+
39+
## Next steps
40+
41+
For more information about Azure PowerShell, check out the [Azure PowerShell documentation](/powershell/azure/).
42+
43+
More App Configuration script samples for PowerShell can be found in the [Azure App Configuration PowerShell samples](../powershell-samples.md).

0 commit comments

Comments
 (0)