Repository for the Video Hearings Core Infrastructure.
Repository for the Video Hearings variable-to-secret mappings.
- Go to the vh-setup repo and update the corresponding JSON secrets file.
- If this is for a new app, create a new file with JSON-formatted secret references, as per the existing apps, names as the corresponding Key Vault, suffixed with "-secrets".
- Format your value as
[
{
{ "name": "NotifyConfiguration--ApiKey", "value": "$(notify-api-key)" }, # Key Vault Secret name, Key Vault Secret value
}
]
- IMPORTANT! Terraform plan will fail if there is no more than 1 secret in each mapping file, because it will be passed as an object rather than a list to the input variable.
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 = Get-Content .\vh-scheduler-jobs-secrets.json | 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
}