It would be great to capture some of these in this repo to ensure that they are followed and changed when versioned get updated.
This might take a tool such as common-repo to accomplish.
Enforcement of new standardards
We would also like to enforce the standards laid out here. For example, if we have a standard that says all files must use kebob-case for their name, then having a pre-commit check to enforce that will ensure that people follow it.
Some obvious checks:
output must only show up in tf files that start with outputs.
variable must only show up in tf files that start with variables.
local duplication of variable without modification
the usage of resource type in a resource name -- i.e. resource "aws_iam_policy" "pod_policy" {
Overview
To this end, we would like to have an easy way for developers to ensure that they are following the standards set forth in this repo.
Two things that we would like to accomplish:
Existing hooks
Our existing terraform repositories have the following pre-commit hooks:
It would be great to capture some of these in this repo to ensure that they are followed and changed when versioned get updated.
This might take a tool such as common-repo to accomplish.
Enforcement of new standardards
We would also like to enforce the standards laid out here. For example, if we have a standard that says all files must use
kebob-case
for their name, then having a pre-commit check to enforce that will ensure that people follow it.Some obvious checks:
outputs.
variables.
resource "aws_iam_policy" "pod_policy" {