mirror of
https://github.com/3bbbeau/tfvars-atlantis-config.git
synced 2024-11-22 05:50:51 +00:00
docs: example config; multienv
This commit is contained in:
parent
d64e4b7183
commit
f3d3731057
26
README.md
26
README.md
@ -38,6 +38,7 @@ environment levels.
|
||||
my-terraform
|
||||
├── main.tf
|
||||
├── dev.tfvars
|
||||
├── prod.tfvars
|
||||
```
|
||||
|
||||
#### Generates the following Atlantis configuration:
|
||||
@ -73,6 +74,7 @@ workflows:
|
||||
extra_args:
|
||||
- -var-file=dev.tfvars
|
||||
apply:
|
||||
steps:
|
||||
- apply
|
||||
my-terraform-prod:
|
||||
plan:
|
||||
@ -82,6 +84,7 @@ workflows:
|
||||
extra_args:
|
||||
- -var-file=prod.tfvars
|
||||
apply:
|
||||
steps:
|
||||
- apply
|
||||
```
|
||||
|
||||
@ -103,8 +106,31 @@ runtime.
|
||||
| `--automerge` | Enable auto merge. | false |
|
||||
| `--autoplan` | Enable auto plan. | false |
|
||||
| `--default-terraform-version` | Default terraform version to run for Atlantis. Default is determined by the Terraform version constraints. | "" |
|
||||
| `--debug` | Enable debug logging. | false |
|
||||
| `--multienv` | Enable injection of environment specific environment variables to each workflow. | false |
|
||||
| `--output` | Path of the file where configuration will be generated, usually `atlantis.yaml`. Default is to write to `stdout` | `stdout` |
|
||||
| `--parallel` | Enables plans and applys to happen in parallel. | false |
|
||||
| `--root` | Path to the root directory of the git repo you want to build config for. Default is current dir. | `.` |
|
||||
| `--use-workspaces` | Whether to use Terraform workspaces for projects. | false |
|
||||
|
||||
## Multienv
|
||||
When `--multienv` is enabled, prefixed environment variables will be
|
||||
stripped of their prefix and injected into each workflow for the duration
|
||||
the workflow is run during plan/apply stages.
|
||||
|
||||
### Example
|
||||
|
||||
_dev.tfvars_:
|
||||
|
||||
- `DEV_FOO_VAR="BAR"` -> `FOO_VAR="BAR"`
|
||||
- `DEV_AWS_ACCESS_KEY="..."` -> `AWS_ACCESS_KEY="..."`
|
||||
|
||||
_stg.tfvars_:
|
||||
|
||||
- `STG_FOO_VAR="BAR"` -> `FOO_VAR="BAR"`
|
||||
- `STG_AWS_ACCESS_KEY="..."` -> `AWS_ACCESS_KEY="..."`
|
||||
|
||||
..and so on.
|
||||
|
||||
Reference:
|
||||
[Multienv](https://www.runatlantis.io/docs/custom-workflows.html#step)
|
||||
|
Loading…
Reference in New Issue
Block a user