Skip to content

Conversation

josh-padnick
Copy link
Contributor

@josh-padnick josh-padnick commented Sep 5, 2025

Summary by CodeRabbit

  • Documentation
    • Added a new guide outlining our OpenTofu adoption approach, supported versions, compatibility strategy, upgrade semantics, and feature-adoption principles.
    • Documented current feature coverage (notably cross-variable validation), migration guidance for version bumps, and plans for periodic compatibility reviews and updates.
    • Updated site navigation to add the new guide under Library > Concepts > Principles.

Copy link

vercel bot commented Sep 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 29, 2025 5:35pm

Copy link
Contributor

coderabbitai bot commented Sep 5, 2025

Walkthrough

Adds a new documentation page outlining Gruntwork’s OpenTofu adoption principles and updates the docs sidebar to link to it under Library Concepts → Principles. Changes are content and navigation only; no runtime code or API behavior modified. (50 words)

Changes

Cohort / File(s) Summary of Changes
Docs: OpenTofu Adoption Principles
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md
New documentation file describing Gruntwork’s OpenTofu adoption approach: core principle to enable smooth Terraform→OpenTofu transition; target versions (OpenTofu 1.9; Terraform compatibility up to 1.5.7); upgrade semantics (major-version bumps when requiring newer OpenTofu); feature-adoption strategy (.tf preferred, .tofu discouraged, Terraform-only not supported); current cross-variable validation status and future compatibility review plans.
Sidebar: Add Docs Link
sidebars/docs.js
Added a new sidebar item labeled "Support Smooth OpenTofu Adoption" (id 2.0/docs/library/concepts/principles/opentofu-adoption) into Library Concepts → Principles after "Quality In Depth".

Sequence Diagram(s)

Not applicable — changes are documentation and sidebar navigation only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A doc appears to light the way,
Guiding Terraform paths to OpenTofu day.
Sidebar shines, a quiet guide,
Small words placed for the shifting tide.
Welcome notes—easy steps, side by side. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Add a Library principle for supporting smooth OpenTofu adoption” clearly summarizes the primary change of introducing a new documentation principle for OpenTofu adoption without extraneous detail. It is concise and specific, focusing on the addition of a principle rather than listing file paths or unrelated changes. This makes it easily understandable for teammates scanning the pull request history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch opentofu-migration

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
sidebars/docs.js (1)

660-664: Fix nav label spacing to match the doc title.

Use "Support Smooth OpenTofu Adoption" (with a space) for consistency with the page H1 and title case used elsewhere.

-          {
-            label: "Support SmoothOpenTofu Adoption",
-            type: "doc",
-            id: "2.0/docs/library/concepts/principles/opentofu-adoption",
-          },
+          {
+            label: "Support Smooth OpenTofu Adoption",
+            type: "doc",
+            id: "2.0/docs/library/concepts/principles/opentofu-adoption",
+          },
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (2)

3-3: Verify “co-founder” claim and tighten wording.

Please confirm whether “co-founder” is accurate. If not, consider “founding contributor.” Also minor style fixes (hyphenate “open-source,” add “the”).

