-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Run terraform 0.12upgrade * Update default example * Update s3 example * Update s3-publish example * Update vpc example * Use native types * Use new splat syntax in output * Replace makefile with taskfile * Remove abspath usage in examples
- Loading branch information
Kristian
authored
Jul 30, 2019
1 parent
a9c85d2
commit fa866a3
Showing
11 changed files
with
273 additions
and
175 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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
dist: trusty | ||
language: go | ||
sudo: false | ||
|
||
before_install: | ||
- curl -fSL "https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip" -o terraform.zip | ||
- sudo unzip terraform.zip -d /opt/terraform | ||
- sudo ln -s /opt/terraform/terraform /usr/bin/terraform | ||
- rm -f terraform.zip | ||
- curl -fSL https://github.com/wata727/tflint/releases/download/v0.7.0/tflint_linux_amd64.zip -o tflint.zip | ||
- sudo unzip tflint.zip -d /opt/tflint | ||
- sudo ln -s /opt/tflint/tflint /usr/bin/tflint | ||
- rm -f tflint.zip | ||
go: | ||
- 1.12.x | ||
|
||
env: | ||
- GO111MODULE=on | ||
|
||
notifications: | ||
email: false | ||
|
||
before_script: | ||
- curl -fSL "https://releases.hashicorp.com/terraform/0.12.3/terraform_0.12.3_linux_amd64.zip" -o terraform.zip | ||
- sudo unzip terraform.zip -d /opt/terraform | ||
- sudo ln -s /opt/terraform/terraform /usr/bin/terraform | ||
- rm -f terraform.zip | ||
|
||
script: | ||
- make | ||
- go get -u -v github.com/go-task/task/v2/cmd/task && task test |
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,48 @@ | ||
version: '2' | ||
|
||
tasks: | ||
default: | ||
cmds: | ||
- task: test | ||
|
||
test: | ||
desc: Run tests for all terraform directories. | ||
silent: true | ||
env: | ||
AWS_DEFAULT_REGION: eu-west-1 | ||
DIRECTORIES: | ||
sh: find . -type f -name '*.tf' -not -path "**/.terraform/*" -exec dirname {} \; | sort -u | ||
cmds: | ||
- | | ||
BOLD=$(tput bold) | ||
NORM=$(tput sgr0) | ||
for d in $DIRECTORIES; do | ||
echo "${BOLD} $d:${NORM}" | ||
cd $d | ||
if ! terraform fmt -check=true -write=true -list=false -recursive=false; then | ||
echo " ✗ terraform fmt" && exit $? | ||
else | ||
echo " √ terraform fmt" | ||
fi | ||
if ! terraform init -backend=false -input=false -get=true -get-plugins=true -no-color > /dev/null; then | ||
echo " ✗ terraform init" && exit $? | ||
else | ||
echo " √ terraform init" | ||
fi | ||
if ! terraform validate > /dev/null; then | ||
echo " ✗ terraform validate" && exit $? | ||
else | ||
echo " √ terraform validate" | ||
fi | ||
done | ||
e2e: | ||
desc: Run the end 2 end test suite. | ||
silent: true | ||
cmds: | ||
- go test -v ./... -timeout=1h | ||
|
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
Oops, something went wrong.