Repository for the Video Hearings Core Infrastructure.
- Go to the ADO Library and edit
vh-key-vault-vars
group - Add a new variable with the value in the format of an array of object. Call the variable the name of the key vault plus
-secrets
You must have at least two secrets to add in the object - Format your value as
[
{
"name": "NotifyConfiguration--secret-name", # Key Vault Secret
"value": "$(secret-test-ba)" # Key Vault Value
}
]
- Go to the ADO Library and edit
vh-key-vault-vars
group - Copy out the current value and format to JSON.
- Add your secret as per the above.
If the ADO Library you are getting secrets from is not already included then you will need to add it to the list.
Go to pipeline-steps\ado-vars.yaml
and add the group to the top of the list.
If there is a new Key Vault that is added to the Terraform then you can add a new group to the powershell.
- Go to
pipeline-steps\ado-vars-to-tf.yaml
- Add in the
env
you new variable, where{VAULT NAME}
is the vault name and{ADO LIBRARY VAR NAME}
is the variable name from the library.
{VAULT NAME}_secrets: $({ADO LIBRARY VAR NAME})
- Add in the powershell at the bottom a new block. Replace the respective names below to your required name.
$sj_obj = $($env:scheduler_jobs_secrets) | ConvertFrom-Json
$secrets_obj = $sj_obj
if ($null -ne $secrets_obj) {
$scheduler_jobs_secrets = [pscustomobject]@{
"key_vault_name" = "vh-scheduler-jobs"
"secrets" = $secrets_obj
}
$all_secrets += $scheduler_jobs_secrets
}