Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Enabling PITR on DynamoDB replica should not cause recreation #29222

Closed
szesch opened this issue Feb 2, 2023 · 3 comments · Fixed by #29269
Closed

[Bug]: Enabling PITR on DynamoDB replica should not cause recreation #29222

szesch opened this issue Feb 2, 2023 · 3 comments · Fixed by #29269
Assignees
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/dynamodb Issues and PRs that pertain to the dynamodb service.
Milestone

Comments

@szesch
Copy link
Contributor

szesch commented Feb 2, 2023

Terraform Core Version

1.3.7

AWS Provider Version

4.52.0

Affected Resource(s)

  • aws_dynamodb_table

Expected Behavior

When enabling PITR on a dynamodb replica it should update the PITR setting without deleting and recreating a replica. An in-place update is the behavior of the AWS CLI. Example of achieving this with the CLI aws dynamodb update-continuous-backups --region us-west-2 --table-name replica-pitr-test --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true.

Actual Behavior

The replica is deleted and then a new one is created.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

provider "aws" {
  region  = "us-east-2"
}

provider "aws" {
  region  = "us-west-2"
  alias   = "uswest2"
}

provider "aws" {
  region  = "eu-west-2"
  alias   = "euwest2"
}

resource "aws_kms_key" "us_east_2" {
  description = "CMK for us-east-2"
}

resource "aws_kms_key" "us_west_2" {
  description = "CMK for us-west-2"
  provider    = aws.uswest2
}

resource "aws_kms_key" "eu_west_2" {
  description = "CMK for eu-west-2"
  provider    = aws.euwest2
}

resource "aws_dynamodb_table" "test" {
  name           = "replica-pitr-test"
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "id"
  stream_enabled = true

  point_in_time_recovery {
    enabled = true
  }

  server_side_encryption {
    enabled     = true
    kms_key_arn = aws_kms_key.us_east_2.arn
  }

  attribute {
    name = "id"
    type = "S"
  }

  replica {
    region_name = "us-west-2"
    kms_key_arn = aws_kms_key.us_west_2.arn
    point_in_time_recovery = true
  }

  replica {
    region_name = "eu-west-2"
    kms_key_arn = aws_kms_key.eu_west_2.arn
    point_in_time_recovery = true
  }
}

Steps to Reproduce

  • terraform init
  • terraform plan -out plan
  • terraform apply
  • Set point_in_time_recovery = true on a replica
  • terraform plan -out plan
  • terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

I believe this issue was caused by #29102

Would you like to implement a fix?

None

@szesch szesch added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Feb 2, 2023
@github-actions
Copy link

github-actions bot commented Feb 2, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/dynamodb Issues and PRs that pertain to the dynamodb service. service/kms Issues and PRs that pertain to the kms service. labels Feb 2, 2023
@kamilturek kamilturek removed the service/kms Issues and PRs that pertain to the kms service. label Feb 5, 2023
@YakDriver YakDriver added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 6, 2023
@YakDriver YakDriver self-assigned this Feb 8, 2023
@github-actions github-actions bot added this to the v4.54.0 milestone Feb 9, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

This functionality has been released in v4.54.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/dynamodb Issues and PRs that pertain to the dynamodb service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants