Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to set same name for Azure key Vault in different Subscription

I am trying to set same name to all my Key Vault in different Subscription but getting below error.

New-AzureRmKeyVault : VaultAlreadyExists: The name 'AKeyVault' is already in use.
At line:1 char:1
+ New-AzureRmKeyVault -VaultName AKeyVault -ResourceGroupName PS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [New-AzureRmKeyVault], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.NewAzureKeyVault

can someone please let me know if key vault name should be unique across all subscriptions?

like image 760
NKDev Avatar asked Dec 08 '22 22:12

NKDev


1 Answers

Yes, the Key Vault name should be universally unique as key vault and keys/secrets inside it are accessed via https://{vault-name}.vault.azure.net URI. It's very much like storage account name. If I create a storage account by the name nkdev, then you can't use that name.

like image 123
Gaurav Mantri Avatar answered Jan 04 '23 22:01

Gaurav Mantri