Skip to content

Commit

Permalink
feat: Add recursive and directory parameters in lint-terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
rdublenych authored and edahlseng committed Nov 27, 2019
1 parent fdd0b50 commit ffcf380
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion sources/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ jobs:
path: ./linting-results
lint-terraform:
parameters:
directory:
type: string
default: "."
recursive:
type: boolean
default: true
terraform-image-tag:
type: string
executor:
Expand All @@ -450,7 +456,15 @@ jobs:
- get-workspace
- run:
name: Linting Terraform files
command: terraform fmt -check=true
command: |
cd << parameters.directory >>
recursive_arg=""
if << parameters.recursive >>; then
recursive_arg="-recursive"
fi
terraform fmt -check=true $recursive_arg
lint-yaml:
executor: node
steps:
Expand Down

0 comments on commit ffcf380

Please sign in to comment.