Skip to content
GitLab
Explore
Sign in
Register
This is an archived project. Repository and other project resources are read-only.
nimrod
Terraform pre-commit
Compare revisions
3d310bce8ddc932afeed57cc8339e52716ca2acd to 58225fae85fb644ba3c825180014e00e6a531f24
Commits on Source (2)
First iteration.
· 1eefe341
nimrod
authored
Apr 29, 2021
Still need to skip modules that were already checked.
1eefe341
Bumped minor version.
· 58225fae
nimrod
authored
Apr 29, 2021
58225fae
Hide whitespace changes
Inline
Side-by-side
VERSION
0 → 100644
View file @
58225fae
0.1.0
\ No newline at end of file
tff
View file @
58225fae
...
...
@@ -2,3 +2,8 @@
set
-eu
command
-v
terraform
>
/dev/null
||
{
echo
"Can't find the terraform binary, aborting."
>
&2
;
exit
1
;
}
for
i
in
"
$@
"
do
terraform
fmt
"
$(
dirname
"
$i
"
)
"
||
true
done
tfv
View file @
58225fae
...
...
@@ -2,3 +2,14 @@
set
-eu
command
-v
terraform
>
/dev/null
||
{
echo
"Can't find the terraform binary, aborting."
>
&2
;
exit
1
;
}
export
TF_INPUT
=
'0'
export
TF_IN_AUTOMATION
=
'1'
for
i
in
"
$@
"
do
terraform init
-backend
=
false
"
$(
dirname
"
$i
"
)
"
||
{
code
=
'1'
;
continue
;
}
terraform validate
"
$(
dirname
"
$i
"
)
"
||
code
=
'1'
done
exit
"
${
code
:-
0
}
"