Skip to content

Commit 9907e7f

Browse files
authored
refactor: use -chdir in terraform_validate wrapper (#2617)
1 parent 24d30aa commit 9907e7f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

infra/build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ OPA_VERSION := 0.52.0
5656
# Updated by Update Tooling Workflow
5757
GCRANE_VERSION := 0.20.2
5858

59-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22.12
59+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22.13
6060
DOCKER_TAG_MAJOR_VERSION_DEVELOPER_TOOLS := $(firstword $(subst ., , $(DOCKER_TAG_VERSION_DEVELOPER_TOOLS)))
6161
DOCKER_TAG_MINOR_VERSION_DEVELOPER_TOOLS := $(shell echo "${DOCKER_TAG_VERSION_DEVELOPER_TOOLS}" | awk -F. '{print $$1"."$$2}')
6262

infra/build/developer-tools/build/scripts/task_wrapper_scripts/terraform_validate

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
# files to validate. This directory is assumed to be a root module.
2020

2121
set -eu
22-
curdir=$(pwd)
23-
cd "${1}"
24-
flock -x /workspace/.terraform.lock -c "terraform init -backend=false >/dev/null"
25-
flock -s /workspace/.terraform.lock -c "terraform validate"
26-
cd "$curdir"
22+
flock -x /workspace/.terraform.lock -c "terraform init -compact-warnings -chdir=$1 -backend=false >/dev/null"
23+
flock -s /workspace/.terraform.lock -c "terraform -chdir=$1 validate"

0 commit comments

Comments
 (0)