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
Marc Cataford 494bb4d681
refactor: pure bash instead of python scripts (#9)
docs: instructions around tooling

infra: fix linting and CI
2022-09-23 01:11:41 -04:00

19 lines
423 B
Bash

#!/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
)