-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 9) Terraform style conventions {#adr_0009} | ||
|
||
Date: 2023-05-16 | ||
|
||
## Status | ||
|
||
proposed | ||
|
||
## Context | ||
|
||
When adopting Terraform as part of our infrastructure as code setup in the past, we did not settle on any code style format conventions. Since there is a built-in command to Terraform to streamline source files according to the officially recommended [style conventions](https://developer.hashicorp.com/terraform/language/syntax/style), we could make use of this to make our configuration more readable, especially for code review in pull requests. | ||
|
||
## Decision | ||
|
||
We use `terraform fmt` with it's defaults to auto-format files containing the Terraform Configuration Language. For now this has to be done manually - git hooks to run it automatically and/or a CI test to check for it are welcome. | ||
|
||
## Consequences | ||
|
||
To streamline all of the existing configuration we create a PR which formats all of the code. As mentioned above, right now it's up to the engineers to run this step on their machines before checking in Terraform code. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters