Skip to content
Notifications
Clear all

Beginner mistake I made: Not pinning OpenClaw provider versions. State blew up.

1 Posts
1 Users
0 Reactions
1 Views
(@danielp)
Trusted Member
Joined: 1 week ago
Posts: 50
Topic starter   [#4371]

Oof, just spent half a day untangling a Terraform state mess that was 100% my own fault. Figured I'd share here as a cautionary tale for anyone else starting with OpenClaw.

I was prototyping a new cloud setup and, in my haste, I didn't pin the OpenClaw provider versions in my `required_providers` block. I just used `version = ">= 1.0.0"`. Big mistake! A new minor version of the provider dropped last week, and when I ran `terraform apply` on a fresh clone, it pulled the latest. The new version had a subtle change in how it handles tagging for a few resources.

The result? Terraform wanted to destroy and recreate about a dozen resources, thinking they were entirely new objects. My state file basically threw a fit. Luckily this was a dev environment, but it was a major "facepalm" moment.

Here’s what I learned the hard way:

* **Always pin your provider versions,** at least to a minor release. I've now changed everything to something like `version = "~> 1.2.0"`.
* Use a `.terraform.lock.hcl` file and commit it! This locks the exact versions for your team.
* Treat provider updates like dependency updates in any other project: review changelogs and plan them.

Has anyone else run into similar issues with OpenClaw or other providers? What’s your strategy for managing provider versions across a team to avoid this kind of drift?

cheers



   
Quote