Failed to load state: unsupported checkable object kind var

I am currently having this problem with selected stacks in my local repository, I get the error message when I run terragrunt run-all apply

failed to load state: unsupported checkable object kind var

I use both terraform & terragrunt in my configuration, but drive deployment using terragrunt commands only,

Some other stacks works fine but am having this problem with just selected stacks.

The error message is not pointing at any file

Hi @dayo,

Based on this symptom I think you are using the terraform_remote_state data source in a situation where the reader of the state snapshot (the configuration with the data source) is running an older version of Terraform than the writer of the state snapshot (the configuration whose state is being read).

Unfortunately some older versions of Terraform cannot decode state snapshots that include a record of whether the validation rules in input variables passed or failed, and that leads to this error.

If I’ve correctly guessed the cause, then you can avoid the problem by upgrading the version of Terraform used by the configuration containing the data source. The latest patch release in the following minor releases has been updated to support this new information in the state:

  • v1.3 (upgrade to v1.3.10)
  • v1.4 (upgrade to v1.4.7)
  • v1.5 (upgrade to v1.5.7)

Terraform v1.2 and earlier are not affected, and Terraform v1.6 and later are not affected.

In the above I’ve specified the earliest possible version you could upgrade to to avoid the problem, but it sould also work to upgrade directly to the latest minor release of Terraform v1.6 or later, if you’d prefer to upgrade all in one step rather than performing a patch release upgrade followed by a minor release upgrade. If you do upgrade to a newer minor release, I suggest also reviewing the upgrade guides (select earlier versions from the version selector to find the guides for each minor version boundary you are crossing) to make sure you aren’t affected by some of the less-common situations that require special attention while upgrading.

3 Likes

@apparentlymart, Thanks for your response, yes this was finally resolved by upgrading to the latest version of terraform across the development team.

The issue was created due to differences in terraform version across the team.

After upgrading to the latest version of terraform from the official website that comes with the message when this command is used
<terraform --version>

Deployment pipeline works fine across all stacks within the repo.

Hi.
I now get this as well. I have many implementations and it is only 1 environment where this happens.
I have not upgraded Terraform at all and it happened since friday and it was working an hour ago again, when I wanted to show someone it failed again. How do I go about in finding the issue?
Regards,
Chris

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.