Skip to content

[bug] AWS terraform provider 6.1.0 identity changed #43199

@rchui

Description

@rchui

Terraform and AWS Provider Version

18:58:17.989 STDOUT terraform: Terraform v1.12.2
18:58:17.989 STDOUT terraform: on linux_amd64

Affected Resource(s) or Data Source(s)

  • aws_iam_role
  • aws_s3_bucket

Expected Behavior

I would not expect an error when running terraform

Actual Behavior

I get an error

Relevant Error/Panic Output

18:58:32.317 STDOUT terraform: │ Error: Unexpected Identity Change: During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.
18:58:32.317 STDOUT terraform: │ 
18:58:32.317 STDOUT terraform: │ This is always a problem with the provider and should be reported to the provider developer.
18:58:32.318 STDOUT terraform: │ 
18:58:32.318 STDOUT terraform: │ Current Identity: cty.ObjectVal(map[string]cty.Value{"account_id":cty.NullVal(cty.String), "name":cty.NullVal(cty.String)})
18:58:32.318 STDOUT terraform: │ 
18:58:32.318 STDOUT terraform: │ New Identity: cty.ObjectVal(map[string]cty.Value{"account_id":cty.StringVal("<account-id>"), "name":cty.StringVal("<name>")})
18:58:32.318 STDOUT terraform: │ 
18:58:32.318 STDOUT terraform: │   with module.airflow.aws_iam_role.execution,
18:58:32.318 STDOUT terraform: │   on ../../../modules/airflow/main.tf line 190, in resource "aws_iam_role" "execution":
18:58:32.318 STDOUT terraform: │  190: resource "aws_iam_role" "execution" {
18:58:32.318 STDOUT terraform: │ 
18:58:32.318 STDOUT terraform: ╵
18:58:32.318 STDOUT terraform: ╷
18:58:32.318 STDOUT terraform: │ Error: Unexpected Identity Change: During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.
18:58:32.319 STDOUT terraform: │ 
18:58:32.319 STDOUT terraform: │ This is always a problem with the provider and should be reported to the provider developer.
18:58:32.319 STDOUT terraform: │ 
18:58:32.319 STDOUT terraform: │ Current Identity: cty.ObjectVal(map[string]cty.Value{"account_id":cty.NullVal(cty.String), "bucket":cty.NullVal(cty.String), "region":cty.NullVal(cty.String)})
18:58:32.319 STDOUT terraform: │ 
18:58:32.319 STDOUT terraform: │ New Identity: cty.ObjectVal(map[string]cty.Value{"account_id":cty.StringVal("<account-id>"), "bucket":cty.StringVal("<name>"), "region":cty.StringVal("<region>")})
18:58:32.319 STDOUT terraform: │ 
18:58:32.319 STDOUT terraform: │   with module.airflow.module.bucket.aws_s3_bucket.bucket,
18:58:32.319 STDOUT terraform: │   on .terraform/modules/airflow.bucket/modules/aws/s3_bucket/main.tf line 24, in resource "aws_s3_bucket" "bucket":
18:58:32.319 STDOUT terraform: │   24: resource "aws_s3_bucket" "bucket" {
18:58:32.319 STDOUT terraform: │ 
18:58:32.319 STDOUT terraform: ╵
18:58:39.727 STDOUT terraform: Operation failed: failed running terraform plan (exit 1)
18:58:41.882 STDOUT terraform: ::error::Terraform exited with code 1.

Sample Terraform Configuration

Click to expand configuration

Steps to Reproduce

I'm not necessarily what is causing this

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.prioritizedPart of the maintainer teams immediate focus. To be addressed within the current quarter.regressionPertains to a degraded workflow resulting from an upstream patch or internal enhancement.resource-identityPertains to resource identity.service/s3Issues and PRs that pertain to the s3 service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions