Is there a way to upload YAML file in Azure Key Vault programatically?

Navin Prasad Kumar 81 Reputation points
2022-06-30T13:23:35.327+00:00

We are using a groovy script to store secrets and configs as YAML files in the SCM repo. Now, we are planning to move the secrets from SCM to the Azure Key Vault(AKV). So, I would like to know whether storing the YAML files in the AKV is possible or not?

Here is the structure of one of the YAML files,

- xxx:  
    name: xxxx  
    data1: xxxx  
    data2: xxxx  
- yyy:  
    name: xxxx  
    data1: xxxx  
    data2: xxxx  
- zzz:  
    name: xxxx  
    data1: xxxx  
    data2: xxxx  
Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,375 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,811 Reputation points Microsoft Employee
    2022-06-30T23:04:12.763+00:00

    @Navin Prasad Kumar
    Thank you for your post!

    The Azure Key Vault enables Microsoft Azure applications and users to store and use several types of secret, key, and certificate data. The storage of a YAML file isn't supported within the Key Vault. If the secrets, you are currently referencing within your YAML file need to be moved to the Key Vault, you can import them by:

    Add a secret to Key Vault

    1. Navigate to your new key vault in the Azure portal
    2. On the Key Vault settings pages, select Secrets.
    3. Click on Generate/Import.

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.