Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ginolatorilla/terraform-template
A Terraform project template for multi-environment configs
https://github.com/ginolatorilla/terraform-template
project-template template template-project terraform
Last synced: 1 day ago
JSON representation
A Terraform project template for multi-environment configs
- Host: GitHub
- URL: https://github.com/ginolatorilla/terraform-template
- Owner: ginolatorilla
- Created: 2024-01-14T06:59:24.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-20T16:42:13.000Z (4 months ago)
- Last Synced: 2024-07-20T17:56:54.672Z (4 months ago)
- Topics: project-template, template, template-project, terraform
- Language: HCL
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gino's Terraform Template
A Terraform IaC template for managing resources across multiple environments.
## Layout
- **environments** contains directories with each being their own full workspaces (i.e. TF states).
- **bases** contains boilerplate TF files that are common in the workspaces that cannot be placed in modules. These are symlink targets.
- **modules** contains directories with TF module definitions.Per environment, each of the following files are not symlinked to the `base` directory:
- `backend.tf`: Backend configuration can only use static values, so you need to configure it specifically for an environment.
- `*.auto.tfvars`: This is where you write environment-specific values for your IaC.## Module versus base
Use modules to group resources or to simplify your Terraform HCL. But for a few resources, you can simply put them in the
base directory and symlink from the environment workspaces.Use the base directory to keep files that would otherwise be copied across environments but impossible to be
a part of a module. For example, providers configurations shouldn't be in the scope of a module, but each environment can
have multiple copies. If there will be variants, use variables to your advantage.