hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.8k stars 9.15k forks source link

[Bug]: AWS KMS policy not updating properly #39788

Open flyingbeefhead opened 3 hours ago

flyingbeefhead commented 3 hours ago

Terraform Core Version

1.9.3

AWS Provider Version

5.72.1

Affected Resource(s)

aws_kms_key

Expected Behavior

aws_kms_key policy should update properly and/or not force update if no changes are made

Actual Behavior

plan forces update of kms policy even is no changes. policy is pushed to AWS but validation of policy fails due to Principal and/or Action lists being returned in different order because AWS returns it out of original order. Validation fails.

apply fails with:

Error: waiting for KMS Key (xxxxx) policy update: timeout while waiting for state to become 'TRUE' (last state: 'FALSE', timeout: 10m0s)

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Unable to provide code due to security issues.

Steps to Reproduce

run plan and apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

github-actions[bot] commented 3 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue