Terraform: data could not be decoded from the state: unsupported attribute "request_parameters_in_json" after upgrade to 0.13

Created on 12 Aug 2020  ·  8Comments  ·  Source: hashicorp/terraform

Terraform Version

Terraform v0.13.0

Terraform Configuration Files

resource "aws_api_gateway_method" "dialerai" {
  rest_api_id   = aws_api_gateway_rest_api.webhook.id
  resource_id   = aws_api_gateway_resource.dialerai.id
  http_method   = "POST"
  authorization = "NONE"

  api_key_required = true
}

Debug Output

Crash Output

Expected Behavior

Actual Behavior


throws after upgrade to 0.13 when run terraform apply i do before terraform init -reconfigure

Error: Invalid resource instance data in state

  on ../../project/httpToSQS.tf line 21:
  21: resource "aws_api_gateway_method" "dialerai" {

Instance module.project.aws_api_gateway_method.dialerai data could not be
decoded from the state: unsupported attribute "request_parameters_in_json".


Error: Invalid resource instance data in state

  on ../../project/httpToSQS.tf line 21:
  21: resource "aws_api_gateway_method" "dialerai" {

Instance module.project.aws_api_gateway_method.dialerai data could not be
decoded from the state: unsupported attribute "request_parameters_in_json".

Steps to Reproduce

  1. terraform init -reconfigure
  2. terraform apply

    Additional Context

References

bug new

Most helpful comment

I am seeing this issue with resources and data blocks. This must not require editing manually any states, it would be enormous job at least for me to do. I feel like such a major issue should have been captured during Release Candidate testing 👎

All 8 comments

i found a solution:

  • remove attribute manually "request_parameters_in_json": null, from terraform.tfstate
  • update digest en dynamodb table

after this terraform apply works again

i found a solution:

  • remove attribute manually _"request_parameters_in_json": null,_ from terraform.tfstate
  • update digest en dynamodb table

after this terraform apply works again

I had the same issue, this solution worked for me.

We're seeing very similar errors with Terraform 0.13 and the AWS provider 3.1.0.

Error: Invalid resource instance data in state

  on infrastructure/networking/main.tf line 49:
  49: data "aws_availability_zones" "available" {}

Instance module.poland.module.networking.data.aws_availability_zones.available
data could not be decoded from the state: unsupported attribute
"blacklisted_names".

Error: Invalid resource instance data in state

  on infrastructure/asset-store/lambda/main.tf line 6:
   6: data "aws_iam_role" "default" {

Instance module.asset_store_url_mapper_function.data.aws_iam_role.default data
could not be decoded from the state: unsupported attribute
"assume_role_policy_document".

and a lot of others with different data providers and resources.

Thanks for reporting this @mpaluchowski!

Duplicate of #25752

I am seeing this issue with resources and data blocks. This must not require editing manually any states, it would be enormous job at least for me to do. I feel like such a major issue should have been captured during Release Candidate testing 👎

I'm forced for some projects to keep using 0.12 because of these resource and data block state issues.

I had the same error and it was resolved by downgrading terraform version

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings