Creating secrets in Key Vault

To create secrets in Azure Key Vault, execute the next set of commands for both the SQL Server password and the Storage SAS token. The first command stores the Storage SAS token, and it is valid for a year, from the time of creation. The secret should be converted into a secure string before storing it in Key Vault. The next command stores the SQL Server login password, and it is also valid for a year, from the time of creation. The secret should also be converted into a secure string before storing it in a Key Vault:

Set-AzureKeyVaultSecret -VaultName keyvaultarmtemplatebook -Name "storageAccountkey" -SecretValue (ConvertTo-SecureString -String "?sv=2018-03-28&sr=c&sig=q47%2BlaoU8ZvrRmhrCR7iles3qoLhGMeu%2F4JXb8lwDdI%3D&spr=https&st=2019-02-08T10%3A50%3A03Z&se=2019-05-19T09%3A50%3A03Z&sp=r" ...

Get Azure Resource Manager Templates Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.