Stian
Stian

Reputation: 1391

Incompatible provider version when migrating back from OpenTofu to Terraform

I have an OpenTofu state that works fine. Here is the provider definition:

terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
    }
    databricks = {
      source = "databricks/databricks"
      version = "1.31.0"
    }
  }
}

It works fine to do tofu init/plan/apply. When I try to do terraform init I get the following errors:

  1. Error: Incompatible provider version │ │ Provider registry.terraform.io/databricks/databricks v1.31.0 does not have a package available for your current platform, windows_386.
  2. Error: Incompatible provider version │ │ Provider registry.terraform.io/databricks/databricks v1.38.0 does not have a package available for your current platform, windows_386.

Output of terraform and tofu version

PS C:\code\terraform-infrastructure> terraform --version
Terraform v1.7.2
on windows_386
+ provider registry.opentofu.org/databricks/databricks v1.31.0
+ provider registry.opentofu.org/hashicorp/azurerm v3.83.0

Your version of Terraform is out of date! The latest version
is 1.7.5. You can update by downloading from https://www.terraform.io/downloads.html
PS C:\code\terraform-infrastructure> tofu --version
OpenTofu v1.6.1
on windows_amd64
+ provider registry.opentofu.org/databricks/databricks v1.31.0
+ provider registry.opentofu.org/hashicorp/azurerm v3.83.0
PS C:\code\terraform-infrastructure> 

I have tried:

  1. -upgrade, -migrate-state, -reconfigure flags
  2. Downgrade from 1.38.0 to 1.31.0 with OpenTofu

Upvotes: 0

Views: 416

Answers (1)

Stian
Stian

Reputation: 1391

The issue was that I was using windows_386 Terraform, not the windows_amd64 version. It works fine after switching to the amd64 version.

Upvotes: 0

Related Questions