|
|
|
|
|
by iliaxj
488 days ago
|
|
We use a single codebase to deploy to multiple environments. The setup looks like this: - root
-- /envs
--- / dev.tfvars
--- / prod.tfvars
- main.tf
When it gets deployed by the CICD, the right tfvars file is passed in via the -var-file parameter. A standard `env` var is also passed in, and used as a basis for a naming convention. Backend is also set by the pipeline.The rationale here is that our environments should be almost the same between them, and any variations should be accomplished by parameterization. Modules are kept either in separate repos, if they need to be shared between many workspaces, or under the `modules` subfolder. |
|
https://www.weekly.tf/