Setting Environment Variables With Terraform

Ocasionally when developing cloud serverless functions there’s a need to integrate with other cloud services such as databases, queues or vaults. While create an Azure Function that interacts with a CosmosDB database I found the need to constantly change the the connection string on the function settings.json to match the database created at the time, as I was creating and deleting databases multiple times during development. The solution The solution is to trigger a command line execution to set a CosmosDB connection string as an environment variable during the plans deployment....

August 12, 2023