Skip to content

Commit

Permalink
update multi-project README
Browse files Browse the repository at this point in the history
  • Loading branch information
nvthongswansea authored and bkircher committed Nov 16, 2020
1 parent 0eb6cdc commit 2a87a9b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions multi-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,26 @@ This example shows two projects, "a" and "b" split into sub directories.
│   └── example.tf
└── README.md

Each directory contains a simple text file that can be sourced before running `terraform apply`:
Each directory contains a simple text file that can be **sourced (command to source .envrc file: `source .envrc`)** BEFORE running `terraform apply`:

```shell
$ cat project-a/.envrc
$ cd project-a
$ cat .envrc
export GRIDSCALE_TOKEN=project-a-api-token
export GRIDSCALE_URL=https://api.gridscale.io
export GRIDSCALE_UUID=your-user-id
$ source .envrc
$ terraform apply
```

```shell
$ cat project-b/.envrc
$ cd project-b
$ cat .envrc
export GRIDSCALE_TOKEN=project-b-api-token
export GRIDSCALE_URL=https://api.gridscale.io
export GRIDSCALE_UUID=your-user-id

$ source .envrc
$ terraform apply
```

Tip: you can use tools such as direnv(1) to easily switch between environment variables.

0 comments on commit 2a87a9b

Please sign in to comment.