Andrey Souza
02/09/2025, 5:23 PMkapa.ai
02/09/2025, 5:23 PM.env
file with the Airbyte Terraform provider, you can follow these steps: 1. Create a .env
file two folders above your Terraform folder with the necessary credentials. 2. In your Terraform configuration directory, you can source the environment variables from the .env
file using the following command: set -o allexport && source ../../.env && set +o allexport
This command will load the environment variables from your .env
file into your shell session. 3. In your Terraform files (like <http://variables.tf|variables.tf>
), you can then reference these environment variables using the TF_VAR_
prefix. For example, if you have a variable named DB_PASSWORD
in your .env
file, you can reference it in Terraform as TF_VAR_DB_PASSWORD
. 4. Make sure to run the sourcing command before executing any Terraform commands. Remember to re-run the sourcing command if you make any changes to the .env
file. This approach allows you to keep your sensitive credentials separate from your Terraform configuration files while still being able to use them in your Airbyte resource definitions. [End-to-end RAG using Airbyte's Terraform, dbt, Notion, BigQuery and Pinecone](https://airbyte.com/tutorials/end-to-end-rag-using-airbytes-terraform-dbt-notion-bigquery-and-pinecone) provides an example of this approach in the "Adding Configuration Values" section.