Terraform Version
Expected Behavior
After upgrading to Terraform v0.12, it should be possible to run terraform init and have it automatically update the .terraform/terraform.tfstate file and other internal state information within the .terraform directory for any new file formats introduced in the new release.
Actual Behavior
For a working directory that was previously initialized with Terraform 0.11 or earlier, the hashing function used for backend configuration may have generated a number bigger than what is expected by the new parser for the backend metadata file:
Error: Failed to load state: Decoding state file failed: json: cannot unmarshal number 14885267135666261723 into Go struct field BackendState.hash of type int
Workaround
To work around this for v0.12.0-alpha1, remove the file .terraform/terraform.tfstate and run terraform init again to re-generate it. (Note that .terraform/terraform.tfstate is not the same as terraform.tfstate; deleting the latter will cause Terraform to lose track of any resources it is managing.)
Please note that we do not recommend using remote state backends with v0.12.0-alpha1, since this prerelease version is focused on the configuration language changes and so the remote state backends have not been extensively tested.
Terraform Version
Expected Behavior
After upgrading to Terraform v0.12, it should be possible to run
terraform initand have it automatically update the.terraform/terraform.tfstatefile and other internal state information within the.terraformdirectory for any new file formats introduced in the new release.Actual Behavior
For a working directory that was previously initialized with Terraform 0.11 or earlier, the hashing function used for backend configuration may have generated a number bigger than what is expected by the new parser for the backend metadata file:
Workaround
To work around this for v0.12.0-alpha1, remove the file
.terraform/terraform.tfstateand runterraform initagain to re-generate it. (Note that.terraform/terraform.tfstateis not the same asterraform.tfstate; deleting the latter will cause Terraform to lose track of any resources it is managing.)Please note that we do not recommend using remote state backends with v0.12.0-alpha1, since this prerelease version is focused on the configuration language changes and so the remote state backends have not been extensively tested.