Skip to content

Accessing Azure Key Vault #3397

Answered by nils-a
mandalorianbob asked this question in Q&A
Discussion options

You must be logged in to vote

Since downloading the certificate is possible using Azure CLI it should be possible using Cake.AzureCli.

I have not tested this, though.

In script

#addin nuget:?package=Cake.AzureCli&version=1.2.1

Task("Default")
.Does(() => {
   // probably need to authenticate, first...
   Az().Keyvault.Secret.Download(new AzKeyvaultSecretDownloadSettings 
   {
      File = "./my-cool-cert.pfx"
   });
});

In Frosting (add a reference to Cake.AzureCli NuGet):

[TaskName("Default")]
public class DefaultTask : FrostingTask<BuildContext>
{
    public override void Run(BuildContext context)
    {
        // probably need to authenticate, first...
        context.Az().Keyvault.Secret.Download(new AzKeyvaultSe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mandalorianbob
Comment options

Answer selected by mandalorianbob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants