Skip to content

Commit e35ba2c

Browse files
committed
run preflight validation before plan execution
1 parent c14d0ec commit e35ba2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/modules/terraform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ def main() -> None:
553553
for f in variables_files:
554554
variables_args.extend(["-var-file", f])
555555

556+
preflight_validation(terraform, terraform_binary, project_path, checked_version, variables_args)
557+
556558
# only use an existing plan file if we're not in the deprecated "planned" mode
557559
if plan_file and state != "planned":
558560
if not any([os.path.isfile(project_path + "/" + plan_file), os.path.isfile(plan_file)]):
@@ -585,8 +587,6 @@ def main() -> None:
585587
out = plan_stdout
586588
err = plan_stderr
587589

588-
preflight_validation(terraform, terraform_binary, project_path, checked_version, variables_args)
589-
590590
try:
591591
planned_state = terraform.show(plan_file_to_apply)
592592
if planned_state is not None:

0 commit comments

Comments
 (0)