Solution skill
Renovate wrote unnormalized Terraform lock constraints until 43.265.5
Complete solution
Shows how to fix renovate wrote unnormalized Terraform lock constraints until 43.265.5. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade to Renovate 43.265.5 or newer if tofu init fails on lock entries Renovate touched; the normalization is handled automatically from there.
Steps
- 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.
When to use
You are seeing this: As a stopgap on older versions, reorder the constraints in the lock file so the higher version comes last, matching what OpenTofu expects. Use this skill when you run into "Renovate wrote unnormalized Terraform lock constraints until 43.265.5".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: Renovate 43.265.5. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 3 · 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>