I am working on many terraform deployments with different shared states.
One of my shared states is created with CLI v0.13.5.
My CLI version is v0.13.5. My state updates changes the state version and it won’t be usable by everyone using CLI v0.13.3.
Is there any way CLI v0.13.5 act as v0.13.3 without a re-install ?
I need CLI v0.13.5 for my other projects.
Is there any way CLI v0.13.5 act as v0.13.3 without a re-install ?
In short, no—Terraform will always write its version to the state file, and as you noted earlier versions will refuse to read state generated by a later version of Terraform.
Since you need multiple versions of Terraform, you might want to try tfenv to help switch between them.
One more positive note: we’re working on ways to make different versions of Terraform more compatible with each other. All versions of Terraform after 0.14.0 should be compatible with each other until the state file format changes. Hopefully this will eventually make this problem less common in the future!
Thank you for help.
When I go to the download page, I can only see the latest version.
Where can I find the exact version of v0.13.5 CLI to download?
You can download older versions of Terraform from the releases service. There’s a link to that page from the downloads site, but it’s not as clear as it could be—we’re working on a redesign for the downloads page now.