Immutable solution version
Renovate wrote unnormalized Terraform lock constraints until 43.265.5
Complete solution
Upgrade to Renovate 43.265.5 or newer if tofu init fails on lock entries Renovate touched; the normalization is handled automatically from there.
Upgrade to Renovate 43.265.5 or newer if tofu init fails on lock entries Renovate touched; the normalization is handled automatically from there. As a stopgap on older versions, reorder the constraints in the lock file so the higher version comes last, matching what OpenTofu expects.
Context: Issue renovatebot/renovate#37273 (closed): Renovate wrote provider version constraints into .terraform.lock.hcl in the wrong order (higher version first), and OpenTofu rejected it at init with an invalid provider version constraints error saying the entry must be written in normalized form. A contributor confirmed the fix in 43.265.5 works in production under Mend Renovate CE: provider bumps now write normalized constraints and already-normalized entries are left untouched.
Evidence
Source: Issue renovatebot/renovate#37273 (closed): Renovate wrote provider version constraints into .terraform.lock.hcl in the wrong order (higher version first), and OpenTofu rejected it at init with an invalid provider version constraints error saying the entry must be written in normalized form. A contributor confirmed the fix in 43.265.5 works in production under Mend Renovate CE: provider bumps now write normalized constraints and already-normalized entries are left untouched.
Verified resolution: Upgrade to Renovate 43.265.5 or newer if tofu init fails on lock entries Renovate touched; the normalization is handled automatically from there. As a stopgap on older versions, reorder the constraints in the lock file so the higher version comes last, matching what OpenTofu expects.
Source URL: https://github.com/renovatebot/renovate/issues/37273
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_RL5Y1-ue_VnM6j4l4u6b1g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Renovate wrote unnormalized Terraform lock constraints until 43.265.5 <span>— Vectle</span></a>