Skip to content

[Bug]: Provider state compatibility issues when downgrading from v6.x to v5.x - "failed to decode identity: unsupported attribute" errors #43178

Description

@derkmingfong

Terraform and AWS Provider Version

Terraform v1.12.2
on windows_amd64
+ provider registry.terraform.io/hashicorp/aws v6.0.0
+ provider registry.terraform.io/hashicorp/external v2.3.5
+ provider registry.terraform.io/hashicorp/local v2.5.3
+ provider registry.terraform.io/hashicorp/null v3.2.4
+ provider registry.terraform.io/hashicorp/random v3.7.2

Affected Resource(s) or Data Source(s)

.terraform\modules\clinical_module_ecs.ecs\modules\service\main.tf

Expected Behavior

No error

Actual Behavior

Error: failed to decode identity: unsupported attribute "account_id". This is most likely a bug in the Provider, providers must not change the identity schema without updating the identity schema version

when using latest v6.0.0

Error: Unsupported block type

│ on .terraform/modules/clinical_module_ecs.ecs/modules/service/main.tf line 635, in resource "aws_ecs_task_definition" "this":
│ 635: dynamic "inference_accelerator" {

│ Blocks of type "inference_accelerator" are not expected here.
when using v5.92.0 or v5.81.0

Relevant Error/Panic Output

Sample Terraform Configuration

Click to expand configuration

Steps to Reproduce

  1. terraform init --backend-config tf.conf -upgrade
  2. terraform workspace select $TF_ENV
  3. terraform plan -out $TF_ENV.tfplan -var-file="variables/$TF_ENV.tfvars"

Debug Logging

Click to expand log output

GenAI / LLM Assisted Development

n/a

Important Facts and References

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/ecsIssues and PRs that pertain to the ecs service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions