azure-cli-extensions
azure-cli-extensions copied to clipboard
[FR] `az network bastion ssh --auth-type ssh-key` Ability to point to Key Vault secret
Describe the bug
Would be great if az network bastion ssh --auth-type ssh-key
could be pointed to a Key Vault secret containing the SSH private key, in addition to current ability to point to a local file.
How I'd like it to work:
az network bastion ssh --subscription '<bastion_subsciption_id>' `
--resource-group '<bastion_resource_group>' `
--name '<bastion_name>' `
--target-resource-id '/subscriptions/<target_subscription_id>/resourceGroups/<target_resource_group>/providers/Microsoft.Compute/virtualMachines/<target_vm_name>' `
--auth-type 'ssh-key' --username '<target_vm_username>' --ssh-key 'https://<key_vault_name>.vault.azure.net/secrets/<secret_name>'
Related command
az network bastion ssh --auth-type ssh-key
Errors
Warning: Identity file https://<key_vault_name>.vault.azure.net/secrets/<secret_name> not accessible: No such file or directory.
Issue script & Debug output
None
Expected behavior
Point to Key Vault secret using Azure CLI authenticated context should also work.
Environment Summary
Not relevant.
Additional context
No response
Thank you for opening this issue, we will look into it.
@necusjz, please help assign this issue to bastion team.