Commit 8967f0d8 authored by Eytan Hanig's avatar Eytan Hanig Committed by Anton Babenko

Set minimum terraform version to 0.12.6 (fixes circleci) (#390)

parent c7a9cfcf
...@@ -2,19 +2,14 @@ version: 2 ...@@ -2,19 +2,14 @@ version: 2
terraform: &terraform terraform: &terraform
docker: docker:
- image: hashicorp/terraform:0.12.0 - image: hashicorp/terraform:0.12.6
working_directory: /tmp/workspace/terraform working_directory: /tmp/workspace/terraform
jobs: jobs:
validate: validate:
<<: *terraform <<: *terraform
environment:
AWS_DEFAULT_REGION: us-east-1
steps: steps:
- checkout - checkout
- run:
name: Install curl
command: apk add --update curl
# - run: # - run:
# name: Add github.com to ~/.ssh/known_hosts # name: Add github.com to ~/.ssh/known_hosts
# command: mkdir ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts # command: mkdir ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
...@@ -24,12 +19,14 @@ jobs: ...@@ -24,12 +19,14 @@ jobs:
- run: - run:
name: Validate Terraform configurations name: Validate Terraform configurations
command: find . -name ".terraform" -prune -o -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (cd "$m" && terraform validate && echo "√ $m") || exit 1 ; done command: find . -name ".terraform" -prune -o -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (cd "$m" && terraform validate && echo "√ $m") || exit 1 ; done
environment:
AWS_DEFAULT_REGION: us-east-1
- run: - run:
name: Check if Terraform configurations are properly formatted name: Check if Terraform configurations are properly formatted
command: if [[ -n "$(terraform fmt -write=false)" ]]; then echo "Some terraform files need be formatted, run 'terraform fmt' to fix"; exit 1; fi command: if [[ -n "$(terraform fmt -write=false)" ]]; then echo "Some terraform files need be formatted, run 'terraform fmt' to fix"; exit 1; fi
- run: - run:
name: Install tflint name: Install tflint
command: curl -L -o /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.12.1/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin command: wget -O /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.12.1/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin
- run: - run:
name: Check Terraform configurations with tflint name: Check Terraform configurations with tflint
command: tflint command: tflint
......
repos: repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform - repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.23.0 rev: v1.24.0
hooks: hooks:
- id: terraform_fmt - id: terraform_fmt
- id: terraform_docs - id: terraform_docs
......
...@@ -214,7 +214,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway ...@@ -214,7 +214,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| aws | n/a | | aws | ~> 2.23 |
## Inputs ## Inputs
......
terraform {
required_version = "~> 0.12.6"
required_providers {
aws = "~> 2.23"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment