Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.35 KB

envrc.md

File metadata and controls

52 lines (31 loc) · 1.35 KB

.envrc

Use this to quickly jump between different environments using script commands and environment variables.

Install DirEnv which will prompt you to approve the .envrc to auto-execute when you cd into a directory.

Commands

Add the direnv hook to your shell $HOME/.bashrc or similar:

eval "$(direnv hook bash)"

cd to a dir with a .envrc and then run this allow it to execute each time:

direnv allow

To edit, will auto-approve when you save and exit:

direnv edit

Advanced Examples

General - Ansible, Cloudflare, Docker, GitHub, Terraform

.envrc

AWS

.envrc-aws

GCP

.envrc-gcp

Kubernetes

.envrc-kubernetes - Kubernetes-configs repo

or

.envrc-kubernetes - DevOps-Bash-tools repo

Terraform

.envrc-terraform