Terraform - Securing the values in KeyVault Secret

Hello Team,

Good day!

Hope you are fine & staying safe.

We have been using Terraform on our Azure environment.

I am stuck in one area where I have the attached sample main.txt and variables.txt and I would like to configure Azure KeyVault so that I could use the secrets and store the values in KeyVault. The Terraform script has to be deployed in AzureDevOps and I do not want anyone else to peek into the values other than me and the infrastructure team in Wipfli. Hence we are trying to perform this action. The requirement is to fetch the values from the Keyvault during deployment

I am actually having issues in configuring Terraform with KeyVault. Could you please help me with this?

In the attached variables file, you can see the variables masked as xxxx and those are the values I would like to store in Keyvault.

I looked into this article https://www.terraform.io/docs/providers/azurerm/d/key_vault_secret.html but finding it difficult to incorporate this into my script.

I have looked into various articles online (Google) but could not find a solution.

Could you please help me in this and update me where and how to implement this? If you have any recent samples to incorporate this in the Terraform script, please let me know. :frowning:

Thank you,


Praveen Shankar