This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
lambda-boilerplate/script/terraform-lint

20 lines
423 B
Text
Raw Permalink Normal View History

#!/bin/bash
# Lints and formats terraform files.
(
TFLINT_PATH=$(realpath ./.tflint/tflint)
for PROJECT in "bootstrap" "app"
do
(
PROJECT_ROOT=./infrastructure/$PROJECT
echo ">>> Linting $PROJECT_ROOT"
cd $PROJECT_ROOT
terraform init
$TFLINT_PATH # --var-file ../variables.tfvars
terraform fmt -write=true
)
done
)