Skip to content

Refactor terraform module to use tf_no_var_file_cmds list#37

Merged
AntonioCS merged 2 commits intomainfrom
improvement/terraform-use-no-var-file-cmds-list
Dec 15, 2025
Merged

Refactor terraform module to use tf_no_var_file_cmds list#37
AntonioCS merged 2 commits intomainfrom
improvement/terraform-use-no-var-file-cmds-list

Conversation

@AntonioCS
Copy link
Owner

Summary

  • Replace skip_vars parameter with configurable tf_no_var_file_cmds list
  • Add tf_no_var_file_cmds config variable (default: init validate output state)
  • tf_run now automatically checks if command is in the list
  • Use mb_is_true instead of $(filter $(mb_true),...) for boolean checks
  • Cleaner API - no need to pass skip_vars parameter to targets

Test plan

  • All 16 terraform tests pass (45 assertions)
  • New test test_modules_terraform_run_no_var_file_cmds verifies:
    • validate, init, state list skip -var-file
    • plan includes -var-file

- Add tf_no_var_file_cmds config variable (default: init validate output state)
- tf_run now checks if command is in list instead of using skip_vars parameter
- Use mb_is_true instead of $(filter $(mb_true),...) for boolean checks
- Remove skip_vars parameter from tf_run (cleaner API)
- Update tests to verify commands in list skip -var-file
@AntonioCS AntonioCS merged commit 6a61992 into main Dec 15, 2025
1 check passed
@AntonioCS AntonioCS deleted the improvement/terraform-use-no-var-file-cmds-list branch December 15, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant