Open virtualdom opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
I think I've hit the exact same issue (or very similar and if required I'll open my own issue), but on my end it when using hashicorp/aws
version 4.58.0
, I'm ending up with:
terraform plan
:
~ resource "aws_dynamodb_table" "terraform_locks" {
id = "mycroft-terraform-state-locks"
# (7 unchanged attributes hidden)
~ server_side_encryption {
+ kms_key_arn = "arn:aws:kms:us-east-1:***:key/1234-this-key-is-the-same-key-5678"
# (1 unchanged attribute hidden)
}
# (4 unchanged blocks hidden)
}
And the apply
will eventually fail:
│ Error: updating DynamoDB Table (mycroft-terraform-state-locks) SSE: ValidationException: One or more parameter values were invalid: Table is already encrypted with given KMSMasterKeyId. Use KMSMasterKeyId parameter if you want to change Master Key
│ status code: 400, request id: 3FNGL1aterrificrequestidislyinghere
│
│ with aws_dynamodb_table.terraform_locks,
│ on main.tf line 1, in resource "aws_dynamodb_table" "terraform_locks":
│ 1: resource "aws_dynamodb_table" "terraform_locks" {
I tried deleting the resource from the state file and import it, but next terraform plan
will still throw me the same error.
I think the regression happened in this PR: https://github.com/hashicorp/terraform-provider-aws/pull/29102
Any updates on this issue?
Terraform Core Version
1.15
AWS Provider Version
4.55.0
Affected Resource(s)
aws_dynamodb_table
Expected Behavior
No proposed changes when my
aws_dynamodb_table
is not changedActual Behavior
Perpetual diff in
plan
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
With an existing DynamoDB table and replica (aka at least one defined
local.replica_regions
), runplan
with no config changesDebug Output
No response
Panic Output
No response
Important Factoids
I'll add that when I pinned AWS provider version 4.51, this bug didn't appear
References
No response
Would you like to implement a fix?
None