-
Notifications
You must be signed in to change notification settings - Fork 0
feat(tf): default to tofu and allow switching back to terraform #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request reorganizes the terraform task infrastructure by renaming the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/tf/Taskfile.yml (1)
31-36: Update task descriptions to reflect support for both Terraform and OpenTofu.The task descriptions and examples still reference "Terraform" exclusively, but these tasks now work with either Terraform or OpenTofu. Update the descriptions, summaries, and usage examples to clarify that the actual tool is determined by the
USE_TERRAFORMenvironment variable.For example:
- desc: Initialize Terraform working directory with a backend configuration file. + desc: Initialize Terraform or OpenTofu working directory with a backend configuration file. summary: | - Initializes Terraform directory using the backend config file for the specified environment. + Initializes Terraform/OpenTofu directory using the backend config file for the specified environment. - The `terraform init` arguments can be optionally passed in. + The `terraform init` (or `tofu init`) arguments can be optionally passed in. - Usage: task terraform:init -- ENVIRONMENT [terraform init arguments] + Usage: task terraform:init -- ENVIRONMENT [init arguments]Also applies to: 47-53, 64-70, 81-87
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
Taskfile.yaml(1 hunks)aqua.yaml(1 hunks)lib/tf/Taskfile.yml(5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.yaml
⚙️ CodeRabbit configuration file
**/*.yaml: You are well-versed in writing and reviewing YAML configurations for the Task tool (https://taskfile.dev/).
Provide recommendations for clarity, maintainability, and adherence to Taskfile best practices, including usage of variables, environment blocks, and includes.
These configurations may also contain embedded Bash scripts or commands.
Demonstrate bash scripting best practices such as error handling, secure variable expansions, and clear documentation.
Files:
Taskfile.yamlaqua.yaml
🔇 Additional comments (3)
aqua.yaml (1)
4-4: Verify package version compatibility and check for breaking changes in aqua registry v4.433.0 update.The registry and package versions have been substantially bumped. Before merging, confirm that these updated versions (particularly the large registry jump from v4.78.0 to v4.433.0) are compatible with the current taskit setup and don't introduce breaking changes.
Also applies to: 6-10
Taskfile.yaml (1)
11-12: LGTM! Clean includes reorganization.The rename from
lib/terraformtolib/tfis cleaner and the removal of the redundantaliases: [tf]is appropriate now that the key name itself istf. Migration is complete with no lingering references to the old path—the newlib/tf/Taskfile.ymlis properly in place and ready to go.lib/tf/Taskfile.yml (1)
27-28: Confirm default behavior change and ensure migration documentation.The git history confirms this is a breaking change: the previous implementation hardcoded
terraformfor all tasks, while the new default switches totofuunlessUSE_TERRAFORM=trueis explicitly set. This will affect existing workflows that rely on the Terraform default.Ensure this change is documented in:
- Release notes or changelog
- README or project documentation
- Any deployment/migration guides
The shell syntax is functionally correct, though making the default explicit would improve clarity:
- TF_CMD: - sh: '[ "${USE_TERRAFORM}" = "true" ] && echo "terraform" || echo "tofu"' + TF_CMD: + sh: '[ "${USE_TERRAFORM:-false}" = "true" ] && echo "terraform" || echo "tofu"'This makes
USE_TERRAFORMdefaulting tofalseexplicit, which can help future maintainers understand the intended behavior.
Gowiem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff ![]()
…40) ## what - We're modernized our TF backend strategy to use a single dynamic backend file. - Therefore, we can remove the backend file switching and simplify the `tf:init` command - Additionally, revised the task `desc` and `summary` attributes to highlight ability to use either Terraform or OpenTofu as a follow up to #38 ## why ## references <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for OpenTofu as an alternative tool to Terraform for infrastructure management, selectable via configuration. * **Improvements** * Simplified backend configuration handling by removing fixed backend-file requirements. * Introduced new public configuration variable for specifying custom Terraform variables path location. * Updated task naming conventions and descriptions to reflect dual tool support. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
🤖 I have created a release *beep* *boop* --- ## [0.5.0](v0.4.0...v0.5.0) (2025-11-11) ### Features * add linter configs to the os sync task ([#26](#26)) ([6142651](6142651)) * add terraform refresh command ([#33](#33)) ([2bb2893](2bb2893)) * add workspace selection ([#35](#35)) ([ac8f80c](ac8f80c)) * **pruning:** remove cursor specific task commands. ([#37](#37)) ([8c908c2](8c908c2)) * **tf:** default to tofu and allow switching back to terraform ([#38](#38)) ([71d42fe](71d42fe)) * **tf:** update the tf:init command to work for TF dynamic backends ([#40](#40)) ([0706965](0706965)) ### Bug Fixes * **aqua:** update installer version to pull in checksum fix ([#34](#34)) ([b47b0ef](b47b0ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
what
why
references
Summary by CodeRabbit
Release Notes
Chores
New Features