Skip to main content

Using dotenv (.env) files with Atlas

A .env file is a simple text file used to store environment variables for applications. It helps developers manage configuration settings, such as database credentials, API keys, and other sensitive information, without hardcoding them into the source code. By using a .env file, developers can keep their codebase clean, secure, and easily configurable across different environments.

For developers who want to use .env files with Atlas, there are two ways users can do so through the standard Atlas HCL configuration file:

Debugging Atlas HCL Using print()

With features such as composite schemas, custom rules, schema linting, and more, the atlas.hcl file can get complex. To validate or debug the file, you can use print statements as you commonly would with other languages.