Skip to content

Commit a0c46c8

Browse files
committed
only run the terraform validate script against modules
1 parent b5527cd commit a0c46c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/terraform_validate.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ main() {
1919
# relative to the main script directory
2020
local registry_dir="$script_dir/../registry"
2121

22-
# Get all subdirectories in the registry directory. Code assumes that
23-
# Terraform directories won't begin to appear until three levels deep into
22+
# Get all module subdirectories in the registry directory. Code assumes that
23+
# Terraform module directories won't begin to appear until three levels deep into
2424
# the registry (e.g., registry/coder/modules/coder-login, which will then
2525
# have a main.tf file inside it)
26-
local subdirs=$(find "$registry_dir" -mindepth 3 -type d | sort)
26+
local subdirs=$(find "$registry_dir" -mindepth 3 -path "*/modules/*" -type d | sort)
2727

2828
for dir in $subdirs; do
2929
# Skip over any directories that obviously don't have the necessary

0 commit comments

Comments
 (0)