Skip to content

Commit

Permalink
Output var.name (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
hootieben authored and antonbabenko committed Jul 21, 2019
1 parent 979f591 commit 17db88d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ terraform: &terraform
jobs:
validate:
<<: *terraform
environment:
AWS_DEFAULT_REGION: us-east-1
steps:
- checkout
- run:
name: Install curl
command: apk add --update curl
# - run:
# name: Add github.com to ~/.ssh/known_hosts
# command: mkdir ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- run:
name: terraform init
command: terraform init -input=false
command: find . -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (cd "$m" && terraform init -input=false -backend=false) || exit 1; done
- run:
name: Validate Terraform configurations
command: find . -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (terraform validate -check-variables=false "$m" && 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
- run:
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
Expand Down
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -624,3 +624,7 @@ output "azs" {
value = var.azs
}

output "name" {
description = "The name of the VPC"
value = var.name
}

0 comments on commit 17db88d

Please sign in to comment.