-Gruntwork is a co-founder and active maintainer of [OpenTofu](https://opentofu.org/), the open source successor to HashiCorp Terraform. We proudly support OpenTofu because we believe that core infrastructure is too critical to run on anything but proven open source technology. In line with this philosophy, Gruntwork IaC Library aims to provide first-class OpenTofu support.
+Gruntwork is a founding contributor and active maintainer of [OpenTofu](https://opentofu.org/), the open-source successor to HashiCorp Terraform. We proudly support OpenTofu because we believe core infrastructure is too critical to run on anything but proven open-source technology. In line with this philosophy, the Gruntwork IaC Library aims to provide first-class OpenTofu support.

36-42: Optional: add a cross-reference to the compatibility doc.

Link to “OpenTofu & Terraform Compatibility” for deeper details.

 ### Cross-variable validation
@@
 - It addresses direct customer feedback about configuration errors
+
+See also: [OpenTofu & Terraform Compatibility](/2.0/docs/library/architecture/opentofu-terraform-compatibility).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b95f1ca and ec1c8df.

📒 Files selected for processing (2)
  • docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (1 hunks)
  • sidebars/docs.js (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md

[grammar] ~3-~3: There might be a mistake here.
Context: ...technology. In line with this philosophy, Gruntwork IaC Library aims to provide f...

(QB_NEW_EN)


[grammar] ~5-~5: Ensure spelling is correct
Context: ...neering.stackexchange.com/a/388236) and competiting priorities. This means we must balance ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ion](#cross-variable-validation) below.) 2. **OpenTofu-specific Features (Discouraged)...

(QB_NEW_EN)


[grammar] ~31-~31: Ensure spelling is correct
Context: ....tf files. But doing this means extra mintenance, so we will use this approach sparingly...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~31-~31: There might be a mistake here.
Context: ... use this approach sparingly, if at all. 3. Terraform-specific Features: We do not...

(QB_NEW_EN)


[grammar] ~38-~38: There might be a mistake here.
Context: ...n variable validation blocks) because: - It significantly improves module usabili...

(QB_NEW_EN)


[grammar] ~45-~45: There might be a mistake here.
Context: ...nd OpenTofu ecosystems develop. We will: - Regularly review compatibility requireme...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Validate generated content
  • GitHub Check: validate_build
🔇 Additional comments (2)
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (2)

21-23: Reconcile Terraform version policy with feature claims.

You state “we do not explicitly test or support Terraform versions beyond 1.5.7,” but later claim cross-variable validation works in “Terraform 1.9+.” Please align these statements (either adjust the policy or the feature claim).

Suggested edits:

-- **OpenTofu**: We support OpenTofu 1.9 for new features that provide significant customer value.
+- **OpenTofu**: We support OpenTofu 1.9+ for new features that provide significant customer value.
 - **Terraform**: We maintain compatibility with Terraform versions that support the same language features we use, but do not explicitly test or support Terraform versions beyond 1.5.7
+  .
@@
-- It works identically in both OpenTofu 1.9+ and Terraform 1.9+
+- It works identically in OpenTofu 1.9+ and in Terraform versions that implement the same feature.

If you do intend to support Terraform ≥ 1.9, update the policy bullet accordingly.

Also applies to: 40-41


24-24: Use the correct version-constraint block for OpenTofu.

OpenTofu may require specifying versions in the “tofu” block (Terraform uses “terraform”). Recommend neutral wording or explicitly mentioning both.

-When we upgrade a module to require a newer version of OpenTofu, we explicitly require that version in the `terraform` block of the module, publish a major module version release in the related git repo, and include clear migration guidance, if applicable.
+When we upgrade a module to require a newer version of OpenTofu, we explicitly require that version using the appropriate version-constraint block (e.g., `tofu` for OpenTofu, `terraform` for Terraform), publish a major module version release in the related git repo, and include clear migration guidance, if applicable.

Comment on lines 5 to 6
But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236) and competiting priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](be-judicious-with-new-features.md).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix typos and link; remove stray leading space.

“competiting” → “competing”; add comma after the link; make the relative link explicit with “./”.

- But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236) and competiting priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](be-judicious-with-new-features.md).
+But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236), and competing priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](./be-judicious-with-new-features.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236) and competiting priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](be-judicious-with-new-features.md).
But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236), and competing priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](./be-judicious-with-new-features.md).
🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Ensure spelling is correct
Context: ...neering.stackexchange.com/a/388236) and competiting priorities. This means we must balance ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In docs/2.0/docs/library/concepts/principles/opentofu-adoption.md around lines
5-6, fix typos and punctuation: change “competiting” to “competing”, add a comma
after the external link, make the relative link explicit by prefixing it with
"./be-judicious-with-new-features.md", and remove the stray leading space at the
start of the paragraph; update the sentence accordingly so it reads cleanly with
the corrected spelling, comma, and relative link.

What can I say, the AI had good feedback!
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (1)

5-6: Remove stray leading space; add comma after link; make relative link explicit.

Also aligns with an earlier review on this paragraph.

