Setting secrets ¶
Secret values used by the Benefits application (such as API keys, private keys, certificates, etc.) are stored in an Azure Key Vault for each environment.
To set a secret, you can use the Azure portal or the Azure CLI.
There are helper scripts under terraform/secrets which build up the Azure CLI command, given some inputs. The usage is as follows:
First, make sure you are set up for local development and that you are in the terraform/secrets directory.
cd terraform/secrets
To set a secret by providing a value:
./value.sh <environment_letter> <secret_name> <secret_value>
where environment_letter is D for development, T for test, and P for production.
To set a secret by providing the path of a file containing the secret (useful for multi-line secrets):
./file.sh <environment_letter> <secret_name> <file_path>
To verify the value of a secret, you can use the helper script named read.sh.
./read.sh <environment_letter> <secret_name>
Refreshing secrets ¶
Container Apps pick up new key vault values within 30 minutes without intervention. You can trigger an immediate reevaluation by saving a new revision (Azure > Container App > Application < Containers > Save as a new revision) or stopping and restarting the container app.