Configuration as Code
Terrateam embraces configuration as code. As a result, all of Terrateam can be configured via a config.yml
. This file is located in a directory named .terrateam
at the root of your Terraform repository:
The Terrateam configuration file uses YAML syntax. While this configuration file is not required for Terrateam to operate, it is required if you choose to customize the Terrateam defaults.
Authoritative Source
Depending on what’s being configured, the Terrateam backend will pull configuration from one of the following branches:
- The source branch of the pull request containing the proposed changes
- The default branch of the repository usually named
main
ormaster
Source Branch
Default Branch
The following configurations are pulled from the default branch of your Terraform repository:
Creating a Configuration File
- Create a
.terrateam
directory at the root of your Terraform repository. Don’t forget the period. - Create a
config.yml
file inside the.terrateam
directory:.terrateam/config.yml
- Create any customizations you may require.
For example, the following configuration will automatically merge a pull request and delete the source branch after a successful Apply operation. These behaviors are not enabled by default. Adding this configuration to your repository changes the way Terrateam operates.
enabled: true
automerge:
enabled: true
delete_branch: true
- Commit your
config.yml
file and push - Terrateam will use your
config.yml
on the next Terrateam operation
Full Configuration File
See a complete config.yml
in our full
example.
Configuration Reference
See our Configuration Reference for an explanation of all keys.