terraform,

'data could not be decoded from the state: unsupported attribute' error in Terraform

Jul 03, 2022 · 1 min read · Post a comment

Another Terraform error from the vault, this time being:
Error: Invalid resource instance data in state .. data could not be decoded from the state: unsupported attribute "manage_run_tasks".

Prerequisites

  • Terraform

Solution

Although the solution might depend on the unsupported attribute, usually it comes down to upgrading or for a matter of fact, downgrading one of two or sometimes both things:

  • The Terraform version.
  • The TF provider version.

In my case, since manage_run_tasks argument is part of the tfe_team resource which manages Terraform Cloud/Enterprise teams, I had to update the tfe provider version to the latest one (as of the writing, version 0.32.1). Example code snippet:

terraform {
  required_version = "= 1.2.3"

  required_providers {
    tfe = {
      version = "= 0.32.1"
      source  = "hashicorp/tfe"
    }
  }
}

Conclusion

Any questions, thoughts and opinions are much appreciated. On a side note, follow our official channel on Telegram.