-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to force unlock TF state and fix digest value of lock fil…
…e in DynamoDB (#235)
- Loading branch information
Showing
5 changed files
with
233 additions
and
21 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,32 @@ | ||
#! /usr/bin/env bash | ||
|
||
# DOC: Format terraform, python, and shell script files. | ||
|
||
if which -s terraform; then | ||
echo "Formatting Terraform files" | ||
terraform fmt -recursive -write | ||
else | ||
echo "Can not find the terraform binary. Please install Terraform first." | ||
exit 1 | ||
fi | ||
|
||
if which -s shfmt; then | ||
echo "Formatting shell scripts" | ||
shfmt -bn -ci -i 2 -w -l $(shfmt -f .) | ||
else | ||
echo "Could not find the shfmt binary. Please install shfmt first." | ||
exit 1 | ||
fi | ||
|
||
if which -s yapf; then | ||
echo "Formatting python files" | ||
yapf \ | ||
--verbose \ | ||
--style='{based_on_style: google, SPLIT_BEFORE_FIRST_ARGUMENT:true}' \ | ||
--in-place \ | ||
--recursive \ | ||
. | ||
else | ||
echo "Could not find yapf. Please install it first." | ||
exit 1 | ||
fi |
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
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
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
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