1

Azure rm module doesn't show any related commands to get keys from app configuration.

twinkle hema
  • 75
  • 1
  • 11
  • Could you please describe your issue in detail? – Jim Xu Oct 01 '20 at 07:32
  • @JimXu I didn't find powershell command in Azure RM module to pull the secret keys for APP CONFIGURATION. What is the possible way to get them ? – twinkle hema Oct 01 '20 at 10:32
  • 1
    If you want to Azure app configuration access key, you need to use Az module. If you want to get the setting you stored in app configuration, now you cannot implement it with PowerShell. You should use Azure CLI rest API client sdk : https://github.com/Azure/AppConfiguration/issues/267 – Jim Xu Oct 02 '20 at 00:44
  • @JimXu is there an other way to get access keys other than az commands ?.Since am using it in rm module – twinkle hema Oct 06 '20 at 09:21

2 Answers2

2

If you want to list access key of Azure App configuration with the AzureRM module, we can use the command Invoke-AzureRmResourceAction with action listkeys.

For example

Connect-AzureRmAccount


$keys=Invoke-AzureRmResourceAction -Action listKeys `
        -ResourceType "Microsoft.AppConfiguration/configurationStores" `
        -ResourceName "<>" `
        -ResourceGroupName "<>" -ApiVersion "2019-10-01" -Force 

$keys | ConvertTo-Json

enter image description here

Jim Xu
  • 21,610
  • 2
  • 19
  • 39
1

I use the following.

Get-AzAppConfigurationStoreKey
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Reference docs: https://learn.microsoft.com/en-us/powershell/module/az.appconfiguration/get-azappconfigurationstorekey?view=azps-4.7.0

Stringfellow
  • 2,788
  • 2
  • 21
  • 36
  • This is for az but am looking for RM module command or an alternative for that like get-Azurerm.... – twinkle hema Oct 01 '20 at 17:04
  • hmm...probably nothing available in AzureRM. As you're probably aware, AzureRM PowerShell has been replaced with Az PowerShell. From the Microsoft AzureRM page, "All versions of the AzureRM PowerShell module are outdated, but not out of support. The Az PowerShell module is now the recommended PowerShell module for interacting with Azure. " – Stringfellow Oct 01 '20 at 17:08