- But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236) and competing priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](be-judicious-with-new-features.md).
+But in the real world, platform engineers face endless module and tooling upgrades, [yak shaves](https://softwareengineering.stackexchange.com/a/388236), and competing priorities. This means we must balance our desire to embrace the latest OpenTofu functionality with our separate principle of [being judicious with new features](./be-judicious-with-new-features.md).
🧹 Nitpick comments (5)
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (5)

3-3: Add missing article for readability.

“Gruntwork IaC Library” reads a bit abrupt; add “the.”

-Gruntwork IaC Library aims to provide first-class OpenTofu support.
+The Gruntwork IaC Library aims to provide first-class OpenTofu support.

15-17: Standardize ordered-list numbering style.

Use “1.” for all items to auto-number consistently across sections.

-2. **OpenTofu-specific Features (Discouraged)**: Features that only work in OpenTofu should be placed in `.tofu` files and used sparingly. Terraform ignores `.tofu` files, while OpenTofu reads both `.tf` and `.tofu`. Avoid duplicating the same blocks across both extensions; prefer additive enhancements in `.tofu`. This approach increases maintenance cost, so we will use it only when the user benefit is clear.
-3. **Terraform-specific Features**: We do not support Terraform-specific features.
+1. **OpenTofu-specific Features (Discouraged)**: Features that only work in OpenTofu should be placed in `.tofu` files and used sparingly. Terraform ignores `.tofu` files, while OpenTofu reads both `.tf` and `.tofu`. Avoid duplicating the same blocks across both extensions; prefer additive enhancements in `.tofu`. This approach increases maintenance cost, so we will use it only when the user benefit is clear.
+1. **Terraform-specific Features**: We do not support Terraform-specific features.

Also applies to: 30-32


24-24: Minor wording nit: “git repo” → “repository.”

Slightly more formal and tool-agnostic.

-... publish a major module version release in the related git repo, and include clear migration guidance, if applicable.
+... publish a major module version release in the related repository, and include clear migration guidance, if applicable.

30-30: Punctuation: add comma after “e.g.” and tighten phrasing.

-1. **Dual-compatible features (Preferred)**: Features that work identically in both OpenTofu and Terraform should be placed in `.tf` files. (e.g. see [cross-variable validation](#cross-variable-validation) below.)
+1. **Dual-compatible features (Preferred)**: Features that work identically in both OpenTofu and Terraform should be placed in `.tf` files (e.g., [cross-variable validation](#cross-variable-validation) below).

31-31: Normalize capitalization: “Features” → “features.”

Matches “Dual-compatible features” style.

-2. **OpenTofu-specific Features (Discouraged)**:
+2. **OpenTofu-specific features (Discouraged)**:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ec1c8df and 62336c1.

📒 Files selected for processing (1)
  • docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md

[grammar] ~3-~3: There might be a mistake here.
Context: ...technology. In line with this philosophy, Gruntwork IaC Library aims to provide f...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ion](#cross-variable-validation) below.) 2. **OpenTofu-specific Features (Discouraged)...

(QB_NEW_EN)


[grammar] ~38-~38: There might be a mistake here.
Context: ...n variable validation blocks) because: - It significantly improves module usabili...

(QB_NEW_EN)


[grammar] ~45-~45: There might be a mistake here.
Context: ...nd OpenTofu ecosystems develop. We will: -- Regularly review compatibility and ou...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Validate generated content
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: validate_build

yhakbar
yhakbar previously approved these changes Sep 29, 2025
Copy link
Contributor

@yhakbar yhakbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can take or leave all of these NITs

josh-padnick and others added 5 commits September 29, 2025 10:29
@josh-padnick josh-padnick enabled auto-merge (squash) September 29, 2025 17:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (4)
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (4)

16-16: Use consistent terminology (“OpenTofu‑only features”).

Unify “OpenTofu‑specific features” (Line 16) with “OpenTofu‑only Features” (Line 28) for consistency.

-2. When we do adopt OpenTofu-specific features, we use `.tofu` files and provide clear migration guidance.
+2. When we do adopt OpenTofu-only features, we use `.tofu` files and provide clear migration guidance.

Also applies to: 28-28


27-27: Punctuation nit: add comma after “e.g.”

Improves readability.

-1. **Dual-compatible features (Preferred)**: Features that work identically in both OpenTofu and Terraform should be placed in `.tf` files. (e.g. see [cross-variable validation](#cross-variable-validation) below.)
+1. **Dual-compatible features (Preferred)**: Features that work identically in both OpenTofu and Terraform should be placed in `.tf` files (e.g., see [cross-variable validation](#cross-variable-validation) below).

1-1: Optional: align page title with sidebar label.

If you want the page title to match the nav label, consider:

-# Prefer OpenTofu; Minimize Friction
+# Support Smooth OpenTofu Adoption

Alternatively add frontmatter title: instead of changing H1.


18-18: Optional: cross‑link related page for discoverability.

Add a pointer to the compatibility doc.

 ### OpenTofu/Terraform version support
+
+See also [OpenTofu & Terraform Compatibility](../../architecture/opentofu-terraform-compatibility.md).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 70522cb and 967e5ff.

📒 Files selected for processing (2)
  • docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (1 hunks)
  • sidebars/docs.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: validate_build
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Validate generated content
🔇 Additional comments (2)
docs/2.0/docs/library/concepts/principles/opentofu-adoption.md (1)

20-22: Resolve version inconsistency (Terraform 1.5.7 vs 1.9+ mention).

You say you don’t explicitly test beyond 1.5.7, but later claim parity with Terraform 1.9+. Suggest tightening to avoid over‑commitment and clarifying OpenTofu baseline.

Apply:

- - **OpenTofu**: We support OpenTofu 1.9 for new features that provide significant customer value.
+ - **OpenTofu**: We support OpenTofu 1.9+ for new features that provide significant customer value.
...
- - It works identically in both OpenTofu 1.9+ and Terraform 1.9+
+ - It works identically in OpenTofu 1.9+ and in Terraform versions that implement the same feature

Also applies to: 37-37

sidebars/docs.js (1)

675-679: LGTM: Sidebar entry and corresponding documentation file verified.

@josh-padnick josh-padnick merged commit d55d5e2 into main Sep 29, 2025
6 of 7 checks passed
@josh-padnick josh-padnick deleted the opentofu-migration branch September 29, 2025 18:14
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.

2 participants