azd env set-secret#4517
Conversation
wbreza
left a comment
There was a problem hiding this comment.
This is looking good but just have some questions and concerns about when and where the secret reference to secret value translation occurs.
Enhance test and the strategy to set stdin for selections
weikanglim
left a comment
There was a problem hiding this comment.
LGTM! I expect that we will see users that are happy that they are able to use azd to easily store and retrieve their secrets in Key Vault.
Co-authored-by: Wei Lim <weilim@microsoft.com>
…to azd-env-add-secret
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Adding
azd env set-secretDescription:
With this change, AZD allows customers to set Azure Key Vault Secrets (Akvs) within the azd environment.
Adding a Akvs
Folks run
azd env set-secret <name>and they can select to either "create a new Key Vault secret" or "select an existing one". For theCreate a new Akvs, folks can select an existing Azure Key Vault Account or Create a new one. See the next table for the options for a user:create accountoption is turned ONAt the end of the flow, the akvs is persisted within the .env file (the azd environment) using the
<name>provided by the user for the secret and the reference to the akvs as the value, which looks like:Azd uses the prefix
akvs://as a way to identify a reference to an Azure key Vault Secret.Using secrets
AZD can get the akvs value during the next flows:
azd provision + bicep + main.parameters.json.main.parameters.jsonfor the parameter to the secret from the .env. For example, when callingazd env set-secret OPEN_ID_KEYthe mapping would look like:azd provision + bicep + .bicepparams. -> WIPazd hooks:
Any other interaction with Azd environment will not resolve akvs into values. For example, running
azd env get-valueswill display the akvs reference.fix: #3699
fix: